Callbook docs
v1.0.0
Get help
● Ship

Server deployment
hosting the backend.

One Node process and one SQLite file. Small and cheap to host.

DockersystemdHTTPS

01Docker

Windows users

Flutter runs natively on Windows: use PowerShell for the flutter commands and Android builds (iOS builds need a Mac). For the server, either install Node.js 22.12+ for Windows and use PowerShell (replace cp .env.example .env with Copy-Item .env.example .env; there is no openssl by default, so use WSL or any random 64-character hex string), or run the commands in WSL 2 (Ubuntu) or Docker. npm run keygen is plain Node and works the same in PowerShell. macOS and Linux users can ignore this note.

cd server
cp .env.example .env     # set ADMIN_SECRET_KEY
docker build -t callbook-server .
docker run -p 8787:8787 -v callbook-data:/app/data --env-file .env callbook-server

The volume holds the databases. The image has a health check on /healthz. The Dockerfile was not run by the author: unverified, so test it once.

02Any Node host (VPS, PM2, systemd)

  1. On the server: npm ci && npm run build.
  2. Run node dist/src/index.js with the variables from Configuration, under PM2 or a systemd unit so it restarts.
  3. Put it behind HTTPS (Caddy or nginx) and set TRUST_PROXY_HOPS=1.
  4. Build the app with --dart-define=API_BASE_URL=https://your-domain.
One process only

SQLite is one file on one disk. Do not run several copies of the server against the same data, and avoid hosts with no persistent disk.

03Backups

Back up the data/ folder (the SQLite files), your ADMIN_SECRET_KEY and your private signing key. The co-signature records live in data/; without them old receipts cannot be re-read from the server, and without the signing key you cannot keep signing under the same key id.

04Production security

  • Use HTTPS only. Android 9 and newer and iOS refuse plain http by default, so a server address that is not https never loads on a phone. HTTPS also stops anyone changing the paywall or the scoring settings on the way.
  • Keep the console behind HTTPS too and turn on two-factor sign-in for every team member.
  • Rate limit at the proxy as well. The server limits /v1 to 60 requests a minute per address, but it counts in memory, so put a limit in front of it. The config answer is sent with Cache-Control: public, max-age=300 and an ETag.
  • Set TRUST_PROXY_HOPS=1 behind one proxy, so limits and sign-in attempts see the real address.
  • Back up data/, ADMIN_SECRET_KEY and the signing key.

With Caddy a working setup is two lines, and certificates are automatic: api.example.com { reverse_proxy 127.0.0.1:8787 }.

05Stores

The app itself is published through App Store Connect and Google Play, see Release. There is no web version.