Operations Runbook¶
This runbook is for deployers and maintainers. It assumes the Docker deployment described in Docker Compose.
Service Inventory¶
| Service | Default endpoint | Persistent state |
|---|---|---|
| BillTracker app | http://<host>:3030 |
/portainer/hosting/bill-tracker/data:/data |
| BillTracker docs | http://<host>:8055 |
/portainer/hosting/bill-tracker/mkdocs:/docs |
BillTracker stores its live database at /data/db/bills.db inside the app
container and managed backups at /data/backups.
Start Or Recreate App¶
From the app Compose directory:
Confirm:
docker ps --filter name=bill-tracker
docker logs --tail 100 bill-tracker
curl -fsSI http://127.0.0.1:3030/
curl -fsS http://127.0.0.1:3030/api/about
The app root should return 200. /api/about should return the running version.
Start Or Recreate Docs¶
The docs container mounts the MkDocs project at /docs and runs:
To validate docs before restart:
docker run --rm \
-v /portainer/hosting/bill-tracker/mkdocs:/docs \
squidfunk/mkdocs-material:latest \
build --strict
Then:
Before Upgrade¶
- Open Admin and create a manual backup.
- Download the backup or copy
/data/backupsto protected storage. - Record the current app version from
/api/about. - Confirm the current Status page does not already show a database error.
- Pull and recreate the container.
- Confirm migrations complete in logs.
- Validate login and the Status page.
Database Health¶
Use the Admin Status page first. For a direct SQLite integrity check, stop writes or work from a backup copy:
Expected result:
Backup Recovery¶
Preferred recovery path:
- Use Admin backup restore.
- Select the intended managed backup.
- Confirm restore.
- Record the returned pre-restore backup identifier.
- Verify login and Status.
If the UI is unavailable, preserve the current database, WAL, and SHM files before manual intervention. Do not overwrite the only copy of the live database.
Login Incident¶
Local Login Fails¶
Check:
/api/auth/modestill reports local login enabled.- The user is active.
- The account is a local account rather than OIDC-only.
- The browser receives
bt_sessionafter successful login. - Secure cookies are not being tested over plain HTTP.
OIDC Login Fails¶
Check:
- Issuer URL resolves from the BillTracker host.
- Redirect URI exactly matches the provider.
- Client ID and secret are current.
- Provider discovery endpoint is reachable.
openid email profile groupsscopes are available.- The configured admin group matches the provider claim spelling.
- Local login remains enabled while repairing OIDC.
CSRF Incident¶
Symptom:
Check:
- Browser has
bt_csrf_tokenset. - SPA has a valid in-memory token from
GET /api/auth/csrf-token. - SPA sends
x-csrf-tokenon the mutating request. CSRF_HTTP_ONLY=trueis the default and is fine for the SPA flow.- Proxy and HTTPS cookie behavior are correct (
X-Forwarded-Proto: httpsortrust proxyset when TLS terminates upstream). - The user refreshed after a stale browser session.
Do not disable CSRF to make the symptom disappear.
SimpleFIN Incident¶
Check:
- Admin bank sync flag is enabled.
- User connection still exists.
- The source
last_erroron Status. - The connection was not synced within the worker's 1-hour skip window.
- Setup access has not been revoked.
- Selected accounts remain monitored.
- A manual Sync Now succeeds before using backfill.
Disconnect and reconnect only after reviewing the stored source error.
Notification Incident¶
Check:
- SMTP is enabled.
- Host, port, and sender address are present.
- Password exists when SMTP username is set.
- TLS mode matches the server.
- Run the Admin test email action.
- Confirm user or global-recipient preferences.
- Review notification errors on Status.
Disk And Cleanup Incident¶
Review:
Then use Admin cleanup. Cleanup can remove stale preview sessions, temp exports, partial backup files, optional old import history, and soft-deleted bills or categories after the 30-day recovery window.
Logs¶
Useful commands:
docker logs --tail 200 bill-tracker
docker logs --since 30m bill-tracker
docker logs --tail 100 billtracker-docs
Avoid publishing logs without reviewing them for usernames, transaction descriptions, filenames, or infrastructure details.
Post-Change Verification¶
Run:
For docs:
Then test representative live endpoints and inspect the Status page.