How To Install Discourse on Debian 11 Bullseye server

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.

Discourse running on the server side uses Ruby on Rails, Postgres as a database, and Redis. Whereas, if we talk about the client side, the developers rely on the JavaScript framework Ember.js. This forum software has been distributed under the GPL 2.0 license and the source code can be found on GitHub.

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

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:

Add Key:

curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Add Repo:

echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \ \
$(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


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 /var/discourse


5. Install and configure Discourse for Debian 11 Bullseye

First switch to the directory we have created and clone the directory.

cd /var/discourse

Start Script

Now, start the script:

sudo ./discourse-setup

The setup will ask you to add the domain address which you want to use with Discourse:

For example:

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-


7. Register Admin Account

Click on the Register Button. And

Install Discourse on Debian 11 Bullseye


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



How to install Discourse on Google Cloud – Ubuntu
Upgrade Debian 10 Buster to 11 Bullseye Linux



Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.