---
title: "Deploy Community Forum"
description: "One click Deploy Flarum,Unlimited extensions,Completly Free"
category: "Other"
url: https://railway.com/deploy/communityforum
---

# Deploy Community Forum

One click Deploy Flarum,Unlimited extensions,Completly Free

**[Deploy Community Forum on Railway](https://railway.com/template/communityforum)**

- **Category:** Other

## Template content

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

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

### Community Forum

- **Image:** crazymax/flarum:latest
- **Public domain:** Yes

## Documentation

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

```env
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:

1. Open the **Flarum** service.
2. Navigate to **Settings → Volumes**.
3. Select **Add Volume**.
4. Mount the volume at:

```text
/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:

1. Generate a Railway public domain.
2. Open the generated URL.
3. Log in using the default administrator account:

   * **Username:** `flarum`
   * **Password:** `flarum`
4. Change the administrator password immediately after your first login.
5. 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/communityforum
