Configuration
Every setting Mavri reads from its environment, with defaults and what each one does.
Mavri needs no configuration to start. These variables let you change the port, put it behind HTTPS, pin the encryption key or turn the version check off. Set them in your compose file, or on the command line before docker compose up.
| Variable | Default | What it does |
|---|---|---|
PORT | 3001 | Port the server listens on inside the container. |
HOST | 0.0.0.0 | Address the server binds to. |
DB_DIRECTORY | /data in the image | Folder that holds the SQLite database, the session secret and the encryption key. Back this up. |
DB_FILE | mavri.db | Name of the database file inside DB_DIRECTORY. |
COOKIE_SECURE | off | Set to true only when Mavri is served over real HTTPS, so the session cookie is marked Secure. |
TRUST_PROXY | 0 | How many reverse proxies sit in front of Mavri. 0 for direct access, 1 behind nginx, Caddy or a Cloudflare Tunnel, so rate limits see the real client address. |
ENCRYPTION_KEY | generated in the data folder | Key that protects store webhook secrets: 32 random bytes in base64. Create one with openssl rand -base64 32. Keep it safe: without it, stored secrets cannot be read. |
UPDATE_CHECK | on | Set to off and Mavri never contacts GitHub or the container registry. |
UPDATE_REPO | Raktim94/mavri | Repository the version check reads. Useful for a fork. |
UPDATE_CHECK_URL | that repository’s package.json | Overrides the address the version check fetches. |
UPDATER_URL, UPDATER_TOKEN | unset | Turn on the Update now button: the address of the updater container and the token they share. The CasaOS app sets both. |
FRONTEND_DIR | /app/dist-fe in the image | Folder with the built web app. Only change it when developing. |
HOST_PORT | 3001 | Docker Compose only: the port published on your machine (HOST_PORT=8080 docker compose up -d --build). |
MAVRI_API_KEY | unset | mavri-mcp only: an API key created in Settings. |
Examples
Behind HTTPS
COOKIE_SECURE=true TRUST_PROXY=1 docker compose up -d --buildA different port
HOST_PORT=8080 docker compose up -d --buildPin the encryption key
openssl rand -base64 32
# put the result in your compose file or environment as ENCRYPTION_KEYStore the key with your backups. Without it, webhook secrets saved in the database cannot be decrypted after a rebuild.
No outside connections at all
UPDATE_CHECK=off docker compose up -d --buildPorts and data
- Docker Compose: port
3001(change withHOST_PORT); data in themavri-datavolume, mounted at/data. - CasaOS and ZimaOS: port
8473; data in/DATA/AppData/nodedr-invoice/data.
Next: User guide · CasaOS install · Back up Mavri.
Taken from the server’s configuration code, the Dockerfile and the compose files of Mavri.