How To Install Discourse In Ubuntu Sever?


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.


  1. A ready to use Ubuntu Server, I will recommend you to choose 18.04 (must read: Initial Server Setup with Ubuntu 18.04)
  2. A domain pointed to your server where you are going to install Discourse
  3. SMTP credentials
  4. 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 /var/discourse .

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.

3. SMTP server address?
You can get this on your SMTP provider dashboard whatever you use SparkPost, Mailgun, Sendgrid etc… It will look like as marked on first in above’s image.

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 and added your admin email
Then your From email will be but it should be, 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 <>"

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…



Good morning
What is Discourse and what it is used for?

1 Like


Discourse is a forum making tool. Our StayMeOnline Forum is based on it.



Discourse is a free open source forum software which allows users to create Discussion Forum or you can say a community for the people to discuss any specific topic.
This is founded by 2013 Jeff Atwood, Robin Ward, and Sam Saffron, However, the stated goals of the project are social rather than technical, to improve online discussion quality through improved forum software.

For example, I am using Discourse for helping people to make money from their blog using Affiliate Marketing and AdSense. I have created this forum to gather peoples from the same field so they can share their knowledge with each other.



How much for this discourse



As I said above, It is open free source. So you don’t need o pay anything except hosting charges



In which plan do you run this?



I am running it at 5$ per month…



How much traffic it can handle



Up to how much traffic it can handle.



I will suggest you read:

1 Like


@Wasim_Akram You can hire this cool kid to do the work at very cheap rate.

1 Like


Thanks, But I am not kid BTW…

I can do it FREE for you if you really want to install Discourse.

1 Like


:joy::joy::joy: wo achcha lagta hai. Bhaukaal you know.



Kya nickname rakhte ho :joy::joy::joy:



Sir I have used sparkpost but I don’t know about getting and received mail using it. How to implement with discourse.

1 Like


Just verify your domain, And share the SMTP details which you can find in SMTP tab there.
These details will be asked during the discourse installation.

1 Like


I filled all the things



Can you come to anydesk

1 Like


Not now… I am travelling…

1 Like