Introduction
Discourse is a powerful open-source discussion platform that can be used for forums, mailing lists, or chat rooms. This guide will walk you through the installation process of Discourse on the latest version of Ubuntu.
Prerequisites
Before starting, ensure your server meets the following requirements:
- A server running the latest version of Ubuntu.
- At least 2GB of RAM for a smooth installation.
- A domain name pointed to your server’s IP address.
- An SMTP server for email notifications (you can use services like Mailgun).
Step 1: Update Your System
Begin by updating your package list and upgrading all system packages to their latest versions. Open your terminal and execute these commands:
sudo apt update
sudo apt upgrade -y
Step 2: Install Docker
Discourse requires Docker to run. Install Docker using the following commands:
sudo apt install -y docker.io
Enable and start the Docker service:
sudo systemctl enable docker
sudo systemctl start docker
Step 3: Install Git
Git is required to clone the Discourse repository. Install Git with the following command:
sudo apt install -y git
Step 4: Clone the Discourse Repository
Create a directory for Discourse and clone the repository:
sudo mkdir /var/discourse
sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse
Step 5: Configure Discourse
Navigate to the Discourse directory and copy the sample configuration file:
cd /var/discourse
sudo cp samples/standalone.yml containers/app.yml
Edit the configuration file to set your domain name and email settings:
sudo nano containers/app.yml
In the file, update the DISCOURSE_HOSTNAME with your domain name and configure the SMTP settings under the DISCOURSE_SMTP_ADDRESS section.
Step 6: Bootstrap Discourse
Run the Discourse setup script to bootstrap your installation:
sudo ./launcher bootstrap app
Step 7: Start Discourse
Once bootstrapping is complete, start Discourse using the following command:
sudo ./launcher start app
Step 8: Access Discourse
Open your web browser and navigate to your server’s domain (e.g., http://your_domain.com). You should see the Discourse setup page, where you can complete the installation by setting up your admin account and configuring additional settings.
Conclusion
You have successfully installed Discourse on the latest version of Ubuntu. You can now use Discourse to create and manage your online community effectively.







