Installing with Docker
Flute on your own Linux server with one command: install.sh sets up the database, Redis and the site, then HTTPS, updates and backups.
The install.sh script sets up a MariaDB database, Redis and the site on your server, and at the end prints the address and password for the web installer. You need a Linux server with Docker (what exactly) and, if you want HTTPS right away, a domain that already points at this server.
Installation
Download and run the script
git clone https://github.com/flute-cms/cms.git
cd cms
./install.shAnswer the questions
The script asks whether the site answers on port 80 itself or sits behind your proxy, whether you need Redis, and what the site address and port are. You can press Enter for everything: the defaults suit a clean server.
If nginx or Apache is already running on the server or port 80 is taken, the script notices it (Port :80 is already bound on this host) and offers to put the site behind a proxy. Agree if that web server is there for your other sites.
Wait for the address
The script generates passwords, builds the image and starts the containers. When the site answers, you see something like this:
Flute CMS is live
Open the URL below to finish the web installer
URL http://<YOUR_DOMAIN>
.env <SITE_DIR>/.env (chmod 0600 — keep secret)
Database credentials for the web wizard:
host db (container name on the 'flute' network)
port 3306
database flute
username flute
password <PASSWORD>Go through the web installer
Open the address from the output. The installer has already filled in the server, the database name and the user, so you only paste the password. The rest is the same as a regular installation.
The site did not answer within three minutes
The script shows the last lines of the log and stops. Most often the cause is right there. If not, look at docker compose logs php and docker compose logs release, fix the problem and run ./install.sh again: it keeps the existing .env with the passwords unless you agree to overwrite it.
HTTPS
Say you have a VPS and a domain whose A record already points at the server's IP, and the site opens at http://<YOUR_DOMAIN>. Put the domain and email in .env:
ACME_DOMAIN=<YOUR_DOMAIN>
ACME_EMAIL=<EMAIL>Then issue the certificate:
./docker/scripts/ssl-issue.shThe script gets a Let's Encrypt certificate, turns on its renewal and restarts the stack. All that is left is to open the settings in the admin panel and change the site address to https://<YOUR_DOMAIN>. The certificate renews on its own: the check runs every 12 hours, and nginx picks up the new certificate within an hour without a restart.
If port 443 on the server is already taken, install.sh publishes HTTPS on 8443. HTTPS_PORT in .env sets a different port.
If a proxy already sits in front
Traefik, Caddy, nginx on the server itself or Cloudflare Tunnel: choose the proxy mode in install.sh (or run it with --proxy). The container then takes no ports on the server and joins the Docker network web, where the proxy finds it by the name flute-app (unless you changed COMPOSE_PROJECT_NAME). The script puts ready-made config snippets for Caddy and Traefik into docker/snippets/. In this mode your proxy handles HTTPS.
If the domain is behind Cloudflare, the script also writes docker/snippets/cloudflare.conf. Include it in your server { } so the site sees the real visitor addresses.
Everyday commands
docker compose ps # what is running
docker compose logs -f php # site log
docker compose logs release # what the last run did
docker compose exec php php flute cache:clear # any flute command
docker compose down # stop everything, data staysYou do not need -f: install.sh wrote the list of stack files to COMPOSE_FILE in .env. All flute commands are in the CLI reference.
Updating
This is the default (FLUTE_IMAGE=flute-cms:local):
git pull && docker compose build && docker compose up -dThe one-off release container runs first. It puts the files of the new release in place, adds new keys to the config (your settings stay), applies migrations and rebuilds the cache. The site, background tasks and the queue start only after it.
Manual edits to engine files are lost
release replaces i18n/, the standard theme and storage/migrations/ with the files of the new release. Keep your changes in your own theme or module.
If after an update docker compose ps shows that php did not start, release failed. docker compose logs release shows the cause. Fix it and run docker compose up -d again: you can repeat this step as many times as you need.
Backups
You need to copy the database and the folders with the site files. The database lives in the Docker volume db_data. The files are in the project folders: storage/ (the saved settings are there too), public/uploads/, public/assets/uploads/, app/Modules/, app/Themes/ and i18n/. On an older install without FLUTE_CONFIG_DIR in .env, the settings live in config/, so copy that too. You do not have to copy the redis_data volume: it holds only sessions and cache.
The database dump can run automatically: add the backup profile to COMPOSE_PROFILES (for example COMPOSE_PROFILES=cache,backup). Once a day it puts a compressed dump into storage/backup and removes dumps older than a week. If a dump fails, the old copies stay in place, and docker compose logs db-backup tells you why.
install.sh --uninstall deletes the database
It stops the containers and removes the volumes with the data, .env and the templates. Make a backup first.
Reference
| Flag | What it does |
|---|---|
-y, --yes | installs without questions, with default values |
--no-redis | no Redis, cache and sessions in files |
--proxy | the site is behind an external proxy |
--standalone | the site takes a port on the server itself (default) |
--domain <YOUR_DOMAIN> | site address without asking |
--port 8080 | HTTP port on the server, only without a proxy |
--systemd | a flute.service unit that starts the stack when the server boots |
--doctor | check a stack that is already installed |
--reset | new database and Redis passwords and a restart |
--uninstall | stop and remove everything, the database included |
Flags take precedence over values saved in .env.
- Checks
docker,openssl, Docker Compose v2 and that the Docker daemon responds. - Inspects the server: disk space, memory, ports in use, a web server that is already running.
- Asks about the mode, the cache, the address and the port.
- Checks that the domain points at this server and notices Cloudflare.
- Generates the MariaDB and Redis passwords and writes them to
.envwith600permissions, together withPUIDandPGID. - Writes templates for an external proxy to
docker/snippets/. - Builds the image and starts
dbandredis, thenrelease, thenphp,cronandqueue. - If Redis did not start, offers to switch to the file cache.
- Waits up to three minutes for the site to answer on
/health/app. - Prints the address and the database details.
cp .env.example .envIn .env, replace MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD and REDIS_PASSWORD, and set PUID and PGID to the output of id -u and id -g for the owner of the site folder. Then:
docker compose up -d --buildWithout PUID and PGID, the image is built for uid 33 (www-data). Zero is not allowed: the site would run as root, so the build stops with an error. A stack started this way gets no COMPOSE_FILE, and the modes below are turned on with -f flags in every command.
| Mode | Command |
|---|---|
| standalone | docker compose up -d |
| behind a proxy | docker compose -f compose.yaml -f docker/compose.proxy.yaml up -d |
The network for the proxy mode is created once with docker network create web, and PROXY_NETWORK sets its name. In this mode nginx takes the visitor's address from X-Forwarded-For. Without a proxy, it does not accept that header.
List profiles separated by commas in COMPOSE_PROFILES.
| Profile | Service | Purpose |
|---|---|---|
cache | redis | Redis for cache and sessions. Without it, both are stored in files |
backup | db-backup | a database dump every BACKUP_INTERVAL_HOURS hours, kept for BACKUP_RETENTION_DAYS days |
ssl | certbot | certificate renewal. ssl-issue.sh turns it on |
The settings the installer and the admin panel save go to the FLUTE_CONFIG_DIR folder. In .env.example it is ./storage/config, outside the ./config that git tracks, so git pull does not trip over files the site rewrote. The site itself does not read .env: Compose passes it only the database and cache settings and APP_ENV.
If the .env of an older installation has no FLUTE_CONFIG_DIR, the site still writes to ./config. To move the settings:
docker compose down
cp -a config storage/config
echo 'FLUTE_CONFIG_DIR=./storage/config' >> .env
git checkout -- config
docker compose up -dThe site runs as the user with the PUID and PGID ids from .env. install.sh takes them from the owner of the site folder, so that user can edit files and run git pull without sudo. The ids are baked into the image at build time, so after you change them, run docker compose build && docker compose up -d.
The published image is built for uid 33 (www-data): with it, you can edit files on the server only with sudo. If you need your own ids, build the image on the server.
With every release, an image for amd64 and arm64 is published to ghcr.io/flute-cms/cms. Pin the version in .env:
FLUTE_IMAGE=ghcr.io/flute-cms/cms:<VERSION>The image already has ionCube Loader for paid modules.
| Variable | Default | What it changes |
|---|---|---|
COMPOSE_PROJECT_NAME | flute | prefix for container, volume and network names |
COMPOSE_PROFILES | cache | enabled profiles |
FLUTE_IMAGE | flute-cms:local | which image to build or pull |
PHP_VERSION | 8.3 | PHP version for the image build |
PUID, PGID | 1000 in .env.example, 33 if not set | the user the site runs as |
FLUTE_CONFIG_DIR | ./storage/config in .env.example, ./config if not set | where the site stores settings |
APP_ENV | production | application environment |
HTTP_PORT | 80 | HTTP port on the server without a proxy |
HTTPS_PORT | 443 | HTTPS port, appears after ssl-issue.sh |
MYSQL_DATABASE, MYSQL_USER | flute | database name and user |
MYSQL_PASSWORD, MYSQL_ROOT_PASSWORD | none, required | database passwords |
REDIS_PASSWORD | none | Redis password |
REDIS_MAXMEMORY | 256mb | Redis memory limit |
CACHE_DRIVER | redis in .env.example, file if not set | where cache and sessions live |
APP_CPUS, APP_MEMORY | 2.0, 1G | site container limits |
APP_PROCESSES | 16 | how many requests the site serves at once, about 50 MB of APP_MEMORY each |
DB_CPUS, DB_MEMORY, DB_INNODB_BUFFER | 2.0, 1G, 256M | MariaDB limits and buffer |
BACKUP_INTERVAL_HOURS, BACKUP_RETENTION_DAYS | 24, 7 | backup profile |
ACME_DOMAIN, ACME_EMAIL | none | ssl-issue.sh and the ssl profile |
PROXY_NETWORK | web | Docker network for the proxy mode |