Skip to content
Edit this page

Configuration

HomeVault works without any configuration. Everything you'd normally change is set in the UI. The environment variables below are for special setups.

Environment variables

Variable Default (in the image) Purpose
DATA_PATH /homevault Root data directory. Floor-plan maps are stored under maps/ here.
DB_PATH /homevault/db/homevault.db SQLite database file.
IMAGES_PATH /homevault/images Uploaded photos and thumbnails.
BACKUP_PATH /homevault/backups Where backup ZIPs are written.
IMAGE_FORMAT webp Encoding for uploaded photos: webp, jpeg or avif. AVIF needs avifenc, which the image includes; without it WebP is used.
AUDIT_RETENTION_DAYS 365 How long change history and deleted files are kept. 0 keeps them for ever.
LOG_LEVEL info trace, debug, info, warn or error. Use warn in production and debug for troubleshooting.
LOG_FORMAT json json or console (human-readable).
RATE_LIMIT_RPS 50 Requests per second per client address. 0 disables.
UPLOAD_RATE_LIMIT_RPS 2 Uploads per second per client address, after a burst of 60. 0 disables.
UPDATE_CHECK true false forbids the daily check for a newer release, whatever the setting in the app says.
PORT 5959 Port the web app listens on inside the container.
BACKEND_PORT 59234 Internal API port. Only change it if it clashes inside the container.
BACKEND_URL http://127.0.0.1:59234 Where the web app's proxy finds the API. Keep it in sync with BACKEND_PORT.
BIND_ADDR 127.0.0.1 Address the API listens on. Leave it on loopback in the container.
PUID, PGID 1000 User and group the API runs as; they own the data folder.
TRUST_PROXY false true behind a reverse proxy that sets X-Forwarded-For.
ALLOWED_HOSTS empty (any) Comma separated host names the web app answers to. Loopback is always allowed.
BACKUP_TARGET_ROOTS /mnt:/media:/backups:/nas Directories (colon separated) a Local backup destination may be inside.
NAS_MOUNT false true starts the root mount helper. Set by docker-compose.nas.yml.
NAS_MOUNT_WITHOUT_LOGIN false true allows setting up mounts while login is off.
SECRET_KEY_FILE empty File holding the key for the stored secrets. Empty uses config/secret.key in the data folder, created on first start.

When running the Go backend outside Docker, the defaults are relative (./data/...) and BACKEND_PORT defaults to 8080. See Development.

Data directory layout

Everything that matters lives in the single volume mounted at /homevault:

data/                         ← ./data on the host
├── db/
│   ├── homevault.db          ← SQLite database (WAL mode)
│   ├── homevault.db-wal      ← write-ahead log (normal, do not delete while running)
│   └── homevault.db-shm
├── images/
│   ├── items/<item-id>/<uuid>.webp            ← 800 px main image
│   ├── items/<item-id>/thumb_{150,300,600}_<uuid>.webp
│   ├── containers/<container-id>/…
│   ├── attachments/<item-id>/<uuid>.pdf       ← documents attached to items
│   └── .trash/                                ← deleted files, not backed up
├── maps/floors/floor_<id>_<timestamp>.png      ← floor plans
├── backups/
│   ├── homevault-data-YYYYMMDD-HHMMSS.zip      ← database + JSON export
│   └── homevault-images-YYYYMMDD-HHMMSS.zip    ← image tree
└── config/
    ├── auth.json                               ← user accounts, once login is on
    └── secret.key                              ← key for the stored NAS and S3 secrets

A plain file copy of data/ while the container is stopped is also a complete backup. It includes config/secret.key, so protect that copy, or keep the key elsewhere (see Stored secrets).

Time zone

The scheduled backup time (for example 02:00) is interpreted in the container's local time. The image does not include time-zone data, so it uses UTC unless you mount the host's zone file, as the examples above do:

    volumes:
      - /etc/localtime:/etc/localtime:ro

Setting the TZ variable alone has no effect in this image.