---
title: "Deploy Flarum"
description: "Flarum 2.0 forum with MySQL, persistent uploads and a generated admin login"
category: "Other"
url: https://railway.com/deploy/flarum-1
---

# Deploy Flarum

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

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

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

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

## Template content

### MySQL https://devicons.railway.app/i/mysql.svg

- **Image:** mysql:8
- **Start command:** `docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G`

### Flarum https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/flarum.png

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

## Documentation

# 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

* Flarum: https://flarum.org and the 2.0 release notes at https://github.com/flarum/framework/releases
* Flarum documentation: https://docs.flarum.org
* Base image: https://github.com/crazy-max/docker-flarum (`crazymax/flarum:2.0.2`, pinned by digest)
* Template repo: https://github.com/aalfath/flarum-railway-template

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



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

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