VergShip
Operations: the console asks, your servers decide
VergShip starts by reading what already runs on each of your servers: services and timers, listening ports, containers, the sites in Caddy's files and disk use. It is the first step to running apps there, and it is built so that the console can ask but never decide. A server does what it is asked only when three things are true: root on that machine allowed it, the request was signed with a key that root pinned there, and the server's own checks pass.
Turn it on
- Install the verg CLI on your own computer (macOS or Linux, Node.js 20 or newer). It puts one file, checked against its published SHA-256, in
~/.local/bin:curl -fsSL https://api.cloudverg.com/cli/install.sh | sh - Sign in. The command shows a code; approve it in the console, and it keeps a new read and write API key for this computer. Reading needs any key; asking a server needs a read and write key. (To use a key you made under Settings, API keys, set
VERG_API_KEYfirst.)verg login - Make your operator key. The private key is made on your computer, kept in
~/.config/verg(readable by you only), and never sent anywhere. The public half goes to the console so it can name the signer.verg ops keygen --name owner-mac - On the server, as root, run the command keygen printed. It pins your key, makes the machine's own signing key, writes
/etc/verg/ops/allow.conf(which the console cannot write) and starts theverg-agent-opsservice.sudo verg-agent allow operations --operator owner-mac ed25519:... - Ask:
verg ops inventory web-1 verg ops status web-1 suddengone verg ops log web-1
Operations need agent 1.7.0 or newer on Linux with OpenSSL 3 (Ubuntu 22.04, Debian 12, RHEL 9 or newer). A Mac cannot turn them on: its openssl cannot check these signatures, so Macs may get the read verbs later, once that is solved without new software on the Mac.
What the console can ask
| Verb | What the server sends back |
|---|---|
inventory.scan | What runs on the machine: services, timers, listening ports, containers, Caddy sites and disk use. |
app.status | The state of one app: its services, its containers and its current release, by name. |
secret.apply | Opens one sealed version with the machine's own age key and writes it as the app's env file or one of its secret files (root and the app's group may read it, mode 0640). The sealed copy is kept on the machine for a rollback. |
secret.send | Reads the app's env file or one secret file on this machine and seals it to the age key of the node named, whose fingerprint is in the signed request. The value never leaves the machine unsealed. |
The two read verbs only read. They never read environment files, keys or the contents of any file, apart from the site addresses in Caddy's own files under /etc/caddy (the line that opens each site block). The two secret verbs change files, only under /etc/verg/apps, and a server allows them only when root names them with --verbs; see Sealed secrets. Each verb runs in its own short-lived systemd unit with a two minute limit, a 256 MB memory cap, low CPU and disk priority, and a read-only view of the machine (secret.apply may write in the apps folder and nowhere else). There is no verb that runs a command, and there will not be one.
The request
A request is one line of JSON in a fixed form: keys in order, no spaces, and values from a small set of characters that never need escaping. The CLI shows it, signs those exact bytes with Ed25519, and the server checks those exact bytes, so nothing can be changed or reinterpreted on the way.
{"args":{},"id":"op_3f2a91c2d4e5b6a7c8d9e0f1","issued_at":"2026-11-30T11:02:00Z","node":"nod_8c1e...","not_after":"2026-11-30T11:07:00Z","signer":"SHA256:If4x36FU...","v":1,"verb":"inventory.scan"}The server checks, in this order, before anything runs: operations are allowed on it; the request is in exactly this form; it names this server; root allowed its verb; its arguments pass the server's own checks; it is valid now (at most 15 minutes from start to end, with 2 minutes allowed for clocks that differ); it was signed by a key pinned on this server, and the signature is good (checked with openssl pkeyutl); and its id was never seen before. Ids are remembered for 7 days after their end, under a lock, so a request runs once. A refusal comes back with its reason.
The answer is signed with the server's own key, made on the machine. The CLI remembers that key the first time it sees it (and says so, with the fingerprint that sudo verg-agent ops status prints on the machine), checks every answer against it, and refuses to show an answer whose signature does not match.
What a stolen console session can and cannot do
| Someone with | Can | Cannot |
|---|---|---|
| A stolen console session or API key | Read what that person could read: the operations, their answers, the public halves of keys. Add an operator key to the console. | Make any server run anything, read or not: every request needs a signature from a key pinned on the server, and those keys are on people's computers. Pin a key on a server, or turn operations on. |
| The console itself | Hold back requests, or show a page that is not true. | Sign a request, change a server's allow file or its pinned keys, or fake a server's answer to the CLI (the answer is signed with the server's key). |
| Your computer and its operator key | Ask the read verbs of every server that pinned that key. | Anything on a server that did not pin it. Remove the key on each server and in the console, then make a new one. |
On the server
sudo verg-agent allow operations --operator NAME ed25519:KEY # turn on, pin a key
sudo verg-agent deny operations # turn off at once; pinned keys are kept, and do nothing
sudo verg-agent ops status # on or off, verbs, this machine's key, pinned keys
sudo verg-agent ops log # every request, who signed it, the decision
sudo verg-agent ops add-operator NAME ed25519:KEY # pin another key
sudo verg-agent ops remove-operator NAME # unpin oneThe files: /etc/verg/ops/allow.conf (what is allowed), /etc/verg/ops/operators (pinned keys), /etc/verg/ops/node.key (this machine's signing key, readable by root only), /var/lib/verg/ops/seen (request ids already run) and /var/log/verg/ops.log (every decision, which only the agent appends to and the console cannot reach). verg-agent reset and uninstall turn operations off and delete the keys; the log stays.
The cost
A server that never allows operations pays nothing: one file check in each report. One that allows them keeps one quiet connection to the console, held up to 25 seconds at a time, and a request starts within a second or two of being signed.
Rotating keys
To replace a key, make a new one with verg ops keygen --name NEW, pin it on each server with sudo verg-agent ops add-operator, then remove the old one on each server with sudo verg-agent ops remove-operator and under VergShip, Operator keys. Removing a key in the console alone does not reach into a server, on purpose: only root on a machine changes what it trusts.
The API
The CLI is a thin client of https://api.cloudverg.com/v1/ops: GET /v1/ops/nodes, GET and POST /v1/ops/keys, POST /v1/ops/requests with {"request": "...", "signature": "..."}, and GET /v1/ops/requests/{id} for the answer and its signature. See the API reference.