In this step by step tutorial, you are going to learn how to install Discourse on Ubuntu…
I will recommend DigitalOcean because I’m using it personally and satisfied with the performance. I can provide you 100$ DigitalOcean credit for 60 days you just need to signup using this link.
- A ready to use Ubuntu Server, I will recommend you to choose 18.04 (must read: Initial Server Setup with Ubuntu 18.04)
- A domain pointed to your server where you are going to install Discourse
- SMTP credentials
- An SSH Client like Putty
So now what to wait for?
Let get this started…
Step 1: Connect your server using SSH
Step 2: Get the Updates
Step 3: Now Install the Docker
Step 4: You need to switch to root user, so enter this command…
Step 5: Now create a directory name /var/discourse
Step 6: Finally, clone the official Discourse Docker Image into
Step 7: Now move to /var/discourse directory using below command…
Step 8: This is the most important , you are going to Install & Setup discourse using below command.
After putting this command you will be asked some details:
1. Hostname for your Discourse?
Enter the domain which you want to install Discourse on, the domain should be pointed to the server.
2. Email address for admin account?
Enter the email address which you want to use for the admin account, make sure to add a valid email because when discourse will be installed, you need to enter a username and password whatever you want to set for your admin account and the activation code will be sent to this email.
Now you need SMTP details, so go to your SMTP service provider and get your SMTP details. I am using SparkPost and if you are too then you can find these details by going Settings>SMTP Settings.
4. SMTP user name?
On the same page, you can find the SMTP Username, if you are using SparkPost then Username is SMTP_Injection.
5. SMTP port?
The port will be shown on the same page where you can get the server and username from, in the sparkpost the port is 587.
6. SMTP password?
The password is your API key which you need to create.
Now I am going to discuss one error which mostly occurs after Installing Discourse, let assume you installed Discourse forum on forum.example.com and added your admin email firstname.lastname@example.org…
Then your From email will be email@example.com but it should be firstname.lastname@example.org, maybe you don’t have any custom email for your domain and maybe you forgot to add it as admin email…
If so then your activation email and other will not be sent using discourse, you will encounter an error called " 550 5.7.1 Unconfigured Sending Domain <gmail.com>"
So how you can change “From email” after installing Discourse, You just need to uncomment and edit below’s line from the App.yml file…
Then rebuild the Discourse using this command.
This will work definitely…
This is all how you can install Discourse on Ubuntu Server… If any query then must reply…