Tools: How to Set Up a Self-Hosted Forum When You're Tired of Renting Your Community (2026)

Tools: How to Set Up a Self-Hosted Forum When You're Tired of Renting Your Community (2026)

The actual problem: you don't own your community's data

Choosing the right self-hosted forum software

Step 1: Provision your server

Step 2: Clone and configure Discourse

Step 3: Set up a reverse proxy (if you need one)

Step 4: Backups — the part everyone skips

Step 5: Harden the basics

Why not just use a managed Discourse instance?

The maintenance reality

The real payoff You wake up one morning and your Discord server got nuked. Or maybe Slack changed their free tier again and your community just lost 10,000 messages of searchable knowledge. Or Reddit decided your subreddit violates some new policy you've never heard of. I've been through two of these three scenarios. The second time it happened — watching months of technical discussions vanish from a free Slack workspace — I finally sat down and solved this properly. Here's the core problem and how to fix it. When your project discussions live on a third-party platform, you're one terms-of-service change away from losing everything. This isn't paranoia. It's happened repeatedly: Beyond data loss, there's a subtler issue. You can't customize the experience. You can't add custom authentication. You can't control what gets indexed by search engines. You can't decide your own moderation policies without platform interference. The fix is straightforward: run your own forum software on infrastructure you control. I've deployed three different forum platforms across various projects. Here's what I'd actually recommend in 2026: I'm going with Discourse for this walkthrough because it's what I've run the longest and trust the most in production. You need a VPS with at least 2GB of RAM (Discourse won't install on 1GB without swap, and even then it's painful). I've had good results with 2 vCPUs and 4GB RAM for communities under 5,000 users. SSH into your fresh server and make sure it's up to date: One thing that tripped me up the first time: Discourse's installer assumes it has exclusive use of ports 80 and 443. If you're running anything else on those ports, you'll need to put Discourse behind a reverse proxy. More on that in a minute. Discourse ships its own Docker-based installer that handles most of the complexity: The setup script asks for your domain, SMTP credentials, and admin email. Don't skip the SMTP part — Discourse relies heavily on email for account confirmation and notifications. I learned this the hard way when half my users couldn't activate their accounts because I figured I'd "set up email later." If you want more control, you can edit the config directly: Then build and launch: This takes 5-10 minutes. Go make coffee. If you're running other services on the same box — and you probably are if you're into self-hosting — you'll want nginx or Caddy in front of Discourse. I use Caddy because the automatic HTTPS is genuinely zero-config: Restart Caddy with sudo systemctl restart caddy and you've got automatic TLS termination. No certbot cron jobs, no renewal scripts. It just works. Here's where digital sovereignty actually matters. If your server dies and you have no backups, you've just recreated the same problem you were trying to avoid. Discourse has built-in backup support via the admin panel, but I also run a cron job that copies backups off-server: Test your restore process before you need it. I cannot stress this enough. A backup you've never tested is not a backup — it's a hope. A few things you should do before inviting anyone: Discourse also has rate limiting built in (that web.ratelimited.template.yml template from earlier), which helps with spam and abuse. Fair question. The official Discourse hosting starts around $50/month for small communities. If you value your time more than that monthly cost, managed hosting is completely reasonable. But the whole point of this exercise is sovereignty. With a managed instance, you're still dependent on someone else's infrastructure decisions, pricing changes, and continued existence as a business. Self-hosting means the forum lives and dies by your own decisions. There's also the learning aspect. Running your own forum teaches you about email deliverability, Docker networking, backup strategies, and reverse proxies. Every one of those skills transfers to other projects. I won't pretend self-hosting is set-and-forget. Here's what ongoing maintenance actually looks like: Budget about 1-2 hours per month for maintenance once everything is running smoothly. More in the first month as you dial in settings. Six months after migrating my project's community from a free Slack workspace to a self-hosted Discourse instance, here's what changed: Self-hosting a forum isn't hard. It's a weekend project that pays dividends for years. The hardest part isn't the technical setup — it's convincing your community to make the move. But that's a people problem, not a tech problem, and it's outside the scope of what I can solve with a Docker container. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

# Update packages and -weight: 500;">install prerequisites -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">upgrade -y -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y -weight: 500;">git -weight: 500;">curl -weight: 500;">wget # Discourse uses Docker, so -weight: 500;">install that -weight: 500;">curl -fsSL https://get.-weight: 500;">docker.com -o get--weight: 500;">docker.sh sh get--weight: 500;">docker.sh # Update packages and -weight: 500;">install prerequisites -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">upgrade -y -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y -weight: 500;">git -weight: 500;">curl -weight: 500;">wget # Discourse uses Docker, so -weight: 500;">install that -weight: 500;">curl -fsSL https://get.-weight: 500;">docker.com -o get--weight: 500;">docker.sh sh get--weight: 500;">docker.sh # Update packages and -weight: 500;">install prerequisites -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">upgrade -y -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y -weight: 500;">git -weight: 500;">curl -weight: 500;">wget # Discourse uses Docker, so -weight: 500;">install that -weight: 500;">curl -fsSL https://get.-weight: 500;">docker.com -o get--weight: 500;">docker.sh sh get--weight: 500;">docker.sh # Clone the official Docker deployment repo -weight: 600;">sudo -s -weight: 500;">git clone https://github.com/discourse/discourse_docker.-weight: 500;">git /var/discourse cd /var/discourse # Run the interactive setup ./discourse-setup # Clone the official Docker deployment repo -weight: 600;">sudo -s -weight: 500;">git clone https://github.com/discourse/discourse_docker.-weight: 500;">git /var/discourse cd /var/discourse # Run the interactive setup ./discourse-setup # Clone the official Docker deployment repo -weight: 600;">sudo -s -weight: 500;">git clone https://github.com/discourse/discourse_docker.-weight: 500;">git /var/discourse cd /var/discourse # Run the interactive setup ./discourse-setup # /var/discourse/containers/app.yml templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.ratelimited.template.yml" - "templates/web.socketed.template.yml" # add this if using a reverse proxy params: db_default_text_search_config: "pg_catalog.english" env: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 DISCOURSE_DEFAULT_LOCALE: en DISCOURSE_HOSTNAME: 'forum.yourdomain.com' DISCOURSE_DEVELOPER_EMAILS: '[email protected]' DISCOURSE_SMTP_ADDRESS: smtp.yourmailprovider.com DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: your-smtp-user DISCOURSE_SMTP_PASSWORD: your-smtp-password # Uncomment the next line if you're behind a reverse proxy # DISCOURSE_SMTP_ENABLE_START_TLS: true volumes: - volume: host: /var/discourse/shared/standalone guest: /shared - volume: host: /var/discourse/shared/standalone/log/var-log guest: /var/log # /var/discourse/containers/app.yml templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.ratelimited.template.yml" - "templates/web.socketed.template.yml" # add this if using a reverse proxy params: db_default_text_search_config: "pg_catalog.english" env: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 DISCOURSE_DEFAULT_LOCALE: en DISCOURSE_HOSTNAME: 'forum.yourdomain.com' DISCOURSE_DEVELOPER_EMAILS: '[email protected]' DISCOURSE_SMTP_ADDRESS: smtp.yourmailprovider.com DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: your-smtp-user DISCOURSE_SMTP_PASSWORD: your-smtp-password # Uncomment the next line if you're behind a reverse proxy # DISCOURSE_SMTP_ENABLE_START_TLS: true volumes: - volume: host: /var/discourse/shared/standalone guest: /shared - volume: host: /var/discourse/shared/standalone/log/var-log guest: /var/log # /var/discourse/containers/app.yml templates: - "templates/postgres.template.yml" - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.ratelimited.template.yml" - "templates/web.socketed.template.yml" # add this if using a reverse proxy params: db_default_text_search_config: "pg_catalog.english" env: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LANGUAGE: en_US.UTF-8 DISCOURSE_DEFAULT_LOCALE: en DISCOURSE_HOSTNAME: 'forum.yourdomain.com' DISCOURSE_DEVELOPER_EMAILS: '[email protected]' DISCOURSE_SMTP_ADDRESS: smtp.yourmailprovider.com DISCOURSE_SMTP_PORT: 587 DISCOURSE_SMTP_USER_NAME: your-smtp-user DISCOURSE_SMTP_PASSWORD: your-smtp-password # Uncomment the next line if you're behind a reverse proxy # DISCOURSE_SMTP_ENABLE_START_TLS: true volumes: - volume: host: /var/discourse/shared/standalone guest: /shared - volume: host: /var/discourse/shared/standalone/log/var-log guest: /var/log ./launcher rebuild app ./launcher rebuild app ./launcher rebuild app # Install Caddy -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | -weight: 600;">sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | -weight: 600;">sudo tee /etc/-weight: 500;">apt/sources.list.d/caddy-stable.list -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # Install Caddy -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | -weight: 600;">sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | -weight: 600;">sudo tee /etc/-weight: 500;">apt/sources.list.d/caddy-stable.list -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # Install Caddy -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | -weight: 600;">sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg -weight: 500;">curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | -weight: 600;">sudo tee /etc/-weight: 500;">apt/sources.list.d/caddy-stable.list -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update && -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # /etc/caddy/Caddyfile forum.yourdomain.com { reverse_proxy unix//var/discourse/shared/standalone/nginx.http.sock } # /etc/caddy/Caddyfile forum.yourdomain.com { reverse_proxy unix//var/discourse/shared/standalone/nginx.http.sock } # /etc/caddy/Caddyfile forum.yourdomain.com { reverse_proxy unix//var/discourse/shared/standalone/nginx.http.sock } # /etc/cron.d/discourse-backup # Run backup daily at 3am, then sync to remote storage 0 3 * * * root /var/discourse/launcher run app discourse backup 30 3 * * * root rsync -avz /var/discourse/shared/standalone/backups/ backup-user@your-backup-server:/backups/discourse/ # /etc/cron.d/discourse-backup # Run backup daily at 3am, then sync to remote storage 0 3 * * * root /var/discourse/launcher run app discourse backup 30 3 * * * root rsync -avz /var/discourse/shared/standalone/backups/ backup-user@your-backup-server:/backups/discourse/ # /etc/cron.d/discourse-backup # Run backup daily at 3am, then sync to remote storage 0 3 * * * root /var/discourse/launcher run app discourse backup 30 3 * * * root rsync -avz /var/discourse/shared/standalone/backups/ backup-user@your-backup-server:/backups/discourse/ - Slack's free tier message limits have changed multiple times - Discord servers get disabled with little warning or recourse - Hosted forum platforms shut down and give you weeks to export - API changes break integrations you depend on - Discourse — Ruby on Rails, PostgreSQL, Redis. The most fully-featured option. Great search, solid plugin ecosystem, handles large communities well. Heavier on resources. - Flarum — PHP, MySQL. Lightweight, modern UI, easier to extend if you know PHP. Smaller community but active development. - NodeBB — Node.js, MongoDB or Redis. Good real-time features, familiar stack if you're a JS developer. - Enable 2FA for all admin accounts immediately - Set up fail2ban to block brute-force attempts on your SSH and any exposed services - Configure unattended-upgrades so security patches apply automatically - Restrict SSH to key-based auth only — -weight: 500;">disable password login - Set up monitoring — even something simple like uptime checks so you know when things break - Updates: Discourse releases frequently. Run ./launcher rebuild app every few weeks. It takes about 5 minutes of downtime. - Disk space: Uploaded images and attachments add up. Monitor your disk usage. - Email reputation: If your SMTP setup isn't right, your forum's emails end up in spam. Check your SPF, DKIM, and DMARC records. - Spam: It will come. Discourse has decent built-in anti-spam tools, but you'll still need to tune settings as your community grows. - Every discussion is searchable and indexed by search engines, bringing in new community members organically - Knowledge doesn't disappear behind message limits - I own the data and can export it in standard formats anytime - The community feels more permanent, which encourages people to write longer, more thoughtful posts