Skip to Content
Getting started

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.sh

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

.env
ACME_DOMAIN=<YOUR_DOMAIN>
ACME_EMAIL=<EMAIL>

Then issue the certificate:

./docker/scripts/ssl-issue.sh

The 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 stays

You 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 -d

The 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

Next: first steps after installation.

On this page