Appearance
Self-hosting (developers)
Mintage is deliberately simple to run: one Node.js process and one SQLite file. There's no separate database server, cache or queue. The same build runs on a laptop, a home server, a small VPS or in Docker.
Requirements
- Node.js 22.13 or later — Mintage uses the built-in
node:sqlitemodule, so there are no native modules to compile. - pnpm 10 (via Corepack:
corepack enable). - About 200 MB of disk for the app, plus room for your database, attachments and backups.
Build and run
bash
git clone <your-fork-or-release> keel && cd keel
corepack enable
pnpm install --frozen-lockfile
pnpm build
NODE_ENV=production node apps/api/dist/index.jsIn production the API process serves the built web app and the API from the same origin, so session cookies just work. Database migrations run automatically at start-up.
Check it's alive:
bash
curl http://localhost:4000/api/health
# {"ok":true,"version":"0.1.0"}Environment variables
Mintage is configured entirely through environment variables. The names below are the intended configuration surface for v0.1.0; those marked illustrative may be renamed before 1.0 — check apps/api (and .env.example if present) for your version.
| Variable | Default | Purpose |
|---|---|---|
NODE_ENV | development | Set to production for Secure cookies, compiled assets and quieter logs |
PORT | 4000 | HTTP port |
HOST | 127.0.0.1 | Interface to bind; use 0.0.0.0 in Docker (illustrative) |
DATABASE_PATH | data/keel.sqlite | SQLite database file (illustrative) |
UPLOAD_DIR | data/uploads | Temporary uploads (kept 24 hours) (illustrative) |
ATTACHMENT_DIR | data/attachments | Receipts and documents, stored outside the web root (illustrative) |
SESSION_SECRET | — (required in production) | Long random string used to sign sessions (illustrative) |
FILE_KEY | — (required in production, ≥ 32 chars) | Encrypts kept import originals. Store a copy safely: lose it and those files can't be read. Files sealed with the older SESSION_SECRET-derived key move over automatically on start. |
PUBLIC_URL | — | External URL, used for the Origin check behind a proxy (illustrative) |
PRICE_PROVIDER | yahoo | yahoo, alphavantage, eodhd or manual (illustrative) |
ALPHAVANTAGE_API_KEY | — | Enables the Alpha Vantage price provider (illustrative) |
EODHD_API_KEY | — | Enables the EODHD price provider (illustrative) |
BACKUP_DIR | data/backups | Where scheduled backups are written (illustrative) |
BACKUP_SCHEDULE | daily | How often to take a scheduled backup (illustrative) |
LOG_LEVEL | info | fatal … trace (illustrative) |
Generate a secret with:
bash
node -e "console.log(require('node:crypto').randomBytes(48).toString('base64url'))"Docker
A minimal outline:
dockerfile
FROM node:22-slim AS build
WORKDIR /app
RUN corepack enable
COPY . .
RUN pnpm install --frozen-lockfile && pnpm build
FROM node:22-slim
WORKDIR /app
ENV NODE_ENV=production PORT=4000 HOST=0.0.0.0 DATABASE_PATH=/data/keel.sqlite \
UPLOAD_DIR=/data/uploads ATTACHMENT_DIR=/data/attachments BACKUP_DIR=/data/backups
COPY --from=build /app /app
VOLUME /data
EXPOSE 4000
USER node
CMD ["node", "apps/api/dist/index.js"]bash
docker build -t keel .
docker run -d --name keel -p 4000:4000 -v keel-data:/data \
-e SESSION_SECRET=change-me -e FILE_KEY=change-me-to-a-32-plus-char-secret keelKeep everything stateful under one volume (/data) so backups and upgrades are a single directory.
HTTPS and reverse proxies
Run Mintage behind a reverse proxy that terminates TLS (Caddy, nginx, Traefik). In production, cookies are Secure, so Mintage must be served over HTTPS for sign-in to work.
text
# Caddyfile
money.example.com {
reverse_proxy 127.0.0.1:4000
}- Forward the original
HostandX-Forwarded-Protoheaders. - Mutations check the
Originheader — make sure the proxy doesn't strip it, and setPUBLIC_URLto the external address. - Keep the API port bound to
127.0.0.1so it's only reachable through the proxy. - Sign-in attempts are rate limited per IP; behind a proxy, make sure the client IP is forwarded.
Backups and restore
You have three options, and you should use at least two:
In-app backup. Settings → Data → Back up now creates a full JSON export you can download. It contains every entity you own.
Scheduled backups. Turn them on in Settings; files are written to
BACKUP_DIR. Copy that directory off the machine (another disk, cloud storage).File-level backup. Stop Mintage and copy the database file, or use SQLite's online backup while it runs:
bashsqlite3 /data/keel.sqlite ".backup '/backups/keel-$(date +%F).sqlite'"Copy the attachments directory too — attachments live on disk, not in the database.
To restore, use Settings → Data → Restore (or POST /api/backup/restore) with a JSON backup, or stop Mintage and put a copied database file back in place.
Upgrades
- Take a backup.
- Pull the new release and run
pnpm install --frozen-lockfile && pnpm build(or pull the new Docker image). - Restart. Numbered migrations in
packages/db/migrationsrun automatically and are forward-only. - Check
/api/healthreports the new version.
To roll back, restore the backup you took in step 1 with the previous version.
Administration
- Audit log — every change is recorded; view it in Reports or via
admin.auditLog. - Deleting a user's data — users can delete their own data in Settings → Data.
- Password and two-factor resets — v0.1.0 has no admin screen for resetting another user's password or 2FA. Do it on the server against a backed-up database, or ask the user to sign in and change it themselves.
Postgres
The repository layer in packages/db is written against interfaces so a Postgres implementation can be added. v0.1.0 ships SQLite only, which comfortably handles a household's or small practice's data.