Skip to main content

How to Self-Host Discourse in 2026

·OSSAlt Team
discourseforumcommunityself-hostedmoderation
Share:

Discourse is still the gold standard for serious community forums in 2026. It sits above 46K stars on GitHub, is actively pushed to main, and powers everything from developer communities to customer support forums and niche hobby sites. Self-hosting it gives you full control, but it's heavier than typical PHP forum software and has its own way of doing things.

This guide is about running Discourse in production, not just getting it up.

When Discourse is worth the overhead

Discourse rewards communities that want:

  • Long-form discussion with good reading UX, not just short chat.
  • Strong trust-level and moderation tooling out of the box.
  • SSO with your app, so your users don't maintain a second account.
  • Search, tagging, and category structures that scale to thousands of topics.
  • Email-in and email-out so members can participate without opening the forum.

If your "community" is really a chat room, pick Slack/Discord or Matrix. Discourse is for async, durable discussion.

Server requirements and email dependencies

Practical minimums:

  • 2 vCPU, 4 GB RAM, 40 GB SSD as a starting point.
  • Swap configured (Discourse's bootstrap script expects it).
  • A dedicated subdomain, e.g. community.yourcompany.com.
  • A transactional email provider (Postmark, SES, Mailgun, Resend, SendGrid) with SPF, DKIM, and DMARC.

Email is not optional. Discourse sends activation, digest, notification, and mailing-list-mode emails, and broken email quietly kills community health. Configure it before you invite anyone.

Official Docker install flow

Discourse's official install is opinionated: a single discourse_docker repo with a launcher script and a YAML config. The canonical flow:

  1. Provision your VPS and point DNS to it.
  2. Clone discourse/discourse_docker into /var/discourse.
  3. Run ./discourse-setup; it asks for hostname, admin email, and SMTP details.
  4. It writes containers/app.yml and builds the container.

This is the path the Discourse team supports. Avoid custom Compose setups unless you know what you're giving up (future launcher rebuild app workflows, official upgrade paths, and most community troubleshooting).

Essential config after first boot

Once you can log in as admin:

  • Lock down signups (approve-first or invite-only) until you're ready.
  • Configure SSO if you have an app; it's far easier to set up before users exist than after.
  • Set up categories before publishing; renaming later works, but structure sticks.
  • Enable backups to S3 or another off-box target from the admin panel.
  • Configure a CDN in front of static assets if you expect meaningful traffic.

Plugins, backups, and storage planning

Plugins are where Discourse gets interesting and risky:

  • Install only plugins you actually need, and prefer official or widely adopted ones.
  • Plugins are rebuilt into the container on launcher rebuild app, which is slow and can break if a plugin lags a Discourse release.
  • Pin plugin branches when stability matters more than features.

For storage:

  • Uploads default to local disk. For any serious community, move them to S3-compatible storage.
  • Backups can go directly to S3 from the admin panel. Turn this on and verify a restore once.
  • Watch log volume; Discourse writes chatty logs and they add up.

Moderation and trust-level operations

Discourse's trust levels (TL0–TL4) are one of its best features, but they need tending:

  • Tune new-user restrictions to cut spam without frustrating real members.
  • Use automatic trust-level progression thresholds; don't hand-promote except for moderators.
  • Set up moderator notifications for flags and watched words.
  • Use categories with restricted permissions for staff-only or customer-only discussions.
  • Lean on the built-in Akismet or similar spam plugins from day one.

Upgrade workflow and common pitfalls

Upgrades usually mean:

  1. Read the release notes; check for any plugin compatibility warnings.
  2. Trigger an on-demand backup.
  3. Run cd /var/discourse && git pull then ./launcher rebuild app.
  4. Verify email sending, SSO, and a handful of key categories post-upgrade.

Common pitfalls:

  • OOM during rebuilds: undersized RAM or missing swap. Fix before retrying.
  • Plugin incompatibility: remove the offending plugin from app.yml, rebuild, upgrade core, then reintroduce.
  • Stale DNS or wrong hostname: you'll see email/notification issues; confirm DISCOURSE_HOSTNAME matches your real domain.
  • Missed backups: verify backups are actually landing in S3, not just queued.

For the broader operational baseline, see our self-hosting security checklist.

When to pick Discourse vs lighter forum software

Discourse is the right call when:

  • You expect hundreds or thousands of active members.
  • You need SSO, strong moderation, and rich trust-level behavior.
  • You care about SEO and searchable long-form threads.

Consider alternatives if:

Discourse asks more of your ops team than a simple PHP forum, but in return it gives you a community platform that can scale with you for years. Invest upfront in email, backups, and category design, and the rest mostly takes care of itself.

The SaaS-to-Self-Hosted Migration Guide (Free PDF)

Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.

Join 300+ self-hosters. Unsubscribe in one click.