This article provides step-by-step instructions on how to install Discourse on Ubuntu VPS server.
What is Discourse?
Discourse is an open source Internet forum system. Features include threading, categorization and tagging of discussions, configurable access control, live updates, expanding link previews, infinite scrolling, and real-time notifications. It is customizable via its plugin architecture and its theming system.
Prerequisites
In order to install Discourse on Ubuntu VPS, the following requirements must be met:
- An Ubuntu VPS with at least 2GB of RAM
- Fresh Ubuntu 20.04/22.04 install
- Root-level user privileges
- Fully-qualified domain name with A record configured for VPS IP address
- SMTP server
Preview of Discourse Installation
In this tutorial, we will perform the following:
- Update the system’s OS (Ubuntu)
- Install, start, and enable Docker
- Install, setup, start, and enable Discourse
- Configure Let’s Encrypt SSL certificate installation and renewal
- Activate the Discourse Admin user
- Configure Discourse via web-based interface
How to Install Discourse on Ubuntu VPS
To install Discourse on Ubuntu VPS, follow the steps below:
- Login via SSH as root user.
- Update the system:
sudo apt update -y && sudo apt upgrade -y
- Install Docker container:
sudo apt-get install docker.io -y
- Once the installation is finished, start the Docker service:
sudo systemctl start docker
- Enable Docker service to start on boot:
sudo systemctl enable docker
- Clone the Official Discourse Docker Image into
/var/discourse
:sudo -s git clone https://github.com/discourse/discourse_docker.git /var/discourse cd /var/discourse chmod 700 containers
- Launch the Discourse setup tool:
./discourse-setup
- Answer the following questions, when prompted:
Hostname for your Discourse? [discourse.example.com]: Email address for admin account(s)? [me@example.com,you@example.com]: SMTP server address? [smtp.example.com]: SMTP port? [587]: SMTP user name? [user@example.com]: SMTP password? [pa$$word]: Let's Encrypt account email? (ENTER to skip) [me@example.com]: Optional Maxmind License key () [xxxxxxxxxxxxxxxx]:
- Once the setup is complete, access the Discourse hostname (i.e. discourse.example.com) from your web browser:
- Click to activate the account:
- Confirm the email:
- Configure Discourse-“About Your Site”:
- Configure Discourse-“Member Experience”:
- Configure Discourse – “Your site is ready”:
- Click “Configure More” to configure additional options.
- Configure Discourse-“Site Logo”:
- Configure Discourse-“Look and Feel”:
- Configure Discourse-“Your Organization”:
- Now you can navigate to your Discourse installation:
Conclusion
You now know how to install Discourse on Ubuntu VPS server.