Installation - grumnuts/dosh GitHub Wiki
Installation
Dosh runs as a single Docker container. There is no separate database server — everything is stored in a SQLite file on a named volume.
Requirements
- Docker and Docker Compose
- A machine with at least 256 MB RAM
- Supported architectures:
amd64,arm64
docker-compose.yml
services:
dosh:
image: grumnuts/dosh:latest
ports:
- "3000:3000"
volumes:
- dosh_data:/data
environment:
SECRET_KEY: your-secret-key-here
TZ: Australia/Sydney
volumes:
dosh_data:
Start with:
docker compose up -d
Then open http://localhost:3000.
Environment Variables
| Variable | Default | Description |
|---|---|---|
SECRET_KEY |
— | Required. Used to sign session cookies. Use a long, random string. |
TZ |
System default | Timezone for week boundaries and transaction dates. E.g. Australia/Sydney, America/New_York, Europe/London. |
PORT |
3000 |
Port the server listens on inside the container. |
HOST |
0.0.0.0 |
Interface the server binds to. |
DB_PATH |
/data/dosh.db |
Path to the SQLite database file. |
LOG_LEVEL |
info |
Fastify log level: fatal, error, warn, info, debug, trace. |
Important: Set
TZto your local timezone. Week boundaries (Sunday–Saturday) and monthly/quarterly period calculations depend on it.
Generating a SECRET_KEY
openssl rand -hex 32
Updating
Pull the latest image and recreate the container:
docker compose pull
docker compose up -d
Database migrations run automatically on startup — no manual steps needed.
Backups
The database is a single file. Back it up by copying it from the volume:
docker run --rm -v dosh_data:/data -v $(pwd):/backup alpine \
cp /data/dosh.db /backup/dosh-backup.db
Or, if you know the volume path on your host:
cp /var/lib/docker/volumes/dosh_data/_data/dosh.db ./dosh-backup.db
Reverse Proxy
Dosh works behind any reverse proxy (nginx, Caddy, Traefik). Example Caddy config:
dosh.example.com {
reverse_proxy localhost:3000
}
Ensure your proxy forwards the X-Forwarded-For header if you want accurate IP logging.