Discourse is an open-source platform for creating an online forum, comment, chat rooms, or mailing list system. In this tutorial, we see the steps to install Discourse on Debian 11 Bullseye using the command terminal.
With time, the internet forums have changed now. They are no anymore with old, monotonous designs. Anyone who has ever used or been a member of phpBB or vBulletin, already understands how forums work and their importance in the internet world. But in the last few years, website operators seem to be far less interested in their forum. However, Discourse finds its way and even gets popular among the community because of the modernization of the forum they are offering with their software.
It was launched in 2014, hence has been around for 7 years now, Discourse is Ruby-based forum software. In addition, the creators – including Stack Overflow co-founder Jeff Atwood – integrated various newer elements that we know from social networks or comment systems such as Disqus.
Apart from the self-hosting open source edition, the makers of Discourse also offer their hosting solution for between $100 and $300 per month or depending upon the custom solution; just like WordPress.com.
Steps to install discourse on Debian 11 Linux Bullseye
What we need to follow, in this tutorial:
• Debian 11 Server
• A non-root sudo user
• Internet connection
• at least 2GB of RAM
1. Install ca-certificates on Debian 11 and run APT Update
To add a repository over HTTPS we need to install ca-certificates, along with some other tools we required further in the tutorial.
sudo apt update -y
sudo apt-get install apt-transport-https ca-certificates git curl gnupg -y
2. Add Docker GPG key and Repository
As we need Docker to install Discourse, hence, to make sure we have the latest version of it; let’s add its repository using the given commands:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \ https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
3. Install Docker for Discourse
Now, run the given command to install the docker platform and other tools of it on your Debian 11 Linux.
sudo apt-get install docker-ce docker-ce-cli containerd.io
4. Downloading Discourse on Debian 11
Once the Docker is on our system, let’s create a dedicated directory for Discourse and then clone its git repository for further installation.
sudo mkdir /var/discourse
Now clone the git repo
sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse
5. Install and configure Discourse for Debian 11 Bullseye
First switch to the directory we have created and clone the directory.
Now, start the script:
The setup will ask you to add the domain address which you want to use with Discourse:
After that to send the mail, the user has to set the SMTP server address of the mail server you want to use. It will ask for the following items:
SMTP server address - SMTP user name - SMTP port - SMTP password -
You can check out the official Discourse page for solving problems related to email.
6. Access web interface
Now, open your browser that can access the domain name you have registered for Discourse. After that in the URL, point the browser to your Discourse’s Domain.
For example: Here we are using- demo.how2shout.com
7. Register Admin Account
Click on the Register Button. And
Keep Upgrade Discourse
In the future, if you want to upgrade your installation then follow the given commands:
cd /var/discourse sudo git pull sudo ./launcher rebuild app