How to Install Discourse on Ubuntu 18.04

Discourse is a modern open source discussion and forum system. In this tutorial, you will learn how to set up Discourse with Docker on Ubuntu 18.04.

Create a new VPS

It is recommended to use at least 2GB of RAM. You can order a new VPS using the link below:

VPS – https://hostry.com/products/vps/

Login to your VPS Hostry

After successful authorization, you need to install Docker

Install Docker

To install, please use the following program:

wget -qO- https://get.docker.io/ | sh

Install Discourse

First, we recommend that you create a folder called “discourse” in the /var directory

mkdir /var/discourse

Then clone the official Discourse git repository to / var / discource

git clone https://github.com/discourse/discourse_docker.git /var/discourse

Go to the Discourse directory

cd /var/discourse

Copy the offline sample config file to container /app.yml:

cp samples/standalone.yml containers/app.yml

Edit the Discourse configuration

Edit the container/app.yml file:

nano containers/app.yml
  • Set DISCOURSE_DEVELOPER_EMAILS to your email address.
  • Set DISCOURSE_HOSTNAME to your web address to access Discourse, for example: discourse.example.com.
  • Enter your email credentials in:

DISCOURSE_SMTP_ADDRESS
DISCOURSE_SMTP_PORT
DISCOURSE_SMTP_USERNAME
DISCOURSE_SMTP_PASSWORD

Remember to remove the # comment character in front of the line. Then save the file and exit.

Bootstrap Discourse

Run bootstrap:

./launcher bootstrap app

During installation, you may be asked a question about SSH keys. Like Yes.

Once the boot process is complete, start Discourse:

./launcher start app

To access your Discourse instance, navigate to the DISCOURSE_HOSTNAME value in your browser.

Was this article helpful?

Related Articles

2 Comments

Leave A Comment?