Skip to content

Self-hosting

View .md

Run the double-entry engine, web app, and CLI on your own server or computer for $0 forever. Each book lives in one SQLite file with no external database.

One container runs the web app, API, SQLite storage, automated backups, and the rastrata CLI. Rastrata refuses to listen on a network address until you set a password.

  1. Download docker-compose.yml from the repository.
  2. Generate a password (at least 12 characters) and start the container:
Terminal window
export RASTRATA_PASSWORD="$(openssl rand -base64 18)"
docker compose up -d
  1. Open http://localhost:7278 and sign in with your password.
  • Custom domain or PaaS (Railway, Render, Coolify, Caddy, Nginx): Set RASTRATA_PUBLIC_ORIGIN=https://books.example.com. Rastrata adds that hostname to its allowed hosts, checks browser origins against HTTPS, and enables HSTS.
  • Dynamic port: Rastrata reads PORT on Railway and Render when RASTRATA_API_PORT is unset. Otherwise it listens on 7278.
  • Docker Secrets: Pass RASTRATA_PASSWORD_FILE=/run/secrets/rastrata_password instead of RASTRATA_PASSWORD.
  • Health checks: GET /live and GET /ready answer 200 on any host header. The container includes a built-in HEALTHCHECK.
  • Data volume: Mount /data to persistent storage. The container drops root privileges on startup and runs rastrata-service as PID 1 so SQLite flushes on stop.

Run CLI diagnostics or mint an agent token inside the running container:

Terminal window
docker exec rastrata rastrata doctor
docker exec rastrata rastrata tokens create --label "Claude Code" --preset auto
  • Supported platforms: macOS (Apple silicon or Intel) and Linux (x64 or arm64 with systemd).
  • Use a non-root account. The installer keeps all files inside your home directory.
  1. Download rastrata-VERSION-OS-ARCH.tar.gz and its .sha256 file from GitHub releases.
  2. Check the hash and run the installer:
Terminal window
shasum -a 256 -c rastrata-VERSION-darwin-arm64.tar.gz.sha256
tar -xzf rastrata-VERSION-darwin-arm64.tar.gz
cd rastrata-VERSION-darwin-arm64
./install.sh
  1. Open the web app and run checks:
Terminal window
rastrata open
rastrata doctor

Pass --port 7300 or --data-dir /path/to/books to ./install.sh to pick another port or data folder.

Component Default path
Binaries (rastrata, rastrata-service) ~/.local/bin/
macOS launchd service ~/Library/LaunchAgents/com.rastrata.service.plist
Linux systemd user unit ~/.config/systemd/user/rastrata.service
Books, backups, owner key, and logs (macOS) ~/Library/Application Support/Rastrata
Books, backups, owner key, and logs (Linux) ${XDG_DATA_HOME:-~/.local/share}/rastrata
Local web address http://127.0.0.1:7278 (loopback only)

Mint a scoped token and write your agent runbook:

Terminal window
rastrata connect --preset auto
rastrata agent status

To connect a desktop agent over stdio MCP in Docker (Claude Desktop, Cursor, or Docker Desktop MCP Toolkit):

Terminal window
docker run --rm -i \
-e RASTRATA_API_URL="https://books.example.com" \
-e RASTRATA_TOKEN="rst_..." \
ghcr.io/gant-street/rastrata-mcp:latest

Point backups at an external drive or synced folder, and test a restore anytime:

Terminal window
rastrata backup folder /Volumes/Backups/rastrata
rastrata backup create
rastrata backup verify
rastrata backup drill

Restore an offline backup to a fresh SQLite file:

Terminal window
rastrata restore BACKUP_ID --to /path/to/restored.sqlite
Capability Self-hosted ($0) Rastrata Cloud ($19/mo)
Double-entry engine, web app, and Lean 4 proofs Included Included
SQLite storage and CSV / JSONL export Included Included
CLI and MCP server with no AI markup Included Included
Statement imports (CSV, XLSX, OFX, QFX, QBO) and MIT plugins Included Included
Live US bank feeds (Stripe Financial Connections) Manual / SimpleFIN / plugins Included (daily sync)
One-click Stripe & Ramp OAuth sync CLI / API key / plugins Included
Remote MCP access (https://app.rastrata.com/mcp) Self-managed HTTPS Included
Team & accountant seats and managed daily backups Self-managed Included (unlimited users)

Your books stay portable in both directions. Export from Cloud to self-host, or move your local books to Cloud anytime.

Still stuck?

Contact support