Deployment Guide¶
This repository ships a complete, stdlib-only Python backend (server/) and Docker Compose stack (deploy/) so you can deploy Anvil Scribe end to end without external Python dependencies.
Architecture¶
Desktop App / MemoMind One Glasses
│ HTTPS (Caddy / Tailscale Serve) or loopback HTTP
▼
Anvil Scribe v3 Server (:8790) ── Stores Ogg audio, transcripts, rewrites, custom profiles
│ Bearer token (internal) (writes .evaluation-excluded marker)
▼
Real-Time Capability Router (:8000) ── Explicit route mapping, zero hidden fallback
├── /v1/audio/transcriptions ──► STT Engine (Parakeet, Whisper, Faster-Whisper, Speaches)
└── /v1/chat/completions ──► LLM Engine (Ollama, vLLM, llama.cpp, SGLang, OpenAI)
If you already operate an Anvil Serving gateway, you can skip the bundled realtime-router container and point scribe.router_url directly at your Anvil Serving router (for example http://127.0.0.1:8000).
Option A: Docker Compose (Recommended)¶
- Copy router.example.toml (and optionally scribe.example.toml) into a private directory outside the repository (for example
~/.config/anvil-scribe/) and point[router.audio_routes.stt-fast]at your STT backend and[router.chat_routes.*]at your LLM backend(s). - Create an untracked
runtime.env(chmod 600) in that same directory based on env.example with strong randomSCRIBE_ROUTER_TOKENandSCRIBE_CLIENT_TOKENvalues. - Start the stack (pass
SCRIBE_ROUTER_CONFIG/SCRIBE_CONFIGto mount your private copies):By default,SCRIBE_ROUTER_CONFIG=~/.config/anvil-scribe/router.toml \ docker compose -f deploy/docker-compose.yml --env-file ~/.config/anvil-scribe/runtime.env up --build -danvil-scribebinds127.0.0.1:8790on the host,realtime-routerstays private on the Compose bridge network (withhost.docker.internal:host-gatewaymapped for Linux hosts), anddeploy/Caddyfilestrips incomingTailscale-User-Loginheaders.
Built-in HTTPS with Caddy¶
Remote mobile and MemoMind clients require https://. Enable the bundled Caddy reverse proxy (deploy/Caddyfile) with your domain set in SCRIBE_DOMAIN:
SCRIBE_ROUTER_CONFIG=~/.config/anvil-scribe/router.toml \
docker compose -f deploy/docker-compose.yml --profile tls --env-file ~/.config/anvil-scribe/runtime.env up --build -d
Option B: Native Python (Bare Metal / Tailscale Serve)¶
Requires Python 3.11+ and ffmpeg on PATH:
pip install -e ./server
# Validate configs offline before starting
anvil-scribe-server router validate --config /path/to/router.toml
anvil-scribe-server scribe validate --config /path/to/scribe.toml
# Run in two terminals (or under your service supervisor)
anvil-scribe-server router run --config /path/to/router.toml
anvil-scribe-server scribe run --config /path/to/scribe.toml
Tailscale Serve Authentication¶
If you expose Anvil Scribe over a tailnet using tailscale serve:
- Keep
listen_host = "127.0.0.1"(do not setallow_container_bind = true). - Configure
allowed_logins_env = "ANVIL_SCRIBE_LOGINS"(comma-separated tailnet login emails). - Optionally also set
client_token_envif some clients authenticate with Bearer tokens instead of Tailscale identity headers.
CORS for MemoMind One & Studio¶
By default, anvil-scribe-server accepts both local Studio/browser origins (http://127.0.0.1:<port>) and MemoMind iOS WebView origins (memo-plugin://<32-hex>.plugin.invalid). Override allowed_origin_pattern in scribe.toml if you serve an additional trusted browser origin.
Storage & Privacy¶
Memos, custom profiles, and idempotency receipts live under data_dir (default /var/lib/anvil-scribe in Docker). The server creates a .evaluation-excluded marker file inside data_dir on startup and tags all smart-glasses uploads with trainingPolicy = "excluded_device_terms".