How to use the Discourse One-Click Application on DigitalOcean
Discourse is a popular piece of discussion forum software written in Ruby on Rails. Discourse provides a number of built in improvements over previous generation forum software including mobile support, oAuth authentication options, a user trust system, notifications and many other features.
DigitalOcean's Discourse one-click application image provides an easy way to get started with a Discourse forum. This tutorial will walk you through creating and setting up a new Discourse Droplet.
Based on Ubuntu 16.04, the Discourse One-Click Application Image uses the official Discourse Docker container to provide all the components required to run Discourse which includes
- Ruby on Rails
- Nginx Web Server
- PostgreSQL Database Server
When launching your new Droplet you will be prompted for several pieces of information that are used to configure Discourse. Before beginning you should have the following information available:
- An email address to use for the administrator account.
- SMTP credentials to allow Discourse to send email
- A hostname (domain or subdomain) for your forum.
You can find more information on setting up a hostname on your DigitalOcean account here.
The SMTP credentials you provide are critical for account creation and notifications in discourse. If you have an existing mail server you can provide those credentials, otherwise there are several providers where you can set up a free (but limited) SMTP account such as: SparkPost (10k emails/month) Mailgun (10k emails/month), Mailjet (200 emails/day) or Mandrill, and use the credentials provided in the dashboard.
Create a Discourse Droplet
To get started, log into the DigitalOcean Control Panel, open the Create menu, and select Droplets:
This takes you to the Create Droplets page, where you can customize your settings before creating your Discourse Droplet. How to Create your First Droplet describes each choice in detail. Below, we'll highlight key settings:
Choose an image:
You'll need to switch from the Distributions tab to the One-click apps:
Once there, switch to One-click apps tab, then locate Discourse:
Click Discourse to select it as the image.
Once the image is highlighted, you can accept the defaults or adjust settings according to your use case. We recommend the following changes:
Choose a size
Choose whatever size you need here. Note that the Discourse One-Click Droplets require 2GB of RAM or more, so first available plan begins at 2GB.
Choose a datacenter region
Generally, choose the data center closest to your user base.
Select additional options
We recommend that you select Monitoring, a free service that will help you follow Droplet resource usage over time. You may also want to consider enabling automated backups. You can enable this now or anytime in the future.
Choose a hostname
You can make it easier to identify the Droplet by naming "Discourse" or by naming it after the site you plan to host.
When you've made your choices, click Create.
Once the Droplet is created, its address will be displayed:
Access your new Droplet
Before you begin using your new Discourse forum you will first need to log into your Droplet via SSH in order to complete the setup.
If you haven't used SSH or PuTTY before, you may want to refer to this tutorial for more details: How To Connect To Your Droplet with SSH.
On your computer, open a terminal and log into your Droplet as
root with this command (substitute your Droplet's IP address):
- ssh firstname.lastname@example.org
If you are prompted for a password, enter the password that was emailed to you when the Droplet was created. Alternatively, if you set up the Droplet with SSH keys, the keys will be used for authentication instead.
Once you are connected to your Droplet via SSH you will be prompted to complete the configuration of your new Discourse forum.
Once you provide these details, Discourse will be configured and you can visit your Droplet's IP or hostname via a web browser.
Now that you have your new Discourse forum up and running you may want to learn about ways to customize or extend it. The official discourse forums include a howto section with lots of great ways to get the most out of your Discourse installation.