Deploy Community Forum
One click Deploy Flarum,Unlimited extensions,Completly Free
MySQL
Just deployed
/var/lib/mysql
Community Forum
Just deployed
Deploy and Host Community Forum on Railway
Flarum is a modern, open-source community forum platform designed for fast, engaging discussions. Built with PHP and a single-page application frontend, it delivers a responsive user experience while supporting a rich extension ecosystem for authentication, file uploads, moderation, SEO, and community management. It is lightweight, highly customizable, and suitable for communities of all sizes.
About Hosting Community Forum
Hosting Flarum on Railway provides a production-ready environment for running your own community forum without managing servers or web infrastructure. This template deploys the Flarum application alongside a MySQL database for persistent forum data and a Railway Volume for uploads, extensions, and application storage. Railway automatically provisions HTTPS, private networking, and environment variable management, allowing Flarum and MySQL to communicate securely. Whether you're building a customer support forum, an internal discussion platform, or a public online community, Railway simplifies deployment while making it easy to scale resources as your community grows.
Common Use Cases
- Build customer support forums for products, SaaS applications, or open-source projects.
- Create online communities for hobbies, gaming, education, or professional organizations.
- Host private discussion boards for teams, companies, or member-only communities.
Dependencies for CommunityForum Hosting
| Dependency | Purpose |
|---|---|
| MySQL | Stores users, discussions, posts, notifications, and forum configuration. |
| Railway Volume | Persists uploaded files, extensions, avatars, and forum assets. |
Deployment Dependencies
| Resource | Link |
|---|---|
| Official Documentation | https://docs.flarum.org |
| Flarum Website | https://flarum.org |
| Docker Image | https://hub.docker.com/r/crazymax/flarum |
| GitHub Repository | https://github.com/crazy-max/docker-flarum |
Implementation Details
Docker
This template deploys the following services:
| Service | Image |
|---|---|
| Flarum | crazymax/flarum:latest |
| MySQL | mysql:9.4 |
Railway automatically deploys both services without requiring custom build or start commands.
Public Networking
| Setting | Value |
|---|---|
| Proxy Type | HTTP Proxy |
| Target Port | 8000 |
Generate a Railway domain from Settings → Networking → Generate Domain to make your forum publicly accessible over HTTPS.
Environment Variables
| Variable | Required | Description |
|---|---|---|
FLARUM_BASE_URL | Yes | Public URL of your Railway deployment. |
DB_HOST | Yes | Railway MySQL private hostname. |
DB_NAME | Yes | MySQL database name. |
DB_USER | Yes | MySQL username. |
DB_PASSWORD | Yes | MySQL password. |
FLARUM_FORUM_TITLE | No | Forum title used during the initial installation. |
UPLOAD_MAX_SIZE | No | Maximum upload size for attachments. |
MEMORY_LIMIT | No | PHP memory limit. |
REAL_IP_FROM | No | Trusted proxy CIDR configuration. |
Example:
FLARUM_BASE_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
DB_HOST=${{MySQL.MYSQLHOST}}
DB_NAME=${{MySQL.MYSQLDATABASE}}
DB_USER=${{MySQL.MYSQLUSER}}
DB_PASSWORD=${{MySQL.MYSQLPASSWORD}}
FLARUM_FORUM_TITLE=My Community
UPLOAD_MAX_SIZE=50M
MEMORY_LIMIT=256M
REAL_IP_FROM=0.0.0.0/0
Use Railway reference variables to automatically configure the MySQL connection.
Persistent Storage
Flarum requires persistent storage for uploaded files, extensions, avatars, and application assets.
Add a Railway Volume:
- Open the Flarum service.
- Navigate to Settings → Volumes.
- Select Add Volume.
- Mount the volume at:
/data
This ensures forum uploads, installed extensions, and configuration persist across deployments and updates.
Database
This template requires a MySQL service.
- Add the Railway MySQL service.
- Configure the database connection using the Railway reference variables shown above.
- MySQL stores all persistent forum data, including users, discussions, posts, notifications, and extension state.
Build & Start
The application is deployed from the official Docker image.
No custom build or start commands are required.
Accessing the Application
After deployment:
-
Generate a Railway public domain.
-
Open the generated URL.
-
Log in using the default administrator account:
- Username:
flarum - Password:
flarum
- Username:
-
Change the administrator password immediately after your first login.
-
Open the Admin Dashboard to configure your forum title, enable extensions, create tags, and customize your community.
Extensions can be installed through the built-in Extension Manager. Installed extensions and uploaded assets remain available after redeployments because they are stored on the Railway Volume.
Why Deploy Community Forum 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 Community Forum 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
MySQL
mysql:9.4Community Forum
crazymax/flarum:latest