Deploying and Maintaining Discourse on Digital Ocean (2020)

Requirements for deployment

DNS provider

there a tons out there (recommend 1 namecheap)

  • choose discourse url (for this example we will use

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)


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"


Choose a Droplet Size

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


Choose a Droplet Location

For droplet location choose the closest location to your users.


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.


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.


Finally Click "Create Droplet"

Identify the IP Address of the Resulting Droplet


In the case of this example the IP address is

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.


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.


Answer Discourse Installation Prompt


Enter your:


url that discourse site is accessiable from 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


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.


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.


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.



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.

The relevant s3 settings for backups can be found in Settings and searching for the term s3. If you are using aws you will only need to set the s3 access key and s3 secret access key. Note that these credentials must have create and write access to the specific bucket.

For the purpose of this demo we will be using an s3 compatible bucket on digital ocean named Spaces.

  1. Click on the create button and select spaces


  1. Choose a datasource region, ensure that we restrict file listing (making files private), and assign a unique name. For some reason in this demo the new york region was not available. I recommend selecting the closest region to the discourse droplet (does not matter how close it is to users).


Once you have created the spaces bucket note the unique name that you assigned. This will be the bucket name. In addition the datasource region you chose will determine the s3 endpoint. To find the s3 endpoint of the new bucket you created click settings in the spaces menu.


Now we need to create the access key and secret key for access to this bucket. Click "API" in the global menu and Generate New Key. Assign a memorable name that gives the purpose of the key (e.g. <project>-discourse-backup).


Once you click provide a name and access two strings will appear the top being your access key and the bottom being the secret access key. Key a note of the secret access key since you will not be able to retrieve it later (you may regenerate a new secret however).

With all this we now have:

s3 endpoint


s3 backup bucket

<unique name>

s3 access key


s3 secret access key


Edit these fields in the discourse backup settings. Finally adjust the backup frequency and maximum backups. Note that each backup is around 100MB and s3 costs around $0.02-$0.05/GB so this is practically free when compared with the cost of the discourse droplet.


Adding plugins is also quite straightforward with discourse. ssh into discourse droplet with username root and configure the app.yaml located in /var/discourse/containers/app.yaml.

## Plugins go here
## see for details
    - exec:
        cd: $home/plugins
          - git clone
          - git clone

Just add the plugins to the list. See here for additional details. Finally re-deploy the website the launcher executable in /var/discourse.

  launcher rebuild app


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.




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