Skip to content

reoclo servers

reoclo servers add [--ssh <[user@]host>] [--name <name>] [--tunnels-only]
reoclo servers harden <idOrSlug>
reoclo servers network <show|set|reapply> <idOrSlug>
reoclo servers rm <idOrSlug>
reoclo servers ls
reoclo servers get <idOrSlug>
reoclo servers metrics <idOrSlug>
reoclo servers set-slug <idOrSlug> <newSlug>
reoclo servers power <on|off|shutdown|reboot|reset|status|capabilities> <idOrSlug>

Server commands cover the full lifecycle: connect a new server, harden it, inspect it, and decommission it. add and harden need CLI 0.99.0 or newer. --tunnels-only and network need CLI 0.115.0 or newer.

Every server has a tenant-unique slug, a URL- and shell-friendly identifier derived from the server’s name (for example, Reoclo Production → reoclo-production). Slugs are the recommended way to refer to a server in CLI commands and tab completion:

Terminal window
reoclo logs tail --server reoclo-production --source container --name nginx
reoclo shell reoclo-pilot-01
reoclo exec reoclo-production -- df -h

Slugs are stable across renames: changing a server’s display name in the dashboard does not change its slug. To explicitly change a slug, use set-slug (see below).

Server names (with spaces or capitals) are still accepted for backward compatibility, but they are no longer offered in tab completion.

Lists every server in the active tenant with its slug, name, hostname, IP, status, and runner connection state.

Terminal window
$ reoclo servers ls
SLUG NAME HOSTNAME IP STATUS RUNNER
reoclo-production Reoclo Prod prod-web-1.local 10.0.0.10 ACTIVE v1.4.2
reoclo-pilot-01 Reoclo Pilot staging-web.local 10.0.0.11 ACTIVE v1.4.2
prawnwire-mail Prawnwire Mail mail-bastion.local 10.0.0.12 ONLINE v1.4.2

JSON output for scripting:

Terminal window
reoclo servers ls -o json

Shows the full record for one server: hostname, IP, environment, runner version, last seen timestamp, attached domains, and any health check failures.

You can pass any of: the slug, the UUID, or the human-readable name. The CLI resolves these through a small local cache to avoid an extra round trip.

Terminal window
reoclo servers get reoclo-production
reoclo servers get 019dc1a8-841f-7102-ac5d-3ee9e9353795
reoclo servers get "Reoclo Production" # backward compatibility

Returns the most recent CPU, memory, and disk readings reported by the runner.

Terminal window
$ reoclo servers metrics reoclo-production
cpu: 12% (1m), 18% (5m), 22% (15m)
mem: 3.2 GB / 8.0 GB (40%)
disk: / 24 GB / 80 GB (30%)
/var/lib 8.2 GB / 40 GB (20%)

Changes a server’s slug. Tenant-scoped uniqueness is enforced. If the new slug is already in use by another server in the same tenant, the API returns 409.

Terminal window
$ reoclo servers set-slug reoclo-production prod
✓ slug updated: reoclo-production → prod

The slug must match ^[a-z0-9]+(?:-[a-z0-9]+)*$ (lowercase alphanumerics and hyphens, no leading/trailing/double hyphens).

Drives the cloud provider’s power controls for a cloud-managed server. These commands act at the provider (hypervisor) level and are distinct from reoclo servers reboot, which reboots the operating system through the runner.

Terminal window
reoclo servers power on <idOrSlug>
reoclo servers power off <idOrSlug> # hard power cut
reoclo servers power shutdown <idOrSlug> # graceful shutdown
reoclo servers power reboot <idOrSlug> # provider reboot
reoclo servers power reset <idOrSlug> # hard reset
reoclo servers power status <idOrSlug> # live provider power state
reoclo servers power capabilities <idOrSlug> # what the provider supports

Power operations are available only on servers that have a cloud provider and credentials configured, and only for operations the provider supports. Run capabilities to see the supported set and whether cloud credentials are configured:

Terminal window
$ reoclo servers power capabilities reoclo-production
provider hetzner
capabilities power_on, power_off, shutdown, reboot, reset
cloud_configured true

If the server is not cloud-managed the API returns 400; if the provider does not support the requested action it returns 422. In both cases the CLI prints a hint pointing you at power capabilities.

off, shutdown, reboot, and reset prompt for confirmation. Pass --yes to skip the prompt (for scripts). The actions dispatch asynchronously and return immediately:

