Railway

Deploy NodeBB | (Just Updated) Discourse Alternative That Actually Boots

Forum that boots: admin seeded before launch, uploads survive redeploys.

Deploy NodeBB | (Just Updated) Discourse Alternative That Actually Boots

Just deployed

/data

Just deployed

/var/lib/postgresql

Deploy and Host NodeBB on Railway

NodeBB is an open-source forum platform — real-time discussions, categories, topics, tags, notifications, moderation tools, a REST API and a plugin ecosystem. It is the self-hosted alternative to Discourse and to hosted community platforms, and it runs on Node.js with PostgreSQL.

This template deploys NodeBB 4.15.1 with PostgreSQL 17, both on volumes, with the forum installed and its administrator account already created before the URL is ever served.

About Hosting NodeBB

NodeBB is a long-running Node.js process that reads and writes constantly: sessions, topic and post indexes, notification queues, uploads and the compiled front-end bundle. It needs a persistent database, a writable data directory for uploads and build output, and a stable public URL, because the URL is baked into its configuration and used for links, notifications and websockets.

Three things make it easy to get wrong on a platform that redeploys containers:

  • Its configuration file has to be valid JSON. Several deployment recipes build it inside a shell start command; the shell strips the quoting and NodeBB refuses to start.
  • With no configuration present, NodeBB serves a public web installer, so whoever opens the URL first becomes the administrator.
  • Uploads, build output and the configuration must live on a volume, and the volume is mounted as root while NodeBB runs unprivileged.

This template handles all three. The configuration is written with a JSON encoder, the forum is installed non-interactively before the port is bound, and the volume ownership is repaired at boot. The administrator password is re-applied on every boot, so a redeploy is a working password reset — useful, because NodeBB's own recovery path is an emailed link and a fresh deployment has no mail server.

Why Deploy NodeBB on Railway?

Railway gives NodeBB the two things it needs and nothing it does not: a managed PostgreSQL neighbour on the private network, and persistent volumes for the forum's data directory. There is no server to patch and no reverse proxy to configure — TLS and the public domain are provisioned for you, and the forum is told its own URL automatically.

Scaling is a slider rather than a migration: a busy forum gets more memory without moving hosts, and a quiet one costs very little because billing follows usage.

Common Use Cases

  • A community forum for a product, game or open-source project
  • A private members' or customer support forum, with registration restricted from the admin panel
  • A discussion layer alongside an existing site, using NodeBB's REST API and SSO plugins

Dependencies for NodeBB Hosting

  • PostgreSQL 17 (included in this template, on its own volume)
  • A persistent volume for the forum's configuration, uploads and build output

Deployment Dependencies

Implementation Details

Sign in at /login as admin with the generated NODEBB_ADMIN_PASSWORD shown in the service variables. Change the password from the admin panel, or change the variable and redeploy — the password is re-applied on every boot. Registration settings, categories and plugins are all managed from /admin.


Template Content

More templates in this category

View Template
Pixelfed
Explore + Share beautiful photos and videos on the Fediverse

Evan Boehs
29
View Template
Hexo
Self-hosted Hexo blog with editor, comments, and S3 storage

INAPP
1
View Template
NEW
Bluesky PDS (Atproto Spaces Alpha)
"The Atproto Spaces Alpha" version of Bluesky PDS.

mkizka
0