💡 Want to be notified of new releases? Check out 🔔 Diun (Docker Image Update Notifier) project!
git clone https://github.com/crazy-max/docker-flarum.git cd docker-flarum # Build image and output to docker (default) docker buildx bake # Build multi-platform image docker buildx bake image-all
|GitHub Container Registry||
Following platforms for this image are available:
$ docker run --rm mplatform/mquery crazymax/flarum:latest Image: crazymax/flarum:latest * Manifest List: Yes * Supported platforms: - linux/amd64 - linux/arm/v6 - linux/arm/v7 - linux/arm64
TZ: The timezone assigned to the container (default
PUID: Flarum user id (default
PGID: Flarum group id (default
MEMORY_LIMIT: PHP memory limit (default
UPLOAD_MAX_SIZE: Upload max size (default
CLEAR_ENV: Clear environment in FPM workers (default
OPCACHE_MEM_SIZE: PHP OpCache memory consumption (default
LISTEN_IPV6: Enable IPv6 for Nginx (default
REAL_IP_FROM: Trusted addresses that are known to send correct replacement addresses (default
REAL_IP_HEADER: Request header field whose value will be used to replace the client address (default
LOG_IP_VAR: Use another variable to retrieve the remote IP address for access log_format on Nginx. (default
FLARUM_DEBUG: Enables or disables debug mode, used to troubleshoot issues (default
FLARUM_BASE_URL: The URL to your Flarum installation required
FLARUM_FORUM_TITLE: Flarum forum title, only used during first installation (default
FLARUM_API_PATH: Flarum api path (default
FLARUM_ADMIN_PATH: Flarum admin path (default
FLARUM_POWEREDBY_HEADER: Set Flarum's
FLARUM_REFERRER_POLICY: Referrer policy (default
DB_HOST: MySQL database hostname / IP address required
DB_PORT: MySQL database port (default
DB_NAME: MySQL database name (default
DB_USER: MySQL user (default
DB_PASSWORD: MySQL password
DB_PREFIX: MySQL database prefix (default
DB_TIMEOUT: Time in seconds after which we stop trying to reach the MySQL server (useful for clusters, default
DB_PASSWORD_FILEcan be used to fill in the value from a file, especially for Docker's secrets feature.
/data: Contains assets, extensions and storage
⚠️ Note that the volume should be owned by the user/group with the specified
PGID. If you don't give the volume correct permissions, the container may not start.
8000: HTTP port
Docker compose is the recommended way to run this image. You can use the following docker compose template, then run the container:
docker-compose up -d docker-compose logs -f
You can also use the following minimal command:
docker run -d -p 8000:8000 --name flarum \ -v $(pwd)/data:/data \ -e "DB_HOST=db" \ -e "FLARUM_BASE_URL=http://127.0.0.1:8000" \ crazymax/flarum:latest
dbmust be a running MySQL instance
You can upgrade Flarum automatically through the UI, it works well. But I recommend to recreate the container whenever I push an update:
docker-compose pull docker-compose up -d
On first launch, an initial administrator user will be created:
docker-compose exec flarum extension require <package>
To remove an extension:
docker-compose exec flarum extension remove <package>
To list all extensions:
docker-compose exec flarum extension list
$ docker-compose exec flarum extension require fof/upload Using version ^1.0 for fof/upload ./composer.json has been updated Running composer update fof/upload Loading composer repositories with package information Updating dependencies Lock file operations: 5 installs, 0 updates, 0 removals - Locking fof/upload (1.0.0) - Locking guzzlehttp/guzzle (7.3.0) - Locking guzzlehttp/promises (1.4.1) - Locking psr/http-client (1.0.1) - Locking softcreatr/php-mime-detector (3.2.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 5 installs, 0 updates, 0 removals - Downloading softcreatr/php-mime-detector (3.2.0) - Downloading psr/http-client (1.0.1) - Downloading guzzlehttp/promises (1.4.1) - Downloading guzzlehttp/guzzle (7.3.0) - Downloading fof/upload (1.0.0) - Installing softcreatr/php-mime-detector (3.2.0): Extracting archive - Installing psr/http-client (1.0.1): Extracting archive - Installing guzzlehttp/promises (1.4.1): Extracting archive - Installing guzzlehttp/guzzle (7.3.0): Extracting archive - Installing fof/upload (1.0.0): Extracting archive 2 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files 70 packages you are using are looking for funding. Use the `composer fund` command to find out more! fof/upload extension added Clearing the cache...
⚠️ You cannot use Bazaar marketplace extension to install extensions for now.
You can use our SMTP relay
msmtpd service published on port
2500 and declared in our
Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a Paypal donation to ensure this journey continues indefinitely!
Thanks again for your support, it is much appreciated! 🙏
LICENSE for more details.