Why this is a separate step
A freshly installed server has no spaces, so the desktop's "issue token" has nothing to point at. Creating a space is a one-time administrative action, possible only through the CLI; the two credentials it prints are the only gate for device registration.
The first-run three steps
- Create the space
docker compose run --rm novara-sync space create --name "My Space"(Compose path) orNovaraSync space create --name my-space(bare metal). Note the space id and enrollment secret. - Start the server
docker compose --profile https up -d, or double-click2-启动服务端.cmd, or runNovaraSync.exe --urls http://127.0.0.1:5180directly. - Pair
Desktop → Encrypted sync → Pair: address + space id + enrollment secret, space key left empty (the first device generates its own SpaceKey).
Why run --rm instead of exec: this step does not need the server running; run starts a one-off container, mounts the same ./data, writes and exits — credentials stay in one place with the server.
CLI subcommand reference
NovaraSync space create --name my-space
NovaraSync space list --json
NovaraSync space show <space id>
NovaraSync space rotate-secret <space id>
NovaraSync space delete <space id> --yes| Command | Effect |
|---|---|
space create --name <name> | Creates the space; prints the space id and enrollment secret (once only) |
space list | Lists spaces; --json for machine-readable output |
space show <space id> | Shows one space's details |
space rotate-secret <space id> | Issues a new enrollment secret; the old secret dies instantly; paired devices are unaffected |
space delete <space id> --yes | Deletes the space. Irreversible; without --yes it refuses and exits (exit code 2) |
Every subcommand supports --json. Exit codes: 0 success; 1 the operation failed (bad credentials, missing space, etc.); 2 command usage problem (like delete without --yes).
After pairing
The first device generates and keeps the SpaceKey (shown in a dialog, savable from the card). Only now does read-only access come into play: issue a token, copy the link, send it to the phone — see "Read-only mobile access".