Self-host Flarum with Levelrail

A modern forum platform with a clean interface and extensions.

  • Authorflarum
  • LicenceMIT
  • Memory256 MiB
  • Services2

How to self-host Flarum

  1. Pull the images

    2 images are pulled on your server.

    Show images
    • mariadb:11.4
    • crazymax/flarum:1.8.20
  2. Create the app

    2 services start in a single Compose app, with 2 named volume mounts for your data, on port 8000.

  3. Fill in the secrets

    4 secrets are generated and stored encrypted, 6 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Flarum requirements

Memory
About 256 MiB
Architectures
amd64 unknown, arm64 unknown
Ports
8000
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
MIT, permissive license
  • Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Flarum. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Flarum docs page.

Deploy Flarum your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Flarum from the CLI

levelrail-cli templates deploy flarum --name my-flarum

Deploy Flarum with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/flarum/deploy

Flarum configuration

Flarum services

ServiceImagePortsVolumes
db mariadb:11.4 none flarum_db_data -> /var/lib/mysql
flarum crazymax/flarum:1.8.20 8000 flarum_data -> /data

Flarum environment variables

VariableServiceValue
MYSQL_DATABASE db Preset by the template
MYSQL_PASSWORD db Generated at deploy
MYSQL_ROOT_PASSWORD db Generated at deploy
MYSQL_USER db Preset by the template
DB_HOST flarum Preset by the template
DB_NAME flarum Preset by the template
DB_PASSWORD flarum Generated at deploy
DB_USER flarum Preset by the template
Show all 10 variables
  • FLARUM_ADMIN_PASSflarumGenerated at deploy
  • FLARUM_BASE_URLflarumPreset by the template

Ports and volumes

Ports
8000
Volumes
2 named mounts: flarum_db_data -> /var/lib/mysql, flarum_data -> /data

Flarum FAQ

How much memory does Flarum need?

The catalog lists about 256 MiB of memory for Flarum across its 2 services.

Does Flarum run on arm64?

For Flarum, arm64 support is not confirmed; amd64 is unknown.

What licence is Flarum under?

Flarum is licensed under MIT, which is permissive, with few conditions on reuse.

Does Flarum need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Flarum bundle?

The template includes MySQL, running as its own service.

Which ports does Flarum use?

Flarum listens on port 8000 inside the stack.

Where does Flarum keep its data?

In named volumes: flarum_db_data mounted at /var/lib/mysql and flarum_data mounted at /data.

Can I deploy Flarum on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id flarum for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mariadb:11.4, crazymax/flarum:1.8.20 is what you deploy there.

levelrail-cli templates deploy flarum --name my-flarum