How to Install Discourse on Ubuntu 18.04

Last Updated: Wed, Jan 8, 2020
Linux Guides Social Ubuntu

Introduction

Discourse is a modern, open-source discussion and forum system. Visit the official site for a demo and a breakdown of the current feature set. This tutorial will teach you how to setup Discourse with Docker on Ubuntu 18.04.

Create a new Vultr VPS

It is recommended to use at least 2GB of RAM. Always select the latest 64-bit LTS distribution.

Access your Vultr VPS

Connect to your server using SSH via the Terminal on Mac or PuTTY on Windows.

ssh root@123.456.7.8

Replace "123.456.7.8" with your server IP.

Install Docker/Git

Run the following command:

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

Install Discourse

Make a folder called "discourse" in the /var directory:

mkdir /var/discourse

Clone the official Discourse git repository in /var/discourse:

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

Go into the Discourse directory:

cd /var/discourse

Make a copy of the config file as app.yml:

cp samples/standalone.yml containers/app.yml

Edit the Discourse configuration

Edit the app.yml file:

nano 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 and DISCOURSE\_SMTP\_PASSWORD. Be sure to remove the # before editing the strings.

Save the file and exit.

Note: you must have your email settings setup properly - otherwise you'll have a broken site!

Bootstrap Discourse

Launch bootstrap:

./launcher bootstrap app`

You may be asked a question during the installation about SSH keys. Type Yes.

Once the bootstrap process completes, start Discourse:

./launcher start app

Conclusion

To access your Discourse isntance, simply type in what you set for DISCOURSE\_HOSTNAME in your browser.

Want to contribute?

You could earn up to $300 by adding new articles