Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Discourse on Ubuntu 22.04

Rumi, November 22, 2023

Prerequisites

  • A server with Ubuntu 22.04 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Update the packages to their latest versions available after a fresh install of Ubuntu 22.04

sudo apt-get update -y && sudo apt-get upgrade -y

Step 2. Install Docker

First, we will add the GPG keys and Docker repository since it is not added by default in the Ubuntu 22.04 official repository.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

Once the keys and repo are added, install Docker with the following command:

sudo apt install docker-ce docker-ce-cli containerd.io -y

After successful installation, start and enable the Docker service.

sudo systemctl start docker && sudo systemctl enable docker

To check the status of the Docker service, execute the following command:

sudo systemctl status docker

You should receive the following output:

root@host:~# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-03-02 16:28:53 CST; 21s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 96031 (dockerd)
Tasks: 9
Memory: 24.8M
CPU: 525ms
CGroup: /system.slice/docker.service
└─96031 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Step 3. Install Discourse

First, we need to download the Discourse repo from GitHub.

sudo mkdir -p /home/discourse
cd /home/discourse/
sudo git clone https://github.com/discourse/discourse_docker.git .

Now, once the Discourse is downloaded, we can execute the following command for the script to start installing the software.

sudo bash ./discourse-setup

The installation will start, and you will be asked for a couple of inputs, explained in bold below:

Checking your domain name . . .
Connection to yourdomain.com succeeded.
Email address for admin account(s)? [me@example.com,you@example.com]: admin@yourdomain.com
SMTP server address? [smtp.example.com]: smtp.yourdomain.com
SMTP port? [587]:
SMTP user name? [user@example.com]: user@yourdomain.com
SMTP password? [pa$word]: YourStrongPasswordHere
notification email address? [noreply@yourdomain.com]:
Optional email address for Let's Encrypt warnings? (ENTER to skip) [me@example.com]:
Optional Maxmind License key (ENTER to continue without MAXMIND GeoLite2 geolocation database) [1234567890123456]:

Does this look right?

Hostname : yourdomain.com
Email : admin@yourdomain.com
SMTP address : smtp.yourdomain.com
SMTP port : 587
SMTP username : user@yourdomain.com
SMTP password : YourStrongPasswordHere
Notification email: noreply@yourdomain.com
Maxmind license: (unset)

ENTER to continue, 'n' to try again, Ctrl+C to exit:
letsencrypt.ssl.template.yml enabled

Configuration file at containers/app.yml updated successfully!

The installation script will proceed with downloading the Discourse base image for Docker and building it. After successful installation will be displayed the following output:

DISCOURSE_HOSTNAME=yourdomain.com -e DISCOURSE_DEVELOPER_EMAILS=admin@yourdomain.com -e DISCOURSE_SMTP_ADDRESS=smtp.yourdomain.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=user@yourdomain.com -e DISCOURSE_SMTP_PASSWORD=YourStrongPasswordHere -e DISCOURSE_SMTP_DOMAIN=yourdomain.com -e DISCOURSE_NOTIFICATION_EMAIL=noreply@yourdomain.com -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h host-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:a7:ac:92:6f:88 local_discourse/app /sbin/boot
48d8ab41804db85677cc197fd19e7d5510faec248d99ce16d5a31082956f3463

Now, you can access the Web interface at https://yourdomain.com/ and register an account. Congratulations! You successfully installed Discourse software using the Docker image. 

Src:

How to Install Discourse on Ubuntu 22.04

Administrations Application Configurations (Linux) Discourse

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes