Deploy Discourse

Open-source community forum with admin ready on first boot

Deploy Discourse

/shared

/var/lib/postgresql

Just deployed

/data

Deploy and Host Discourse on Railway

Discourse is an open-source discussion platform for communities, support forums and team knowledge. It combines threaded topics, categories, real-time chat, notifications, trust levels and moderation tools in one web app, with a mobile-friendly interface and a full API. It is maintained by Civilized Discourse Construction Kit.

About Hosting Discourse

Discourse is a Ruby on Rails app that needs PostgreSQL, Redis, background workers (Sidekiq) and a web server in front. This template runs Discourse 2026.11.0-latest.1 from Discourse's own prebuilt image, with nginx, the app and Sidekiq in one service, PostgreSQL 18 with pgvector, and Railway's Redis. On first boot it creates the database, runs migrations and creates your admin account from the email you enter and a generated password, so you can log in without a mail server. Uploads, backups and the database live on volumes. You only add SMTP settings later so the forum can send email.

Common Use Cases

  • Community forum for a product, open-source project or creator audience
  • Customer support and knowledge base with searchable, solved answers
  • Internal team discussions, announcements and long-form decisions

Dependencies for Discourse Hosting

  • PostgreSQL with the pgvector extension (included, built from this template's repo)
  • Redis (included, Railway's Redis)

Deployment Dependencies

Implementation Details

You answer one prompt: DISCOURSE_DEVELOPER_EMAILS, your email. After the deploy finishes (about 3 to 5 minutes), open the Discourse service's URL and log in with that email and the password in the Discourse service's ADMIN_PASSWORD variable. The setup wizard then guides you through the forum's name and settings.

Email is needed for sign-ups, password resets and notifications. Add these variables to the Discourse service and redeploy:

DISCOURSE_SMTP_ADDRESS=smtp.example.com
DISCOURSE_SMTP_PORT=587
DISCOURSE_SMTP_USER_NAME=YOUR-SMTP-USER
DISCOURSE_SMTP_PASSWORD=YOUR-SMTP-PASSWORD
DISCOURSE_NOTIFICATION_EMAIL=noreply@YOUR-DOMAIN

For a custom domain, add it to the Discourse service and set DISCOURSE_HOSTNAME to it.

The discourse/discourse image is built and published by the Discourse team from the same configuration as the standard install, but Discourse still calls it experimental and supports only the standard install. Take regular backups (Admin, Backups) and update by applying this template's updates, not with the in-app updater. Plugins can't be added to the prebuilt image.

Why Deploy Discourse on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Discourse on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Libredesk - Complete Setup
Complete self-hosted omnichannel customer support desk.

codestorm
2
View Template
Paperless-ngx
Paperless-ngx — document management with OCR and full-text search

INAPP
1
View Template
Instatic CMS - Postgres
Design, build and manage powerful static sites from state-of-the-art CMS

Instatic
168