rootsign-admin is the operator CLI: it runs the local PostgreSQL database, creates RootSign’s tables, and uploads sessions that were spooled while the cloud endpoint was unreachable. It is installed with rootsign. Commands you run against sessions, such as verify and approve, are on rootsign.
init and status connect to the database at DATABASE_URL_SYNC. Its default, postgresql+psycopg2://rootsign:rootsign@localhost:5432/rootsign_dev, is the database start-db creates. Settings come from environment variables, or from a .env file in the directory you run the command from.
A command-line mistake, such as an unknown option, exits 2. --help exits 0.
rootsign-admin start-db
rootsign-timescaledb from timescale/timescaledb:latest-pg16 (PostgreSQL 16 with TimescaleDB 2), then waits up to 30 seconds for it to accept connections. If the container already exists, it is started again. The data lives in a Docker volume named rootsign_pgdata, so it survives removing the container.
The host port to publish PostgreSQL on. It applies only when the container is created: an existing container keeps the port it was created with. With another port, set
DATABASE_URL and DATABASE_URL_SYNC to match.Starting existing rootsign-timescaledb.... If it is already running, the command prints rootsign-timescaledb already running. and does nothing else.
The database is rootsign_dev, with user rootsign and password rootsign. It is meant for a laptop, not for production.
The
rootsign_pgdata volume was added after RootSign 0.3.1. In 0.3.1 and earlier, each new container got an empty volume, so stop-db --remove followed by start-db started with no data.rootsign-admin stop-db
rootsign-timescaledb container. Docker prints the container’s name when it stops. If there is no such container, the command prints rootsign-timescaledb not found — nothing to stop. and exits 0.
Also remove the container. The data stays in the
rootsign_pgdata volume, and the next start-db uses it again. To delete the data as well, run docker volume rm rootsign_pgdata after removing the container.0 when the container is stopped, and 1 when docker is not on your PATH or Docker fails.
rootsign-admin init
DATABASE_URL_SYNC. Running it again is safe: an up-to-date database is left as it is. Run it after installing a new RootSign version, before you start recording.
Drop the whole
public schema, and everything in it, before creating the tables. You are asked to confirm first.--reset, it asks before dropping anything. The password in the URL is hidden:
n, or pressing Enter, prints Aborted. and exits 1 without changing the database.
When the database cannot be used,
init prints one line, such as Error: cannot use the database at postgresql+psycopg2://rootsign:***@localhost:5432/rootsign_dev: ... Check that it is running and that DATABASE_URL_SYNC points at it.
rootsign-admin status
(missing). If every table is missing, run rootsign-admin init.
Exits 0 when the database could be reached, even if tables are missing, and 1 when it could not.
rootsign-admin sync
sync uploads every spooled session, and moves each fully accepted file to spool/synced/. Running it again is safe: records the endpoint already has count as delivered, and a session that did not finish is picked up where it stopped.
The spool folder to read. Defaults to
ROOTSIGN_SPOOL_DIR if set, and otherwise to spool inside ROOTSIGN_DATA_DIR (~/.rootsign/spool).Nothing to sync — no spooled sessions under <spool>. and exits 0.
An upload prints one line per session, followed by the path and SHA-256 of its sync receipt:
For example, against an unreachable endpoint:
spool/receipts/<session_id>.sync.json: what the endpoint accepted, already had, or refused and why. rootsign export includes the receipt in the session’s evidence bundle as sync-receipt.json. Record the printed receipt hash somewhere outside the spool if you need to prove later that the receipt was not edited.
The
FAILED line for an unreachable endpoint was added after RootSign 0.3.1. In 0.3.1 and earlier, an outage was reported as REJECTED, although the receipt recorded it as a transport failure.Related
rootsign
Verify, export and approve sessions.
Require human approval
Set up the PostgreSQL backend and approve held tool calls.