Skip to Content
CLIRun a relay

Run a Cmdop relay

Start this machine’s relay and web console in the foreground:

cmdop server

Machines on your network join it with cmdop join <join-key> and can then reach each other through it.

For a background process, use:

cmdop server --detach cmdop server status

Manage the running relay with status, restart, and stop:

cmdop server status cmdop server restart cmdop server stop

Run cmdop server create for guided relay configuration. Use cmdop server create --help before non-interactive deployment because the required settings depend on whether the relay is local, publicly reachable, or served on your own domain.

Running headless

On a host with no desktop, suppress the browser launch and the startup banner:

cmdop server --detach --no-open --no-banner

--no-open still prints the console URL; it just does not try to open a browser. --no-banner also suppresses the join key in the startup output — use it where the log is shipped somewhere less trusted, then read the key back deliberately with join-key.

Other flags for a controlled deployment:

FlagPurpose
--bind <address>Bind address, overriding the relay’s config file.
--plaintextServe without TLS. Loopback or trusted-LAN development only.
--no-agentRun the relay only, without the in-process agent.
--strict-pinRequire admin-password login even on loopback.
--initial-admin-password-file <path>Read the first admin password from a file. Ignored after initialization.

The join key

Show the fleet join key that operators use with cmdop join:

cmdop server join-key

Rotate it when it has been shared too widely:

cmdop server join-key --regenerate

Regenerating does not disconnect anything: machines that already joined stay joined and keep working. Only new machines joining need the new key.

The admin password

The admin password gates the HTTP surface used by the mobile app and the browser admin. It is stored only as a hash, so it cannot be shown again — to get a usable one, set or reset it:

cmdop server admin-password --reset # generate one and show it once cmdop server admin-password --set <value> # set one you chose

Rotating it invalidates every active mobile and browser session; those clients must sign in again. Run it while the relay is stopped, or it takes effect at the running relay’s next login check.

Per-machine connection PIN

A connection PIN is a second attach gate on top of an authenticated admin session, armed for one machine at a time:

cmdop server machine-pin <machine-id> --set <pin> cmdop server machine-pin <machine-id> --clear

A machine with a PIN armed only answers when the caller presents it; a machine with no PIN is open. Like the admin password, the PIN is stored only as a hash and cannot be displayed again. Changes take effect on the running relay immediately.

Operators joining a PIN-armed machine present it with cmdop join --machine-pin.

Relays you host vs relays you connect to

cmdop server hosts a relay. cmdop remotes manages the list of relays that this CLI connects to. These are intentionally separate command trees.

Last updated on