Discourse is a modern, feature-rich, self-hosted forum platform used by many open-source projects and communities — offering a significantly more contemporary experience than traditional forum software.
Prerequisites
- A dedicated VPS: 2 vCPU, 4 GB RAM minimum (2 GB swap recommended if RAM is exactly 4 GB)
- Docker Engine installed
- A domain name pointing to your VPS
- An SMTP provider for sending emails (required — Discourse relies heavily on email for notifications and account verification)
Step 1 — Install Discourse's Official Launcher
sudo mkdir -p /var/discourse
sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
Step 2 — Run the Setup Wizard
sudo ./discourse-setup
The interactive wizard prompts for:
- Your domain name
- Admin account email
- SMTP server details (host, port, username, password)
Step 3 — Wait for the Build Process
The setup script builds a customized Docker image and can take 10–20 minutes — this is normal and expected.
Step 4 — Access Your Forum
https://yourdomain.com
SSL is configured automatically by the setup script via Let's Encrypt, as part of the standard installation flow.
Step 5 — Complete Admin Account Setup
Check the email account specified during setup for an activation link to complete your administrator registration.
Configuring Forum Settings
From the admin panel (/admin), configure categories, permissions, branding, and community settings.
Updating Discourse
cd /var/discourse
sudo ./launcher rebuild app
This rebuilds the container with the latest version — run periodically to stay current with security patches.
Managing the Discourse Container
sudo ./launcher stop app
sudo ./launcher start app
sudo ./launcher logs app
Backing Up Discourse
Discourse includes a built-in backup feature accessible from the admin panel (Admin → Backups), producing a complete archive including the database and uploaded files. Download or configure automatic off-site upload of these backups as part of your regular backup routine.
Configuring S3 for File Uploads (Recommended at Scale)
For forums with significant file/image upload volume, configuring S3-compatible storage instead of local disk storage is recommended — configure this in Admin → Settings → Files.
Common Errors
Setup fails during the email test step — verify SMTP credentials are correct and the provider allows sending from your VPS's IP (some providers require sender verification first).
Site is slow or unresponsive — Discourse is resource-intensive; verify the VPS meets minimum specifications and check for swap usage indicating memory pressure.
Best Practices
- Use a dedicated transactional email provider for reliable delivery, not a personal email account
- Rebuild regularly to apply security updates
- Use the built-in backup feature and store copies off-server
Continue Reading
- How to Install Docker Engine on Ubuntu & Debian
- How to Choose the Right VPS Plan for Your Workload
- How to Set Up a VPS for Email Marketing (Complete Guide)
Browse more articles in Popular Self-Hosted Applications.
