How to Install Discourse on Ubuntu Linux

ubuntu 3344434 640
ubuntu 3344434 640

This brief tutorial shows students and new users how to install Discourse Forum software on Ubuntu 18.04 | 16.04.

Discourse is a modern, open-source discussion and forum solution for the modern web that powers discussions on thousands of sites to drive user engagement.

With Discourse, webmasters and website owners can create a customizable hub of questions and interesting ideas that are searchable and integrates with popular services to enhance the platform.

When looking for a next-generation forum platform that’s powerful and mobile-friendly, you might want to take a look at Discourse software. It’s simple, and efficient and makes online discussion easy and fun… Discourse is built with Ruby on Rails, and Ember.js and requires Redis database software.

Individuals and webmasters can use Discourse Forums software to set up communities in minutes to stay in touch with groups of people or ideas.

For more about Discourse, please visit its homepage.

To get started with installing Discourse Forum Software, please follow the steps below:

Install Docker

The first requirement for Discourse forum software is to get Docker installed. to do that, run the commands below.

sudo apt update
sudo apt install git

After that, run the command below to download Docker and install it

wget -qO- | sh

After running the command above, Docker should be installed and ready for Discourse.

Download and Install Discourse

After installing Docker above, follow the steps below to download and install Discourse. First, create a home directory to download its content. For this tutorial, we’re going to create a new folder called Discourse in the /var directory. /var/discourse.

sudo mkdir /var/discourse

After that, run the commands below to download Discourse content into the /var/discourse directory.

sudo git clone /var/discourse

Next, create a new Discourse environment file ( app.yml ) by copying its sample file to create a new one.

sudo cp /var/discourse/samples/standalone.yml /var/discourse/containers/app.yml

When you’re done, run the commands below to open the new app.yml file and edit it to match your environment

sudo nano /var/discourse/containers/app.yml

Make the highlighted changes and save the file.

 ## TODO: The domain name this Discourse instance will respond to
  ## Required. Discourse will not work with a bare IP number.

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example ','

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate

Save the file and exit:

Launch Discourse App

After all the setups above, your server should be ready. All you need to do is start up the Discourse app and begin using it.

To do that, run the commands below:

sudo ./launcher bootstrap app
sudo ./launcher start app

Next, open your browser and browse to the hostname you defined above and you should see the Discourse setup page.

Discourse Ubuntu Install

Register and create an admin account. An activation mail will be sent to the address you enter. You’ll want to follow the instructions in the email to activate your account.

Discourse Ubuntu Install

After that, log in and begin setting up your forum platform.

Whenever you edit the configuration file, run the commands below from the Discourse directory to rebuild Discourse.

sudo ./launcher rebuild app

That’s it!


This post shows you how to set up Discourse forum software on Ubuntu 18.04 | 16.04. If you find any error above, please report it in the comment form below.

You may also like the post below:

Posted by
Richard W

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: