harnessd CLI
Every harnessd command and option, with examples and exit behaviour.
usage: harnessd <serve|check|user|audit> [args] --config <harnessd.yaml>
serve run the server
check validate configuration and security posture
fingerprint print the TLS certificate's SHA-256 (to pin in the Mac app)
user add <name> --role <role> create an account (roles: admin, operator, viewer)
user passwd <name> change a password (signs out the user's sessions)
user totp <name> [--disable] enroll (or remove) an authenticator app
user disable|enable|remove <name>
user list
audit verify verify the audit log hash chain
--password-stdin read the password from stdin instead of promptingGlobal options#
| Option | Description |
|---|---|
--config <path> | The configuration file. Default: $HARNESSD_CONFIG, then /etc/harness/harnessd.yaml. |
Every command loads the configuration, creates data_dir (mode 0700) if needed, and runs with a 0077 umask. Run commands as the harness user (sudo -u harness harnessd …) so files keep the right owner. Errors are printed to standard error as harnessd: <message>, with exit code 1.
serve#
harnessd serve --config /etc/harness/harnessd.yamlRuns the security checks and refuses to start on any error (refusing to start: followed by the list). Then it removes leftover containers from an earlier run, loads and clones projects, starts those with auto_start, and serves the API on listen and the tools endpoint on tools_listen. It logs the certificate fingerprint at startup. SIGTERM and SIGINT shut down gracefully, stopping every orchestrator.
check#
harnessd check --config /etc/harness/harnessd.yamlValidates the configuration and security posture, prints warning: and error: lines, then:
ok: configuration passes security checks (3 project(s), 4 user(s))or FAILED: N error(s) with exit code 1. See Security checks.
fingerprint#
harnessd fingerprint --config /etc/harness/harnessd.yamlPrints the SHA-256 of the TLS certificate (the leaf, DER) as colon-separated hex. It's the value clients pin, and matches openssl x509 -noout -fingerprint -sha256 -in <cert>.
user#
| Command | Description |
|---|---|
user add <name> --role admin|operator|viewer | Creates an account. Prompts for the password twice, or reads one line with --password-stdin. |
user passwd <name> | Changes the password and signs out the user's sessions. |
user totp <name> | Enrolls an authenticator: prints an otpauth:// URI and the secret, then asks for the current code. |
user totp <name> --disable | Removes the authenticator. |
user disable <name> / user enable <name> | Disables (signs out and blocks) or re-enables an account. |
user remove <name> | Deletes the account. |
user list | One line per account: name, role, and disabled / totp flags, tab-separated. |
sudo -u harness harnessd user add rob --role admin
sudo -u harness harnessd user totp rob
printf '%s\n' "$PW" | sudo -u harness harnessd user add ci --role viewer --password-stdin
sudo -u harness harnessd user list
# ci viewer
# rob admin totpEach user command is recorded in the audit log with the actor cli. Password rules: see Usernames and passwords.
audit verify#
harnessd audit verify --config /etc/harness/harnessd.yaml
# ok: 18342 record(s), hash chain intactRecomputes the hash chain of data_dir/audit/audit.jsonl. On a break it prints audit chain broken at line N of M and exits 1.