Skip to Content
DocsConnectMachines and relays

Machines and relays

A machine holds a small registry of the relays it knows about, and exactly one of them is active at a time. Everything else — which machines you can see, which console cmdop open reaches, where its join key applies — follows from which relay is active.

Inspect and choose a relay

cmdop remotes list # every relay entry this machine knows cmdop remotes show # the active one (or name one to inspect it) cmdop remotes add <url> # register another relay cmdop remotes use <name> # make it the active relay cmdop remotes remove <name> # forget an entry

cmdop remotes use is a real switch, not a bookmark change. It repoints the active relay and reconnects a running agent in place — you do not restart anything by hand. It then tells you which of four things happened:

OutcomeWhat it meansWhat to do
ReconnectedThe agent is connected to the new relayNothing
Join neededThis machine has no credential there yetcmdop join <join-key> --server <url>
UnreachableThe switch was made, but the relay did not answerCheck the address and the network
Kept last sessionSwitched, previous session retainedVerify with cmdop status

Joining a relay

Registering a relay is not the same as being allowed onto it. Membership comes from joining with that relay’s fleet join key:

cmdop join <join-key> cmdop join <join-key> --server https://relay.example.com

Joining is per relay. A machine can hold credentials for several and move between them with cmdop remotes use; each keeps its own membership.

Connecting to a relay is not hosting one

Two different surfaces are easy to confuse:

  • cmdop remotes is the registry of relays this machine connects to.
  • cmdop server runs the relay this machine hosts, which other machines join.

Switching the active relay never changes the relay you may be hosting here, and turning your own relay off does not detach you from a relay you have joined.

What the machine list reflects

cmdop connect --list shows the machines of the active relay. If a machine you expect is missing, confirm you are pointed at the right relay before investigating the machine itself:

cmdop remotes show cmdop status

Common questions

What is the active relay in Cmdop?

The active relay is the relay this machine currently uses for roster, console, join, and connect operations.

Can one machine know several relays?

Yes. A machine can register several relays, but exactly one is active at a time. Each relay keeps its own membership.

Does switching relays change the relay I host?

No. cmdop remotes use changes the relay this machine connects to. It does not start, stop, or reconfigure a relay hosted on the same machine.

Last updated on