---
title: "Deploy Discourse"
description: "Open-source community forum with admin ready on first boot"
category: "CMS"
url: https://railway.com/deploy/discourse-1
---

# Deploy Discourse

Open-source community forum with admin ready on first boot

**[Deploy Discourse on Railway](https://railway.com/template/discourse-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/discourse-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** CMS

## Template content

### Discourse https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/discourse.png

- **Source:** https://github.com/aalfath/discourse-railway-template
- **Health check:** /srv/status
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/postgresql.png

- **Source:** https://github.com/aalfath/discourse-railway-template

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# 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

* Discourse source and releases: https://github.com/discourse/discourse/releases
* Discourse image: https://hub.docker.com/r/discourse/discourse
* Template repo (Dockerfiles, changelog): https://github.com/aalfath/discourse-railway-template
* Discourse's official install guide: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md

### 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.



## Similar templates

- [Libredesk - Complete Setup](https://railway.com/deploy/libredesk-complete-setup) — Complete self-hosted omnichannel customer support desk.
- [Paperless-ngx](https://railway.com/deploy/paperless-ngx-3) — Paperless-ngx — document management with OCR and full-text search
- [Instatic CMS - Postgres](https://railway.com/deploy/instatic-cms-postgres) — Design, build and manage powerful static sites from state-of-the-art CMS

Open this page in a browser: https://railway.com/deploy/discourse-1