Terminal window
$ reoclo servers power off reoclo-production --yes
✓ power-off dispatched: reoclo-production
Cloud power_off dispatched

Add --wait to block until the server reaches its target power state (running for on, stopped for off and shutdown), giving up after --wait-timeout seconds (default 120):

Terminal window
$ reoclo servers power off reoclo-production --yes --wait
✓ power-off dispatched: reoclo-production
waiting for 'reoclo-production' to reach 'stopped' (up to 120s)...
✓ 'reoclo-production' is now 'stopped'

Cloud power operations require an interactive organization login. They are not available to automation credentials.

Sets up a fresh Ubuntu 22.04+ or Debian 12+ server and connects it to your organization. It runs the same server setup as the dashboard: admin user, rootless Docker, the Reoclo runner, and hardening.

With --ssh, the CLI runs setup over your own SSH access and waits for the server to connect:

Terminal window
$ reoclo servers add --ssh [email protected] --name web-1
Set up [email protected] as a Reoclo server and harden it (no root or password SSH logins, default-deny firewall)? [y/N] y
...
✓ server connected: web-1
root SSH login is off now. Log in as ubuntu.

Log in as root or as a user with passwordless sudo. A non-root SSH user also becomes the admin user unless you pass --user, which keeps EC2’s ubuntu and admin users working.

Without --ssh, the CLI prints a command to paste on the server. --cloud-init prints a user-data script instead. Both contain a single-use token that expires after one hour.

Terminal window
reoclo servers add --name web-1 # print a command to paste
reoclo servers add --name web-1 --cloud-init # print a user-data script
reoclo servers add --ssh [email protected] --check # dry run, changes nothing
OptionWhat it does
--ssh <[user@]host>Run setup on this host over SSH.
--port <port>, -i <file>SSH port and private key file. With -i, only that key is offered.
--user <name>Admin user that runs Docker and the runner. Defaults to the SSH user, or ubuntu when you log in as root.
--name <name>Name shown for the server, which also sets its slug. Required without --ssh. Defaults to --hostname, or the SSH host.
--hostname <name>Hostname to register the server under.
--no-hardenSkip hardening.
--tunnels-onlySet the server up to accept no inbound traffic. See Tunnels-only servers.
--firewall-allow <ports>Extra ports to open, for example 8080,9000:9100/udp. Repeatable. Ignored with --tunnels-only.
--trusted-ip <ip>Address or CIDR that fail2ban never bans. Repeatable. The address you connect from is always exempt. Ignored with --tunnels-only.
--install-url <url>Where setup is served. Defaults to the installer for the API you are logged in to.
--checkDry run with --ssh: print the plan and change nothing.
--no-wait, --wait-timeout <seconds>Skip waiting for the server to connect, or change the 120 second limit.
--yesSkip the confirmation prompt.

The first connection records the server’s SSH host key. A key that changes later is refused.

Add --tunnels-only to set up a server that accepts no inbound traffic. Setup opens no ports, not even SSH, skips fail2ban, and registers the server as tunnels-only from the start. Once setup finishes, you reach the server and its services with reoclo tunnel, including its SSH port. Because nothing is opened, --firewall-allow and --trusted-ip have no effect, and the CLI says so when you pass them.

Terminal window
reoclo servers add --ssh [email protected] --name db-1 --tunnels-only
reoclo servers add --name db-1 --tunnels-only # print the command to paste

The printed command and the --cloud-init script carry --tunnels-only too. See Tunnels-only servers for what the mode refuses and how drift is detected.

Applies hardening to a server that is already connected: no root or password SSH logins, a firewall that allows only SSH, 80 and 443, fail2ban, and automatic security updates. Automatic reboots stay off. It changes nothing else on the server.

Hardening needs root, which the runner does not have, so it runs over your own SSH access. By default the CLI connects as the admin user at the server’s recorded IP:

Terminal window
$ reoclo servers harden web-1
warning: the firewall will block these listening ports: 8080. Keep them open with --firewall-allow 8080.
Harden web-1 over [email protected]? This disables root and password SSH logins and enables a default-deny firewall. [y/N] y
...
✓ hardened: web-1
Confirm with: reoclo servers ports web-1

