CLI Reference
The single ferrixd binary contains the server and all of its tooling — no side scripts, no openssl required. ferrixd --help and ferrixd <cmd> --help are always authoritative.
Global flags
Valid before any subcommand:
| Flag | Default | Meaning |
|---|---|---|
-c, --config <PATH> | ferrixd.toml | config file path |
--log <FILTER> | — | log filter, overrides RUST_LOG (e.g. debug, info,ferrixd::link=debug) |
--log-format <FMT> | full | full | compact | pretty | json; overrides [logging] format |
--color <WHEN> | auto | auto | always | never |
Exit status: 0 on success; any error prints error: … to stderr and exits 1.
ferrixd [run]
Runs the server. run is the default — ferrixd alone does the same.
ferrixd
ferrixd run --dev| Flag | Meaning |
|---|---|
--dev | ignore the config file; start a zero-config local server: TLS on 127.0.0.1:6697 (ephemeral self-signed cert) plus plaintext on 127.0.0.1:6667 |
Starts the TLS listener and whatever else the configuration enables: the plaintext and WebSocket listeners, the [web] and [admin] HTTP(S) servers, the [control] endpoint, the metrics endpoint, the ACME challenge responder, the plugin host, and the S2S link listener and outbound connectors. Runs until Ctrl-C or SIGTERM — both trigger the same graceful shutdown (persistence queue drained, connections closed) — or until an operator's DIE, RESTART (re-executes the binary) or ferrixd ctl drain.
ferrixd check
ferrixd -c /etc/ferrixd/ferrixd.toml checkLoads and validates the configuration and builds the TLS material — certificate/key errors surface here rather than at startup. Prints a colorized summary of what a run would start (listeners, limits, counts of accounts/operators/bans, persistence, metrics, links, plugins). Exits non-zero on any problem; designed as a CI/deploy gate.
With [tls.acme], check validates the certificate in the ACME dir if one has been issued, and otherwise the temporary self-signed placeholder the server starts with until the CA delivers.
ferrixd gen-config
Alias: genconfig.
ferrixd gen-config # writes ./ferrixd.toml
ferrixd gen-config -o /etc/ferrixd/ferrixd.toml -f| Flag | Default | Meaning |
|---|---|---|
-o, --output <PATH> | ferrixd.toml | destination |
-f, --force | off | overwrite an existing file |
Writes the fully commented example configuration (the same one documented in the configuration reference).
ferrixd gen-cert
Alias: gencert.
ferrixd gen-cert -H irc.example.org -H irc-alt.example.org \
--cert /etc/ferrixd/cert.pem --key /etc/ferrixd/key.pem| Flag | Default | Meaning |
|---|---|---|
-H, --host <NAME> | localhost | subject/SAN hostname; repeatable |
--cert <PATH> | cert.pem | certificate output |
--key <PATH> | key.pem | private key output (mode 0600 on Unix) |
-f, --force | off | overwrite existing files |
Mints a self-signed certificate + key (PEM) and prints the certificate's SHA-256 fingerprint — ready for [[links]].fingerprint pinning or SASL EXTERNAL.
ferrixd hash-password
Alias: hashpw.
ferrixd hash-password
ferrixd hash-password --confirm
ferrixd hash-password --toml # password_hash + scram, ready to paste
echo -n 's3cret' | ferrixd hash-password # first stdin line when not a TTY| Flag | Meaning |
|---|---|
--confirm | prompt twice and require a match |
--toml | print password_hash = "…" and scram = "…" — the SCRAM credential an account needs for SASL SCRAM-SHA-256, which cannot be derived from the Argon2 hash (why) |
Reads a password (no echo on a TTY) and prints its Argon2id PHC hash for password_hash fields in [[accounts]] / [[operators]]. Refuses an empty password.
ferrixd fingerprint
ferrixd fingerprint /etc/ferrixd/cert.pemPrints the SHA-256 fingerprint (lowercase hex) of a PEM certificate — the format expected by [[links]].fingerprint and [[accounts]].fingerprints.
ferrixd ctl
Administers a running server through its control endpoint ([control]) — for scripts, Ansible, Kubernetes hooks, or an operator without an IRC client.
ferrixd ctl status
ferrixd ctl kill mallory flooding the network
ferrixd ctl --json clients | jq '.[] | select(.idle_secs > 3600) | .nick'
ferrixd ctl backup /backup/ferrixd.db
ferrixd ctl drain| Flag | Description |
|---|---|
--socket <PATH> | control socket to use (default: [control] socket from -c's config) |
--addr <ADDR> | use the loopback TCP endpoint instead; the token is read from $FERRIXD_CTL_TOKEN (or the variable [control] token_env names) |
--json | print the raw JSON response |
| Command | What it does |
|---|---|
status | name, version, uptime, counts, drain state, log filter, certificate expiry |
rehash | reload the configuration file (like REHASH) |
reload-certs | reload only the TLS certificate and key |
settings | the runtime switches (registration, calls, e2ee, multiclient) with their values and whether they are overridden |
set <setting> on|off|default | flip a runtime switch; it wins over the config file across REHASH, persists to [admin] overrides when set, and default returns to the file's value |
log-level [filter] | show or change the log filter at runtime, e.g. info,ferrixd::link=debug |
clients | local connections: nick, user, host, IP, account, oper, idle… |
kill <nick> [reason] | disconnect a local or remote user |
channels / links | channels on this server / linked and known servers |
connect <name> / squit <server> [reason] | bring a configured link up / drop a direct link |
accounts | every account (self-managed and configured) |
account create <name> <password> [email] | create a self-managed account |
account delete <name> | delete it with its registrations, read markers and DMs |
account set-password <name> <password> | set its password |
channel register <#chan> <founder> / channel drop <#chan> / channel list | channel registrations |
channel set-modes <#chan> <modes> [args…] | change modes as the server (propagated) |
bans list / bans add|del kline|gline|dline <mask> [reason] | server bans |
bans purge <set-by> | remove every K/G-Line set by one source, e.g. plugin:netguard (G-Line removals propagate) |
plugins | loaded plugins with their live grants and call/block/trap counters |
plugin revoke <plugin> <capability> | revoke a grant from a running plugin until the next REHASH |
backup <file> | consistent online copy of the SQLite database (refuses to overwrite) |
drain | refuse new connections, ask clients to move, shut down after the grace period |
help | this list |
Every command is logged as a control.command event; passwords are redacted. Exit status is 1 when the server reports an error.
ferrixd plugin inspect
ferrixd plugin inspect /etc/ferrixd/plugins/modbot.wasm [--json]Prints a plugin module's manifest (sidecar or embedded), SHA-256, hook exports, ferrix.* imports and the capabilities those imports need — without loading it into a server. Exits 1 when it finds a problem (a newer ABI than this server, a checksum mismatch, an unknown capability, or imports the manifest does not declare).
ferrixd completions
ferrixd completions bash|zsh|fish|elvish|powershellEmits a shell-completion script to stdout. See Installation for where to put it.
Signals
| Signal | Effect |
|---|---|
SIGINT (Ctrl-C) | graceful shutdown |
SIGTERM | graceful shutdown (what systemctl stop / docker stop send) |
Graceful shutdown drains the persistence write queue (2-second grace) and closes connections cleanly.