Hosts and agents
How a server running the agent enrolls, reports in, updates and goes offline.
A host is a server running the Rowsafe agent (with Docker, the agent container). One host can protect several databases. The dashboard calls them Servers.
HOST ID AGENT PLATFORM CHANNEL PIN LAST UPDATE LAST SEEN
db-1 host_9h8g7f6e5d4c3 0.4.2 linux/amd64 stable - confirmed 12s agoEnrollment
A host joins your organization with a one-time enrollment token (rse_...). Three ways:
- Approve in the browser. Run
curl -fsSL https://rowsafe.sh | sudo sh -s -- --account. It prints a link to an approval page showing the server's name, address and OS. An owner or admin approves; the installer gets a single-use token for that server (valid a day, never an API key). Deny anything you didn't start: whoever sent the link wants their server in your organization. - From your computer, over SSH.
rowsafe hosts add [email protected]makes a token for that server and runs the installer there. Nothing to copy or approve. - Copy a token. Servers → Add a server shows the command with a fresh token. Use this for automation.
The token works once. The agent trades it for its own identity in /var/lib/rowsafe/agent.json; you can then delete the token from its config.
What the agent does
- Runs as
postgres, never root, over the local Unix socket only. - Outbound HTTPS only. On a standby, it also checks every few seconds that the primary's PostgreSQL port answers.
- Runs a fixed task list: inspect, adopt, check, backup, drill (Proof), restore point (Mark), restart (only if you allowed it), and the standby tasks you start.
- Has its own key pair (
/var/lib/rowsafe/box.key,postgresonly). Standby secrets are encrypted to it, so Rowsafe never reads them.sudo -u postgres rowsafe-agent keyprints its fingerprint. - Gets at most half the default CPU and IO weight; the out-of-memory killer picks it before PostgreSQL.
Full list: Security.
Online and offline
Heartbeat every 30 seconds. Silent for 5 minutes raises the critical agent_offline alert. While offline:
- PostgreSQL keeps archiving to your bucket; restore to any second still works.
- Backups, Proof and metrics stop.
- After 10 minutes the database is no longer protected.
Why it's offline: Agent offline.
Updates
On servers the agent updates itself with signed releases, tests the new version and rolls back on failure. In Docker, change the image tag. Updating the agent.
Removing a host
Remove its databases first, then the host on Servers (or rowsafe hosts remove db-1). This revokes access but changes nothing on the server: uninstall the agent there.