How to Install Discourse with Docker on Ubuntu 22.04

Discourse is a free and open-source discussion platform built for the next decade of the Internet. You can use it as a mailing list, a discussion forum, and a long-form chat room. Discourse provides several social features similar to Twitter and Facebook. Build, engage and grow your business community in a trendy modern way. It is designed to build community discussion platforms for your team, clients, fans, supporters, or friends.

In this tutorial, we will show you how to install Discourse Forum on Ubuntu 22.04.


  • A server running Ubuntu 22.04.
  • A valid domain name is pointed to your server IP.
  • A root password is configured on the server.

Install Docker CE

Before starting, you will need to install the latest version of Docker CE on your server. First, install all the required dependencies using the following command:

apt-get install apt-transport-https ca-certificates git curl gnupg -y

Next, download the Docker GPG key and save it in the /etc/apt/keyrings directory.

mkdir -p /etc/apt/keyrings
curl -fsSL | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Next, add the Docker CE repository with the following command:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

Next, update the repository cache with the following command:

apt update -y

Once your repository is updated, you can install the latest version of Docker CE with the following command:

apt-get install docker-ce docker-ce-cli -y

After the installation, verify the Docker installation using the following command:

docker --version

You will get the following output:

Docker version 20.10.18, build b40c2f6

Install Discourse Forum on Ubuntu 22.04

First, create a directory for Discourse with the following command:

mkdir /var/discourse

Next, download the latest version of Discourse from the Git repo:

git clone /var/discourse

Next, navigate to the downloaded directory and configure the Discourse with the following command:

cd /var/discourse

Answer all the questions as shown below to complete the installation:

Hostname for your Discourse? []:

Checking your domain name . . .
Connection to succeeded.
Email address for admin account(s)? [[email protected],[email protected]]: [email protected]
SMTP server address? []: smtpl.localhost
SMTP port? [587]: 25
SMTP user name? [[email protected]]: [email protected]
SMTP password? [pa$$word]: password
notification email address? [[email protected]]: 
Optional email address for Let's Encrypt warnings? (ENTER to skip) [[email protected]]: [email protected]
Optional Maxmind License key (ENTER to continue without MAXMIND GeoLite2 geolocation database) [1234567890123456]: 

Does this look right?

Hostname          :
Email             : [email protected]
SMTP address      : smtpl.localhost
SMTP port         : 25
SMTP username     : [email protected]
SMTP password     : jethva1981
Notification email: [email protected]
Let's Encrypt : [email protected]
Maxmind license: (unset)

ENTER to continue, 'n' to try again, Ctrl+C to exit: 

Once the Discourse has been installed, verify the Discourse Docker container using the following command:

docker ps

You should get the following output:

CONTAINER ID   IMAGE                 COMMAND        CREATED          STATUS          PORTS                                                                      NAMES
bb5d5d7b3619   local_discourse/app   "/sbin/boot"   44 seconds ago   Up 42 seconds>80/tcp, :::80->80/tcp,>443/tcp, :::443->443/tcp   app

Access Discourse Forum

Now, open your web browser and access the Discourse web interface using the URL You should see the following screen:

Discourse Forum

Click on the Register button. You should see the Registration screen:

Create admin account

Provide your admin username, password, email, and click on the Register button. You should see the following screen:

Confirm email

You will receive an activation email to activate your account.


Congratulations! you have successfully installed Discourse Forum on Ubuntu 22.04 server. You can now implement Discourse in your organization and start communicating with your team over the internet.

Share this page:

Suggested articles

0 Comment(s)

Add comment