← All articles
COMMUNICATION Self-Hosting Discourse: Build a Modern Community Forum 2026-02-09 · discourse · forum · community

Self-Hosting Discourse: Build a Modern Community Forum

Communication 2026-02-09 discourse forum community discussion flarum

Forums aren't dead -- they've just been overshadowed by Discord servers and Reddit communities that control your content and lock it behind walled gardens. Discourse is the most capable open source forum platform available today. It powers communities for projects like Rust, Netlify, Graylog, and thousands of others.

Unlike a Discord server where conversations vanish into an endless scroll, Discourse creates organized, searchable, permanent discussion threads. Unlike Reddit, you own the data and set the rules. If you need a community platform for an open source project, a business, a hobby group, or any community, self-hosted Discourse gives you full control.

What Discourse Offers

Discourse was built from the ground up as a modern reimagining of forum software. Here's what sets it apart from legacy platforms like phpBB or vBulletin:

Installation: The Official Docker Method

Discourse has a strong opinion about installation: use their official Docker-based setup. This isn't a typical Docker Compose workflow -- Discourse uses its own discourse_docker launcher that manages the container lifecycle. While unconventional, this approach is battle-tested and recommended by the Discourse team.

Server Requirements

Discourse is resource-hungry compared to most self-hosted software:

A $12-24/month VPS (Hetzner, DigitalOcean, Vultr) handles most small-to-medium communities well.

Step-by-Step Setup

# Clone the official Discourse Docker manager
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse

Run the setup script:

./discourse-setup

The script will ask for:

SMTP is not optional. Discourse uses email for account activation, password resets, notifications, and the mailing list feature. If email doesn't work, your forum is effectively broken.

SMTP Options

You need a transactional email service. Options ranked by ease of setup:

Service Free Tier Notes
Mailgun 1,000 emails/month Most recommended for Discourse
Brevo (Sendinblue) 300 emails/day Generous free tier
Amazon SES 3,000/month (with EC2) Cheapest at scale
Postmark 100 emails/month Excellent deliverability
Self-hosted (Postfix) Unlimited Hard to maintain deliverability

Example SMTP configuration for Mailgun:

SMTP server: smtp.mailgun.org
SMTP port: 587
SMTP username: [email protected]
SMTP password: your_mailgun_password

Starting Discourse

After the setup script completes:

./launcher rebuild app

This builds the Docker image, runs database migrations, and starts the application. The first build takes 5-10 minutes. Visit https://forum.yourdomain.com and follow the setup wizard using the admin email you provided.

Docker Compose Alternative

If you prefer a standard Docker Compose setup (for integrating with other containers), it's possible but unsupported by the Discourse team. The official discourse_docker launcher is strongly recommended for production use because it handles Discourse's complex build process and migrations.

For development or testing, the Discourse team provides:

# For testing only -- not recommended for production
services:
  discourse:
    image: discourse/discourse:latest
    ports:
      - "80:80"
    volumes:
      - discourse_data:/shared
      - discourse_log:/var/log
    environment:
      - DISCOURSE_HOSTNAME=forum.yourdomain.com
      - DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org
      - DISCOURSE_SMTP_PORT=587
      - [email protected]
      - DISCOURSE_SMTP_PASSWORD=your_password
      - [email protected]
    restart: unless-stopped

  discourse-db:
    image: postgres:15
    volumes:
      - discourse_pg:/var/lib/postgresql/data
    restart: unless-stopped

  discourse-redis:
    image: redis:7
    restart: unless-stopped

volumes:
  discourse_data:
  discourse_log:
  discourse_pg:
User Browser / Email Nginx / Caddy Reverse proxy Discourse Ruby on Rails API Ember.js frontend Trust levels & moderation PostgreSQL Posts, users, topics Redis Cache & real-time Sidekiq Background jobs SMTP Service Mailgun / SES / Brevo notifications, reply-by-email email

Essential Configuration

After the initial setup wizard, here are the settings to configure first (Admin > Settings):

Security

User Registration

Email

Trust Levels

One of Discourse's best features is its automated trust system. New users start at Trust Level 0 and earn higher levels through participation:

Level Name Abilities Gained
TL0 New User Basic posting, limited links/images
TL1 Basic User Send PMs, flag posts, upload images
TL2 Member Invite users, create wiki posts, daily like limit increased
TL3 Regular Recategorize topics, rename topics, access private lounge
TL4 Leader Edit others' posts, pin topics, close topics (mini-moderator)

This system means your most active, trusted members gradually get moderation powers without you manually promoting them. It significantly reduces the moderation workload for community managers.

Useful Plugins

Discourse has a healthy plugin ecosystem. Some essentials:

Install plugins by adding them to your app.yml configuration:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-voting.git

Then rebuild:

cd /var/discourse
./launcher rebuild app

SSO Integration

Discourse supports several authentication methods:

For self-hosters running Authentik or Authelia, the OIDC integration is the cleanest path. In Admin > Settings > Login, configure the OIDC provider URL, client ID, and client secret.

Discourse vs Flarum

Flarum is the other major open source forum platform. Here's how they compare:

Feature Discourse Flarum
Maturity 10+ years, very stable Younger, still maturing
Resource usage Heavy (2 GB+ RAM) Light (512 MB RAM)
Email integration Excellent (reply by email) Basic notifications only
Plugin ecosystem Large, many official plugins Growing, community-driven
Trust system Built-in, automated Via extensions
Real-time chat Built-in plugin Via extensions
Search Powerful full-text Good, improving
Mobile experience Excellent responsive design Good responsive design
Language Ruby on Rails + Ember.js PHP + Laravel + Mithril.js
Installation Docker-based (opinionated) Traditional PHP (flexible)
Community size Very large Moderate

Choose Discourse if:

Choose Flarum if:

Maintenance and Backups

Updating Discourse

cd /var/discourse
git pull
./launcher rebuild app

Updates typically take 5-10 minutes. Discourse has a built-in update notification in the admin dashboard.

Backups

Discourse has built-in backup functionality (Admin > Backups):

For belt-and-suspenders protection, also back up the underlying Docker volumes:

cd /var/discourse
./launcher stop app
tar czf discourse_backup_$(date +%Y%m%d).tar.gz shared/
./launcher start app

Verdict

Discourse is the gold standard for self-hosted community forums. It's opinionated in its installation process and hungry for resources, but what you get in return is a mature, feature-rich platform that can scale from a small hobby community to a major open source project forum. The trust level system alone is worth the setup effort -- it turns your most engaged members into volunteer moderators organically. If you need a serious community platform and have a VPS with 2+ GB of RAM, Discourse is the clear first choice. If you're resource-constrained or want something lighter, look at Flarum.