The warning comes from a scan of the server’s listening ports. Rootless Docker publishes ports as ordinary host sockets, so the firewall filters them too. Setup refuses to run if the admin user has no SSH key, so you cannot lock yourself out that way.

OptionWhat it does
--ssh <[user@]host>SSH destination, when the recorded IP or admin user is not the right one.
--port <port>, -i <file>SSH port and private key file. With -i, only that key is offered.
--user <name>Admin user that must keep SSH access. Defaults to the SSH user, or ubuntu.
--ssh-onlyLock down SSH only: no firewall, fail2ban or automatic updates.
--firewall-allow <ports>Extra ports to open. Repeatable.
--trusted-ip <ip>Address or CIDR that fail2ban never bans. Repeatable.
--printPrint the command to paste instead of running it.
--checkDry run: print the plan and change nothing.
--yesSkip the confirmation prompt.

The connecting user needs to be root or have passwordless sudo. If yours needs a sudo password, use --print and paste the command in a terminal on the server.

Controls whether a server takes public traffic. A public server is open on the ports its firewall allows. A tunnels-only server accepts no inbound traffic: the firewall closes every port, including SSH, and you reach its services with reoclo tunnel. The server must be connected through the runner, so SSH-connected servers are not supported.

reoclo servers network show <idOrSlug>
reoclo servers network set <idOrSlug> <public|tunnels-only> [--yes]
reoclo servers network reapply <idOrSlug>

Shows the mode, the enforcement status, why a server drifted, the last exposure probe, what blocks a switch to tunnels-only, and the services listening on the server with the reoclo tunnel command that reaches each one.

Terminal window
$ reoclo servers network show web-1
mode tunnels_only
status drifted
changed_at 2026-11-19T09:00:00Z
applied_at 2026-11-19T09:00:05Z
drift:
firewall_inactive: ufw is not active
last probe: 2026-11-19T10:00:00Z from 203.0.113.20, 0 open of 3 checked
listening services:
PORT PROTO PROCESS TUNNEL
5432 tcp postgres reoclo tunnel web-1 -L 5432:5432
51820 udp wireguard reoclo tunnel web-1 -L 51820:51820 --udp

The status is one of these:

StatusMeaning
publicThe server takes public traffic as its firewall allows.
applyingA change is on its way to the server’s runner.
enforcedThe server is tunnels-only and the runner confirms it.
driftedThe server no longer matches tunnels-only, for example because the firewall was turned off. The drift reasons say what changed.
failedThe runner could not apply the change. The error says why.

The last probe is an outside check of the server’s public address. It lists any port that still answers, which is how you catch a service that slipped past the firewall.

With -o json or -o yaml the output is the full record plus a tunnel_commands list, one entry per listening port and protocol.

Sets the mode. The change is applied by the runner, so the command answers at once with applying and the server settles a moment later.

Terminal window
$ reoclo servers network set web-1 tunnels-only
Make 'web-1' tunnels-only? The firewall closes every inbound port, including SSH. Reach it with 'reoclo tunnel'. [y/N] y
✓ network access set to tunnels-only: web-1 (applying)
Check progress with: reoclo servers network show web-1

Switching to public asks for confirmation too. Reoclo restores the inbound firewall rules it saved when the server went tunnels-only. A server that started tunnels-only gets SSH and the web ports opened. Pass --yes to skip the prompt in scripts.

The API refuses a switch to tunnels-only while something still needs public access, such as a public domain. Preview environments and the managed proxy count too. The CLI lists what blocks it:

Terminal window
$ reoclo servers network set web-1 tunnels-only --yes
Error: cannot switch to tunnels-only while something still needs public access
Remove these first:
- domain: app.example.com

Other refusals say what to do. A server connected over SSH needs the runner first, and a runner that is too old needs an update.

Applies the server’s current mode again. Use it for a drifted server after you fix the cause, or for a failed one.

Terminal window
$ reoclo servers network reapply web-1
✓ network access is being applied again: web-1 (applying)

Decommissions a server. It disconnects the runner and the server can no longer be deployed to. Move or delete its applications first: the API returns 409 while any are still assigned.

Terminal window
$ reoclo servers rm web-1 --yes
✓ decommissioned: web-1
CodeMeaning
0Success
1Server-side error
3Authentication failure
4Permission denied (authenticated, but not allowed)
5Server not found
7Control plane unreachable: DNS, connection refused, or timeout (CLI 0.55.0+; earlier report 1)