Help center/Self-hosting

ARTICLE / Self-hosting

Server environment variables

The server reads a small set of NOVARA_SYNC_* environment variables. Most deployments only touch the data path; trusted proxies matter when the compose subnet changes.

The full table

VariableDefaultWhen you need to touch it
NOVARA_SYNC_DATAdata (relative to the working directory)When the data should live elsewhere. Make sure it is not inside NOVARA_SYNC_WEB_ROOT, or the server refuses to start
NOVARA_SYNC_WEB_ROOTNovara.Web under the output directoryRarely touched. Pointing it at a path containing the data directory refuses to start; junctions/symlinks inside the site tree are refused too
NOVARA_SYNC_ALLOWED_HOSTSEmpty = no filteringRecommended with a fixed domain (a backstop against Host-header injection). Hostnames only — entries with ports or trailing dots never match, and startup warns on stderr
NOVARA_SYNC_TRUSTED_PROXIESEmpty (loopback trusted by default)When the reverse proxy runs on another machine: list its single IP (comma-separated, no CIDR). Cross-machine proxy without it → every /api call gets 403
NOVARA_SYNC_STOREsqliteChoose file (JSON storage) for zero dependencies; semantics identical
NOVARA_SYNC_QUOTA_BYTES524288000 (500 MiB)Adjust for larger per-space ciphertext or several people sharing a server
NOVARA_SYNC_MAX_VERSIONS10Raise to keep more history
NOVARA_SYNC_MAX_PAYLOAD_BYTES67108864 (64 MiB)Raise when a legitimate upload returns 413
NOVARA_SYNC_MAX_AUTH_FAILURES10Auth-failure rate limit (1-minute window); usually untouched

Compose deployment only

VariableDefaultNote
NOVARA_DOMAIN(required)The domain Caddy requests certificates for; unset, compose fails immediately with set NOVARA_DOMAIN in .env
NOVARA_IMAGEghcr.io/novara-owner/novara-sync:13.0.0Pin the image; for production, pin a digest

In compose, NOVARA_SYNC_TRUSTED_PROXIES already defaults to the Caddy container address 172.28.0.250 and the gateway 172.28.0.1; normally untouched. If you changed the subnet in docker-compose.yml, update it to match.

Three practical reminders

  • .env is read by compose only; on bare metal set system environment variables directly — the names are identical on both sides.
  • Environment variable changes take effect when the container is recreated (up -d); restart does not re-read .env.
  • Addresses listed in trusted proxies may declare a request's scheme — list only the proxy you actually run, nothing else.