grith daemon
Start, stop and check the daemon that owns the audit database, the digest queue and the dashboard - and authorise a browser.
grith daemon start | stop | restart | status | pairOne long-running process owns the audit database, the digest queue, the proxy, the session
registry, the reputation table and the HTTP server on 127.0.0.1:3141. Supervised
sessions are thin clients over it. No subcommand takes flags of its own.
ℹ️grith dashboard is the same command
grith dashboard <...> is an alias for grith daemon <...>, and most of the daemon's own
output still prints the dashboard spelling. Both work.
start
Spawns a detached background process and prints the URL, the pid and how to stop it. An
explicit start also disables idle shutdown, so the daemon stays up until you stop it.
A daemon that was auto-started by grith exec or grith run instead exits after
server.idle_shutdown_seconds, 30 by default.
If server.enabled = false, start and restart print
Dashboard server is disabled (server.enabled = false in config). and do nothing.
status
$ grith daemon status
Dashboard is not running.
Start: grith dashboard startThe other branches are worth recognising:
| What it prints | What it means |
|---|---|
Dashboard is running. with URL, PID, Pair: and Stop: lines | Normal. |
A Grith daemon (<v>) is listening on 127.0.0.1:<port>, but no PID file identifies its process. | An orphan from an earlier install or a crashed shell. grith daemon restart replaces it. |
Dashboard is not running. plus a line saying the port is in use by a process that is not a Grith daemon | Something else has the port. Free it, or change server.port. |
A version line is added when the daemon on the port is not this CLI's version. That
mismatch is also what makes grith exec refuse to start a session.
stop and restart
stop sends a shutdown request, waits for the process to exit, then removes the pid file.
If it has not exited it says so and offers kill -9 <pid> rather than pretending.
stop also handles an orphaned daemon with no pid file: it asks the port to shut down
over an authenticated request, and if that is refused it tells you to find the pid with
ss -ltnp yourself. restart is stop-then-start, and is the standard fix after upgrading
grith.
pair
Mints a single-use pairing code and builds a #pair=<code> URL, then either opens
your browser or prints the link.
$ grith daemon pair
Dashboard is not running. Start it with: grith dashboard startThe fragment never reaches the server. The dashboard app reads it in the browser, exchanges it for a dashboard token, stores the token and strips the URL. The token survives daemon restarts, so pairing is a one-off per browser.
If the daemon is up but the code cannot be minted you get
Could not reach the dashboard daemon to mint a pairing code. Is it running? (grith dashboard status).
See also
- Daemon and sessions - what the daemon owns
- Running as a daemon - service files and lifecycle
- API authentication - what the pairing token authorises