Discourse is open-source forum software written in Ruby as the backend and Javascript as frontend languages, respectively. Discourse offers a variety of features, such as threading, tagging, categorization, and many customizable plugins.
The data is stored in the PostgreSQL database, and the client uses Ember JS. The software is available in more than 20 international languages. This tutorial will install the Discourse forum software in the Docker CE engine.
Instaling Discourse is a straightforward process and may take up to 20 minutes. Let’s get things done!
Table of Contents
Prerequisites
A server with Ubuntu 22.04 as OS
Valid domain pointed to the servers IP address
User privileges: root or non-root user with sudo privileges
Step 1. Update the System
Update the packages to their latest versions available after a fresh install of Ubuntu 22.04
sudo apt-get update -y && sudo apt-get upgrade -y
Step 2. Install Docker
First, we will add the GPG keys and Docker repository since it is not added by default in the Ubuntu 22.04 official repository.
Now, once the Discourse is downloaded, we can execute the following command for the script to start installing the software.
sudo bash ./discourse-setup
The installation will start, and you will be asked for a couple of inputs, explained in bold below:
Checking your domain name . . .
Connection to yourdomain.com succeeded.
Email address for admin account(s)? [me@example.com,you@example.com]: admin@yourdomain.com
SMTP server address? [smtp.example.com]: smtp.yourdomain.com
SMTP port? [587]:
SMTP user name? [user@example.com]: user@yourdomain.com
SMTP password? [pa$word]: YourStrongPasswordHere
notification email address? [noreply@yourdomain.com]:
Optional email address for Let's Encrypt warnings? (ENTER to skip) [me@example.com]:
Optional Maxmind License key (ENTER to continue without MAXMIND GeoLite2 geolocation database) [1234567890123456]:
Does this look right?
Hostname : yourdomain.com
Email : admin@yourdomain.com
SMTP address : smtp.yourdomain.com
SMTP port : 587
SMTP username : user@yourdomain.com
SMTP password : YourStrongPasswordHere
Notification email: noreply@yourdomain.com
Maxmind license: (unset)
ENTER to continue, 'n' to try again, Ctrl+C to exit:
letsencrypt.ssl.template.yml enabled
Configuration file at containers/app.yml updated successfully!
The installation script will proceed with downloading the Discourse base image for Docker and building it. After successful installation will be displayed the following output:
Now, you can access the Web interface at https://yourdomain.com/ and register an account.
Congratulations! You successfully installed Discourse software using the Docker image. If you find this setup difficult, feel free to contact our technical support, and they will help you with this immediately. We are available 24/7. All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket.
If you liked this about installing Discourse on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below.