Repository navigation
Installation
The image is multi-architecture (linux/amd64, linux/arm64) and contains
everything: the Go API, the Next.js web app and SQLite.
Recommended setup. No privileges beyond starting up. Backups go to the local volume, or to a NAS you mount on the host yourself:
services:
homevault:
image: ghcr.io/jnanadarshan/homevault:latest
container_name: homevault
restart: unless-stopped
ports:
- "5959:5959"
volumes:
# Left side: any folder on the host (database, images, backups), e.g.
# /home/youruser/appdata/homevault:/homevault
- ./data:/homevault
- /etc/localtime:/etc/localtime:ro # time zone for backup schedules
# PUID/PGID: owner of the files in the data folder (run `id` for yours).
environment:
- PUID=1000
- PGID=1000
- LOG_LEVEL=warn
# Hardening. Never use "privileged: true".
cap_drop: [ALL]
cap_add: # start-up supervisor only
- CHOWN
- DAC_OVERRIDE
- SETUID
- SETGID
- KILL
security_opt: ["no-new-privileges:true"]
read_only: true
tmpfs: [/tmp, /run, /data/backups]
pids_limit: 256
# Limits sized for a Raspberry Pi
mem_limit: 1g
cpus: 2
logging:
driver: json-file
options: { max-size: "10m", max-file: "3" }In the data volume, change only the left side: it can be any folder dedicated to
HomeVault, such as /home/youruser/appdata/homevault. Keep /homevault on the
right. If your user or group id isn't 1000 (run id), change PUID and PGID;
the contents of the folder are handed to them at start.
NAS backups, the safer way: mount the share on the host (/etc/fstab,
autofs) or as a Docker volume, make it writable for PUID, bind it into the
container (for example - /mnt/nas/homevault:/mnt/nas), and set the backup
target to Mount type: Local, path /mnt/nas. No extra privileges needed.
Start it:
docker compose up -d
docker compose logs -f homevault # watch the first startOn the first start HomeVault creates db, images, backups and config in
the data folder and initialises the database.
If HomeVault has to mount the share itself, use docker-compose.nas.yml instead of the file above. It is a complete compose file; change the data volume mapping. It uses the published image. Then run:
docker compose -f docker-compose.nas.yml up -dCompared with the standard file it sets NAS_MOUNT=true, adds SYS_ADMIN,
DAC_READ_SEARCH and SETPCAP, and turns AppArmor off for the container. Only a
small root helper uses the capabilities; see
Security. Never use privileged: true. Turn on
a login before setting up the mount. Add -f docker-compose.nas.yml to every
later docker compose command, including updates.
docker run -d --name homevault --restart unless-stopped \
-p 5959:5959 \
-e PUID=1000 -e PGID=1000 -e LOG_LEVEL=warn \
--cap-drop ALL --cap-add CHOWN --cap-add DAC_OVERRIDE --cap-add SETUID \
--cap-add SETGID --cap-add KILL --security-opt no-new-privileges:true \
-v "$PWD/data:/homevault" \
-v /etc/localtime:/etc/localtime:ro \
ghcr.io/jnanadarshan/homevault:latestHomeVault runs well on a Raspberry Pi 4 or 5 with 2 GB of RAM or more,
running a 64-bit OS (arm64). 32-bit Raspberry Pi OS is not supported.
- Store
./dataon an SSD rather than the SD card if you can. - Keep
LOG_LEVEL=warnand the log rotation shown above. Successful requests are only logged atdebug. -
docs/SSD_OPTIMIZATION.md explains how HomeVault
keeps disk writes low and includes a host tuning script
(
scripts/pi-ssd-optimize.sh).
HomeVault checks GitHub once a day and tells admins when a newer release is out (Settings → General → About). It never updates itself. See update checks to turn this off.
docker compose pull && docker compose up -dDatabase migrations run automatically on start. Take a backup before major version upgrades: Settings → Backups → Create Backup, then download the files.
To pin a version, use a tag such as ghcr.io/jnanadarshan/homevault:1.0.0
instead of :latest. Available tags are listed on the
releases page.
Images are kept for the newest 5 releases, so move a pinned version forward now
and then.
Watchtower can pull new images for you. It needs the Docker socket, which gives it full control of the host, and it applies database migrations without asking, so keep scheduled backups on.
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Check daily at 04:00 and only update the HomeVault container.
command: --cleanup --schedule "0 0 4 * * *" homevaultThe name at the end must match HomeVault's container_name. The upstream
project is no longer actively developed; check its status before relying on it.
docker compose down # stops and removes the container; ./data is kept
rm -rf ./data # ⚠️ permanently deletes your inventory, photos and local backupsGet started
User guide
- Core concepts
- Items and photos
- Barcodes, QR codes and labels
- Finding things
- Audits and missing things
- Segments, categories and tags
- Stock, expiry and floor plans
- Import, export and Master Data
- Phone app and offline use
Operations
API
Project