Data Persistence
All mutable state lives under /data inside the container. The shipped docker-compose.yml mounts a Docker named volume there:
volumes:
- taka_data:/data
What is stored
| Path inside container | Contents |
|---|---|
/data/taka.db | SQLite database: scans, findings, API keys, scan defaults, custom AI prompts |
/data/taka.db-shm, /data/taka.db-wal | SQLite write-ahead log and shared memory |
Losing /data means losing your scan history and saved API keys. JSON and HTML reports are generated on demand from the database; they live inside taka.db, not as separate files on disk. The rule set itself is baked into the image.
Named volume (default)
With the default configuration, Docker manages the volume:
# Inspect the volume
docker volume inspect taka-docker_taka_data
# Find its location on disk (Linux)
docker volume inspect taka-docker_taka_data \
--format '{{ .Mountpoint }}'
The volume survives docker compose down but is destroyed by docker compose down -v.
Bind mount (host directory)
If you prefer the data to live in a directory you can browse directly (for example to back it up with existing host tooling), replace the volumes: section in docker-compose.yml:
services:
taka:
# ...
volumes:
- ./data:/data
# Remove the top-level `volumes:` block when using a bind mount.
Create the directory before starting the container:
mkdir -p data
docker compose up -d
Important
The container process writes as its internal user. On some hosts you may need to
chownthe./datadirectory so the container can write to it. If Taka fails to start with apermission deniedontaka.db, check the ownership and mode of the host directory.
Backing up
Because the database is SQLite, the safest way to back up is to stop the container first:
docker compose stop
cp -r data data-backup-$(date +%F)
docker compose start
For hot backups (container running), use the SQLite .backup command inside the container:
docker compose exec taka sh -c \
"sqlite3 /data/taka.db '.backup /data/taka.backup'"
Then copy /data/taka.backup out of the volume.
Migrating to a new host
docker compose downon the old host.- Copy the volume contents (either the bind-mount directory or the named volume’s
Mountpoint) to the new host. - Place the data under the same path (or reconfigure
docker-compose.yml). docker compose up -don the new host.
The database format is stable across patch releases. For major upgrades, review the release notes first. See Updating & Lifecycle.
Resetting
To wipe all scan history and start fresh:
docker compose down -v # -v removes the named volume
docker compose up -d
With a bind mount, delete the host directory instead:
docker compose down
rm -rf ./data
docker compose up -d