Configuration
ferrixd reads a single TOML file — ./ferrixd.toml by default, or wherever -c/--config points. This page is a guided tour; the complete field-by-field schema lives in the configuration reference.
The workflow
ferrixd gen-config # 1. scaffold a commented ferrixd.toml
$EDITOR ferrixd.toml # 2. edit
ferrixd check # 3. validate config AND TLS material, print a summary
ferrixd # 4. run (equivalent to `ferrixd run`)ferrixd check is not a syntax check only — it loads the certificates and keys, so a broken PEM file fails here, not at 3 a.m. during a restart.
Fail-closed configuration
The parser rejects unknown keys. If you typo moddt = […], the server refuses to start instead of silently ignoring your MOTD. This is deliberate: a config that loads is a config that means what you think it means.
A minimal real server
[server]
name = "irc.example.org" # advertised server name (numerics, prefixes)
network = "examplenet" # ISUPPORT NETWORK=
tls_bind = "0.0.0.0:6697"
[tls]
cert = "/etc/ferrixd/fullchain.pem"
key = "/etc/ferrixd/privkey.pem"That's everything a working TLS-only server needs. Everything else on this page is opt-in — and every feature added since 1.0 (the web client, uploads, calls, multiclient, …) is off until you configure it.
Where to start
Most servers need only four more sections: [persistence] (history and registrations survive restarts), [[operators]] (someone can moderate), [control] (backups and graceful restarts) and [metrics]. Add [web] when you want a browser client.
Section by section
[server] — identity and listeners
[server]
name = "irc.example.org"
network = "examplenet"
casemapping = "ascii" # or "rfc1459"; must match network-wide
motd = [
"Welcome to examplenet.",
"Be excellent to each other.",
]
tls_bind = "0.0.0.0:6697"casemappingdecides how nicks and channel names fold (asciiis the modern default;rfc1459treats{}|^as[]\~). Pick one per network and don't change it with users online.motdis a list of lines, no file needed. Reloadable withREHASH.icon(optional) advertises a network icon URL to clients that support it (IRCv3draft/network-icon, sent asISUPPORT draft/ICON=):
icon = "https://examplenet.org/icon.svg"descriptionis the free-text line shown inLINKSandWHOIS(default: the network name).chantypes(default"#&") chooses the channel prefixes users may create:#network-wide,&local to this server,+modeless. See Channels.passwordsets a connection password (PASS) for private servers.stsadvertises an IRCv3 strict-transport-security policy, so capable clients upgrade to TLS and stay there:
sts = { port = 6697, duration = 2592000, preload = false }Plaintext, if you really need it, is loopback-only by design:
plain_bind = "127.0.0.1:6667"
# binding plain_bind to a non-loopback address is a config ERROR unless:
# allow_plain_nonlocal = trueWebSockets let browser clients connect natively (no gateway):
wss_bind = "0.0.0.0:7443" # secure; terminates TLS with the [tls] cert
ws_bind = "127.0.0.1:7080" # plaintext; loopback-only (same rule as plain_bind)wss_bind is the browser-facing form and reuses the [tls] certificate (and its REHASH reloads). Each IRC line is one WebSocket message; the server negotiates the text.ircv3.net/binary.ircv3.net subprotocols. See TLS → WebSocket transport.
Host cloaking hides user hostnames behind an unforgeable HMAC:
cloak_key = "a-long-random-secret-keep-this-private"See Operators & Moderation for what cloaks look like and how bans interact with them.
Federation identity (only needed when linking servers):
sid = "42F" # unique server id across the network
link_bind = "0.0.0.0:6666" # inbound S2S listener (omit for connect-only)[tls] — certificates
[tls]
cert = "/etc/ferrixd/fullchain.pem"
key = "/etc/ferrixd/privkey.pem"
# or, for development only:
# self_signed_dev = true
# dev_hostnames = ["localhost", "irc.example.test"]cert/key must be set together. If neither is set, either [tls.acme] must be configured or self_signed_dev must be true. The files are watched and reloaded automatically when they change (reload_interval_secs, default 60). To let ferrixd obtain and renew its own certificate instead:
[tls.acme]
domains = ["irc.example.org"]
contact = ["mailto:admin@example.org"]
dir = "/var/lib/ferrixd/acme"
http_bind = "0.0.0.0:80" # must be reachable as port 80 of every domain
accept_terms = trueFull details, Let's Encrypt notes, ACME and the built-in gen-cert helper: TLS Certificates.
[limits] — budgets and DoS controls
Every limit has a sensible default; the section is optional. The interesting knobs:
[limits]
registration_timeout_secs = 30 # unregistered connections are dropped after this
handshake_timeout_secs = 15 # TLS handshake budget
ping_interval_secs = 120 # idle PING; 2nd miss disconnects
max_clients_per_ip = 10 # per-IP connection throttle
max_channels = 50 # per-client channel cap (opers exempt)
sendq_lines = 2048 # outbound queue depth; overflow = disconnect
recv_burst = 20 # inbound token bucket: burst…
recv_rate = 10 # …and sustained commands/sec
history_len = 500 # retained messages per chathistory target
history_max_targets = 50000 # bound on distinct in-memory history targetsWire-length budgets (max_tag_bytes, max_body_bytes, max_line_bytes) default to the IRCv3 values — leave them alone unless you know why you're changing them. The full table with all defaults: Limits & Defaults.
[[accounts]] — seed accounts for SASL
[[accounts]]
name = "alice"
password_hash = "$argon2id$v=19$m=19456,t=2,p=1$…$…" # ferrixd hash-password
fingerprints = ["a1b2c3…"] # SASL EXTERNAL (optional)Plaintext password = "…" also works (hashed with Argon2id at startup) but belongs in development only. Users can also self-register at runtime with REGISTER, and those accounts persist if [persistence] is enabled. All of this: Accounts & SASL.
[[operators]] — IRC operators
[[operators]]
name = "admin"
password_hash = "$argon2id$…"Grants access to OPER, and through it KILL, K/D/G-lines, WALLOPS, CHGHOST, REHASH, CONNECT/SQUIT and DIE/RESTART. The same credential logs in to the admin dashboard. Restrict a block with hosts = ["*!*@203.0.113.7"]. See Operators & Moderation.
[[bans]] — startup K-lines
[[bans]]
mask = "*!*@203.0.113.0/24"
reason = "Banned network"Matched at registration; reloadable with REHASH.
[[webirc]] — trusted WEBIRC gateways
Let a web/IRC gateway present a client's real host and IP (so users behind it are seen and moderated by their own address, not the gateway's):
[[webirc]]
name = "kiwi" # matched against the WEBIRC <gateway> field
password = "long-random-shared-secret"
hosts = ["127.0.0.1", "10.0.0.*"] # source addresses the gateway may useA WEBIRC is honoured only as the connection's first command, from an allow-listed source, with a matching secret (compared in constant time); the spoofed IP is then re-checked against D-lines. Reloadable with REHASH.
[persistence] — SQLite durability
[persistence]
path = "/var/lib/ferrixd/ferrixd.db"
load_limit = 5000 # recent messages loaded into RAM at startupOne file for everything durable: chathistory rows (with a full-text search index), registered channels, self-registered accounts and the E2EE key directory all live here and survive restarts — including msgid continuity. Omit the section for in-memory-only operation. Details: Message History.
[metrics] — Prometheus endpoint
[metrics]
bind = "127.0.0.1:9090" # scrape http://127.0.0.1:9090/metricsBind it to loopback (or a private interface) — there is no auth on the endpoint. Metric catalogue: Metrics.
[plugins] — WASM plugin host
[plugins]
dir = "/etc/ferrixd/plugins" # every *.wasm in here is loaded at startup
fuel = 5000000 # per-call instruction budgetCapabilities a plugin may use ([plugins.grants]), its settings ([plugins.config.<name>]), allowed HTTP hosts and bot identities are configured per plugin. See WASM Plugins.
[[links]] — S2S peers
[[links]]
name = "irc2.example.org"
connect = "irc2.example.org:6666" # omit for accept-only
fingerprint = "a1b2c3…" # peer cert SHA-256 (ferrixd fingerprint)
password = "shared-link-secret"See Federation for the full linking walkthrough.
Platform features
Everything in this section is optional. All of it is off until configured, with one exception: account self-registration (REGISTER) is open by default, without verification — see [account_registration] to require e-mail verification, or close it with ferrixd ctl set registration off.
[control] — ferrixd ctl
[control]
socket = "/run/ferrixd/ctl.sock" # mode 0600 — whoever can open it is admin
# bind = "127.0.0.1:6699" # Windows/containers: loopback TCP…
# token_env = "FERRIXD_CTL_TOKEN" # …with a token from this env variableLets you administer the running server from its shell: ferrixd ctl status, rehash, kill, bans add …, an online backup, a graceful drain for restarts, and runtime switches. See the CLI reference.
[web] and [admin] — browser client and dashboard
[web]
bind = "0.0.0.0:8443" # HTTPS with the [tls] certificate
client = true # serve the web client from `root`
root = "/usr/share/ferrixd/web" # the extracted ferrixd-web.tar.gz
# irc = true # IRC over WebSocket at /irc (default)
# public_url = "https://chat.example.org" # behind a reverse proxy
[admin]
bind = "127.0.0.1:8080" # loopback unless tls = true
overrides = "/var/lib/ferrixd/overrides.json"One port serves the web client, IRC over WebSocket and file uploads; the dashboard stays on loopback. See Web Client & Admin.
[filehost] — uploads
[filehost]
enabled = true # needs [web]
quota_bytes = 524288000 # 500 MiB per account
retention_days = 30
[filehost.storage]
kind = "local" # or "s3"
path = "/var/lib/ferrixd/uploads"Authenticated users can share files and voice messages (soju.im/FILEHOST). See File Uploads.
[account_registration] — who may register
[account_registration]
verification = "smtp" # none | smtp | command
max_per_ip_per_hour = 5
[account_registration.smtp]
host = "smtp.example.org"
password_env = "FERRIXD_SMTP_PASSWORD"
username = "irc@example.org"
from = "irc@example.org"REGISTER is open by default; with verification, a new account must be confirmed with an e-mailed code. Registration can be closed at runtime (ferrixd ctl set registration off). See Accounts → Self-registration.
[multiclient] and [nicks] — identity comfort
[multiclient]
enabled = true # several devices share one user
always_on = true # stay present (away) like a bouncer
rejoin = true
[nicks]
reserve_account_nicks = true # an account's name is its owner's nick
delay_secs = 60 # RFC 2811 nick delay after netsplitsSee Accounts → multiclient and nick protection.
[calls] and [e2ee] — real-time extras
[calls]
enabled = true
stun_urls = ["stun:turn.example.org:3478"]
turn_urls = ["turn:turn.example.org:3478"]
turn_secret_env = "FERRIXD_TURN_SECRET" # coturn static-auth-secret
[e2ee]
enabled = true # experimental key directorySee Calls & E2EE.
[dnsbl] — DNS blocklists
[[dnsbl.lists]]
zone = "dnsbl.dronebl.org"
action = "reject" # reject | mark | banSee Operators → DNS blocklists.
[logging] — log format
[logging]
format = "json" # full | compact | pretty | json
filter = "info"See Observability.
[[services]] — RFC 2812 services
[[services]]
name = "stats"
password = "long-random-secret"
hosts = ["127.0.0.1"]Lets an external helper register with SERVICE instead of as a user. See IRC Commands → Services.
Secrets in the environment
Fields that hold third-party secrets name an environment variable instead of containing the value: password_env (SMTP), turn_secret_env (TURN), access_key_env/secret_key_env (S3), token_env (control TCP) and "$env:NAME" values in [plugins.config]. Set them in the service unit (Environment=/EnvironmentFile=) or the container environment, and the config file itself can be world-readable. Link passwords, WEBIRC and service passwords and cloak_key still live in the file — keep it 0640 root:ferrixd.
Reloading without restarting
REHASH (oper-only, or ferrixd ctl rehash) re-reads the config file and applies the reloadable subset — accounts, operators, bans, the MOTD, WEBIRC gateways, services, the connection password, registration, nick, DNSBL, multiclient, call, E2EE and upload-limit settings, plugin grants, link definitions and the TLS certificate/key — without dropping a single connection. Listener bind addresses, [limits], [persistence], [web], [admin], [control] and the plugins themselves still require a restart. See what REHASH reloads and Operators & Moderation.
Validating in CI
ferrixd check exits non-zero on any problem, which makes it a natural pre-deploy gate:
ferrixd -c deploy/ferrixd.toml check