Skip to content
Guilherme Cardoso edited this page Sep 13, 2026 · 1 revision

Docker

Prepare persistent files

The Compose file bind-mounts the database and attachment directory. Create both targets before starting; otherwise Compose can create a directory named flights.db, causing the server to fail.

touch flights.db
mkdir -p flight_plans

Configure

At minimum, set an ingest token and either configure TLS or explicitly accept plaintext traffic on a trusted LAN:

export INGEST_TOKEN="$(openssl rand -hex 24)"
export ALLOW_PLAINTEXT_HTTP=1
docker compose build

Prefer TLS. Mount a certificate directory read-only in docker-compose.yml and set TLS_CERT_FILE and TLS_KEY_FILE to their in-container paths. See Configuration and Security.

Create or reset the operator

docker compose run has no interactive TTY in this form, so the setup command reads the password from standard input:

printf '%s\n' "$PW" | \
  docker compose run --rm -T msfslogger node dist/setPassword.js

Start the service after the account exists:

docker compose up -d

Open http://<server>:3000 or https://<server>:3000, depending on the configured protocol.

Persistent data and SQLite WAL

The Compose mounts are:

volumes:
  - ./flights.db:/app/flights.db
  - ./flight_plans:/app/flight_plans

SQLite also writes flights.db-wal and flights.db-shm. They are not separate bind mounts and reside in the container. A graceful docker compose stop or docker compose down lets the server checkpoint the WAL. A hard kill, OOM, or crash can strand recent data.

Use the application's online backup command rather than copying the open database. Choose a destination that is bind-mounted or copy the completed backup directory out of the container before recreating it:

docker compose exec msfslogger npm run backup

See Operations and Backups.

Rebuild

docker compose up --build -d

PDF export

The production image installs Alpine's native Chromium and fonts because Puppeteer's glibc Chromium does not run on Alpine musl. Compose also uses init: true so Chromium child processes are reaped. No separate browser installation is required in the provided image.

Clone this wiki locally