Deploying Discourse on Digital Ocean

Requirements for deployment

DNS provider

there a tons out there (recommend 1 namecheap)

  • choose discourse url (for this example we will use discuss.aves.io)

SMTP transactional email provider

there are tons out there (recommend 1 SendInBlue)

  • you will get credentials for smtp sever url, port, login, password

Digital Ocean Account

great low cost deployment option and what the tutorial is centered around

Admin Email Address

whatever email address you want the default discourse admin to be. I highly recommend using an email alias or email group (prefer later) – since you don't want your service to depend on a single person's email!

command line experience

some familiarity with the command line is required (but not ssh)

Installation

Configure Droplet

Login to DigitalOcean Login (you may already be logged in)

Visit Digital Ocean Marketplace (One Click Install) - Discourse

Click the "Create Discourse Droplet"

/images/20200523_105537.png

Choose a Droplet Size

1 CPU and 2 GB is plenty for discourse. 1 GB of RAM is not enough for discourse upgrades.

/images/20200526_215151.png

Choose a Droplet Location

For droplet location choose the closest location to your users.

/images/20200526_215445.png

Select Droplet Access Method

You are given the option for password or ssh based access. It is highly recommended to use ssh. If you use password based access make sure it is a long password.

/images/20200526_215745.png

Label and Name Resources

When deploying resources in the cloud it is especially important to name and label resources. Typical tags to include are creation date, project, development, production. More is better.

/images/20200526_220006.png

Finally Click "Create Droplet"

Identify the IP Address of the Resulting Droplet

/images/20200526_220453.png

In the case of this example the IP address is 157.245.247.126.

Point DNS A record at Droplet

Using the DNS Provider that you have chosen with a controlled domain. Point an A record at the IP Address. Every provider will have support for this type of record. In the figure below we show setting the DNS name via cloudflare.

/images/20200527_084220.png

Configuring Discourse

Use Console to Login to Droplet

If you have configured ssh key access you will have to use ssh to connect with your public/private key pair. If you chose a master password option you may use the console button to login with username root with master password that you specified when creating the droplet.

/images/20200526_221656.png

Answer Discourse Installation Prompt

/images/20200526_221908.png

Enter your:

hostname

url that discourse site is accessiable from discuss.aves.io for this example

admin email address

email address that discourse uses for inital login

transactional email settings

smtp address, smtp port, smtp login, smtp password

/images/20200527_091249.png

Installation should take around 5 minutes and you should be able to visit your discourse server and do administrative setup and discourse customization.

Administrative Discourse Setup

Visit Discourse Website

The first time you visit your discourse site you will see the following landing page. This page will continue to persist until an administrator has successfully logged into the site.

/images/20200527_092831.png

Once you click register you will need to register the username associated with the admin email setup previously in configuring discourse. Note that this is the master password so keep it secure.

Click Activation Link with Admin Email

Once you have entered your username and password you will recieve an email at your admin email address similar to the figure below.

/images/20200527_093428.png

Welcome to Discourse and the Customization of Discourse Begins

Discourse is extremely customizable thus this tutorial cannot go into depth on discourse and we suggest the reading discourse's discourse site. These initial settings will adjust the look and feel of your site to make it feel personal to your audience.

/images/20200527_093640.png

Backups

Discourse has two forms of backups tarball backups and s3 backups. We highly recommend s3 backups since they are more cost effective and provide stronger data guarantees. Each backup is between 70-100 MB and frequency and number of backups stored is all configurable. Thus it is possible to backup for nearly free. Further instructions on discourse backup.

Upgrade

Discourse upgrades can be done through the web UI. Go to the admin settings dashboard and click "Perform upgrades here". If you have upgrades available click the upgrade buttom. Note that each upgrade will lead to 1-2 minutes of downtime for the website. In this demo's case the website is up to date. Remember to update frequently. You will receive an email about once a month about available upgrades.

/images/20200527_094820.png

Footnotes


1

recommended should only be taken as a default if you don't know what one to choose. Often they are recommended due to generous free tier