Deploy Flarum

Flarum 2.0 forum with MySQL, persistent uploads and a generated admin login

Deploy Flarum

MySQL

mysql:8

Just deployed

/var/lib/mysql

/data

Deploy and Host Flarum on Railway

Flarum is free, open-source forum software (MIT licence) built in PHP. It gives a community a fast single-page discussion board with tags, mentions, likes, flags, moderation and private messages, plus an admin panel and an extension system for adding features. This template deploys Flarum 2.0.2.

About Hosting Flarum

Flarum needs a PHP web server (nginx and PHP-FPM), a MySQL or MariaDB database, persistent storage for uploads, avatars and compiled assets, and a scheduler that runs every minute. This template deploys two services: Flarum, built from our GitHub repo on a version- and digest-pinned image, with a public domain, a health check and a volume at /data; and MySQL, Railway's database on its own volume, reached over the private network. The first boot installs Flarum and creates your admin account, which takes about a minute. Mail (SMTP) is set later in the admin panel.

Common Use Cases

  • A community or support forum for a product, open-source project or game
  • An internal discussion board for a team, club or class
  • A replacement for a mailing list or a closed chat group, with searchable public threads

Dependencies for Flarum Hosting

  • Flarum service (nginx, PHP-FPM 8.5 and the scheduler in one container), built from the template's GitHub repo
  • MySQL database (Railway's MySQL service) with its own volume

Deployment Dependencies

Implementation Details

After deploy: open the Flarum service's domain and log in as admin with the password in the Flarum service's Variables tab (FLARUM_ADMIN_PASSWORD, generated for you). Then, in Administration, set the forum title and description, and configure Email with your SMTP provider so sign-up confirmations and password resets are sent. Nothing needs filling in at deploy time.

Services: Flarum serves the forum on the public domain and keeps uploads, assets, storage and the list of extra extensions on its /data volume. MySQL stores the forum's data on its own volume and is reachable only on the private network.

Options: to use a custom domain, add it to the Flarum service and set FLARUM_BASE_URL to https://forum.example.com. UPLOAD_MAX_SIZE (default 32M) and MEMORY_LIMIT (default 256M) can be set on the same service. Extensions added with extension require vendor/package from the service's shell are reinstalled on each start.

Updates: when we publish a new Flarum version to the template repo, Railway shows an "update available" notice in your project. Read the repo's CHANGELOG.md, back up MySQL, then apply it; Flarum runs its database migrations on start.

Why Deploy Flarum 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 Flarum 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
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0