Help center/Self-hosting

ARTICLE / Self-hosting

Binary deployment

Binary deployment runs NovaraSync.exe directly. It listens on loopback only, prints the space id and enrollment secret once, and then accepts a desktop pairing.

What you get

  • The server ships as a net10.0 self-contained single-file build — the target machine needs no .NET runtime installed.
  • The build contains the NovaraSync main program and the Novara.Web\ site directory (phone-side pages).
  • The same code as the Docker image: the same NOVARA_SYNC_* environment variables, the same Caddyfile (on bare metal NOVARA_UPSTREAM defaults to 127.0.0.1:5180; inside containers it is novara-sync:5180).

Run it

  1. Place it

    Put the build somewhere with a writable data directory and the site directory intact.

  2. Set environment variables

    At least consider NOVARA_SYNC_DATA (data directory) and NOVARA_SYNC_ALLOWED_HOSTS (recommended with a fixed domain; hostname only).

  3. Create the space and start

    Same binary, same data directory, two commands:

NovaraSync space create --name my-space
NovaraSync.exe --urls http://127.0.0.1:5180

The server listens on loopback only. The space id and enrollment secret print exactly once; then pair on the desktop (space key left empty).

To run Caddy on bare metal: caddy run --config deploy/Caddyfile — the same reverse-proxy config Docker uses; NOVARA_UPSTREAM already defaults to the loopback address, nothing to change.

The web-root red lines

  • NOVARA_SYNC_WEB_ROOT defaults to Novara.Web under the application directory and rarely needs changing; if the path does not exist, the server runs API-only.
  • The web root must never contain the data directory: otherwise static serving would publish the ciphertext vault and keywrap records under /web. The server checks at startup and refuses to start (refusing to start).
  • Junctions / symbolic links inside the site tree are also refused — the static provider would follow them. Move external content into the site directory if you need it.

Verify

  • After startup, http://127.0.0.1:5180/web should redirect to /web/ and render.
  • Pair once, stop the process, start it again — the data survives; that confirms the data directory landed in the right place.
  • Accept the public route per "Reverse proxy and HTTPS"; the repo's Tools/web_selfcheck.py can re-check redirects, forwarded headers and security headers.