moneyhelper

Deployment Guide

Applies to the 2026-10 final release (empty-first onboarding · conversation hub · local encrypted backups). Read the Quick start first.

1. Run locally (default)

Requirements: Python 3.10+, Node.js 20.19+ / 22.12+.

# Backend (must start inside backend/)
cd backend
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
cp .env.example .env          # optional: model/token; runs without any config too
.venv/bin/python -m uvicorn app.main:app --host 127.0.0.1 --port 8787

# Frontend — pick one
cd frontend && npm install && npm run dev     # dev mode http://127.0.0.1:5198 (proxy to 8788)
cd frontend && npm run build                  # prod: built once, served by backend http://127.0.0.1:8787

One-click: scripts/dev.sh at the repo root (backend 8788 + frontend dev 5198, Ctrl-C stops both).

2. Docker (single container)

docker compose up -d --build     # http://<server-ip>:8787

3. LAN / public access (security first)

The app only allows localhost by default. Configure access before exposing it:

Scenario Configuration
LAN (NAS / internal hostnames) Set ALLOWED_HOSTS=nas.local,10.0.0.5 (comma-separated), no token
Public / reverse proxy / multi-user API_TOKEN is mandatory: every /api/* needs Authorization: Bearer <token> or ?token=<token>; the frontend shows a passcode dialog on first access
# nginx reverse proxy example (port 8787, same-origin paths)
location / {
  proxy_pass http://127.0.0.1:8787;
  proxy_set_header X-Forwarded-For $remote_addr;   # overwrite, don't append
  proxy_set_header Host $host;
}

> Login throttling behind a proxy: failed logins are counted per socket peer IP by
> default. Set `MONEYHELPER_TRUST_PROXY=1` only when a trusted reverse proxy sits in
> front — `X-Forwarded-For` is spoofable, so enabling it on a directly exposed port
> hands the per-IP limit to the attacker.

After setting a reachable public URL, open the phone icon in the top bar and choose Generate link. Scanning the QR opens the same app: conversations, files and settings all work. The phone is only a control surface; data and execution stay on the desktop.

python -m app.relay.server --control-port 8789 --port-start 9100 --port-end 9199 \
  --public-host relay.example.com --token <long-random-string>

Open control port 8789 and ports 9100-9199 in the firewall/security group. In the remote panel, enter ws://relay.example.com:8789 plus the same token, start the relay, then generate a new link. The relay forwards bytes only and stores no ledger data. With --certfile/--keyfile, public links use https and the control channel uses wss.

4. Data & backups

5. Upgrades

6. Scheduled tasks

The daily morning report is driven by APScheduler (default 08:00; change the time or trigger one immediately in Settings → Daily Report). Scheduler status: GET /api/scheduler. Reports work with AI or the deterministic template — the service never breaks.