Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.allthingslinux.org/llms.txt

Use this file to discover all available pages before exploring further.

The IRC stack is configured entirely through environment variables in .env and config templates processed by scripts/prepare-config.sh at startup — you never edit the generated config files directly.

How config templating works

UnrealIRCd and Atheme both use template files that contain ${VARIABLE} placeholders. When you run just init or just dev, the scripts/prepare-config.sh script runs envsubst to substitute your .env values into the templates, producing the final config files.
TemplateOutputService
apps/unrealircd/config/unrealircd.conf.templateapps/unrealircd/config/unrealircd.confUnrealIRCd
apps/atheme/config/atheme.conf.templateapps/atheme/config/atheme.confAtheme
To add a new config block, edit the .template file (not the generated .conf), add any new ${VARIABLES} to .env.example, and re-run scripts/prepare-config.sh (or just init).
Warning: Never edit the generated .conf files directly. They are overwritten on every just init or just dev run.

Environment variables

All IRC-related variables are defined in the IRC SERVICE section of .env.example. Copy .env.example to .env and customise before first run.

Network identity

VariableDescriptionRequiredDefault
IRC_DOMAINPublic hostname of the IRC serverYesirc.atl.chat
IRC_ROOT_DOMAINRoot domain for the networkYesatl.chat
IRC_NETWORK_NAMEHuman-readable network name shown to clientsYesAll Things Linux IRC
IRC_CLOAK_PREFIXPrefix for cloaked hostnames (e.g. atl-ABC123.users.atl.chat)Yesatl

Build versions

VariableDescriptionRequiredDefault
UNREALIRCD_VERSIONUnrealIRCd Docker image git tagYes6.2.0.1
ATHEME_VERSIONAtheme Docker image git tagYesmaster

Ports

VariableDescriptionRequiredDefault
IRC_TLS_PORTClient TLS portYes6697
IRC_SERVER_PORTServer-to-server TLS portYes6900
IRC_RPC_PORTJSON-RPC API port (WebPanel)Yes8600
IRC_WEBSOCKET_PORTWebSocket port for web clientsYes8000

Security secrets

VariableDescriptionRequiredDefault
IRC_CLOAK_KEY_1First cloak key for IP maskingYesExample key (change for prod)
IRC_CLOAK_KEY_2Second cloak keyYesExample key (change for prod)
IRC_CLOAK_KEY_3Third cloak keyYesExample key (change for prod)
IRC_OPER_PASSWORDIRC operator password (argon2id hash)Yeschange_me_irc_oper_password
IRC_DRPASSPassword for /DIE and /RESTART commandsYeschange_me_drpass
IRC_SERVICES_PASSWORDAtheme ↔ UnrealIRCd link passwordYeschange_me_secure_services_pass
ATL_WEBIRC_PASSWORDWEBIRC password for gateway proxyYeschange_me_webirc_password
Warning: All change_me_* values must be replaced before any public deployment. See Security for generation instructions.

Admin info

VariableDescriptionRequiredDefault
IRC_ADMIN_NAMEAdmin name shown in /ADMINYesAll Things Linux
IRC_ADMIN_EMAILAdmin email shown in ban messagesYesadmin@allthingslinux.org
IRC_STAFF_VHOSTVirtual host for IRC operatorsYesallthingslinux.org

STS (Strict Transport Security)

VariableDescriptionRequiredDefault
IRC_STS_DURATIONSTS cache duration (start low: 1m, increase to 180d)Yes1m
IRC_STS_PRELOADEnable STS preload in clientsYesno

TLS certificate paths

VariableDescriptionRequiredDefault
IRC_SSL_CERT_PATHPath to fullchain.pem inside containerYes/home/unrealircd/unrealircd/certs/live/irc.atl.chat/fullchain.pem
IRC_SSL_KEY_PATHPath to privkey.pem inside containerYes/home/unrealircd/unrealircd/certs/live/irc.atl.chat/privkey.pem
VariableDescriptionRequiredDefault
IRC_SERVICES_SERVERAtheme server name in the IRC networkYesservices.atl.chat
ATHEME_SERVER_NAMEAtheme’s own server identityYesservices.atl.chat
ATHEME_SERVER_DESCAtheme server descriptionYesAll Things Linux IRC Services
ATHEME_UPLINK_HOSTHost Atheme connects to (localhost via network namespace)Yes127.0.0.1
ATHEME_UPLINK_PORTPort Atheme connects to on UnrealIRCdYes6901
ATHEME_NUMERICAtheme server numeric identifierYes00A
ATHEME_RECONTIMEReconnect interval in secondsYes10
ATHEME_HTTPD_PORTAtheme JSON-RPC HTTP portYes8081

WebPanel

VariableDescriptionRequiredDefault
WEBPANEL_PORTWebPanel HTTP portYes8080
WEBPANEL_RPC_USERRPC username for WebPanel → UnrealIRCdYesadminpanel
WEBPANEL_RPC_PASSWORDRPC passwordYeschange_me_webpanel_password

The Lounge

VariableDescriptionRequiredDefault
THELOUNGE_PORTThe Lounge web client portYes9000
THELOUNGE_WEBIRC_PASSWORDWEBIRC password for The Lounge → UnrealIRCdYeschange_me_thelounge_webirc
THELOUNGE_DELETE_UPLOADS_AFTER_MINUTESAuto-delete uploaded files after N minutesNo1440

Cloak keys

Cloak keys mask user IP addresses so that real IPs are never visible to other users. Three keys are required and must be identical across all servers in the network.

Generating cloak keys

Use the built-in generation command:
just irc gencloak
This runs scripts/gencloak-update-env.sh, which:
  1. Spins up a temporary UnrealIRCd container
  2. Runs the gencloak command to generate three cryptographically random keys
  3. Updates IRC_CLOAK_KEY_1, IRC_CLOAK_KEY_2, and IRC_CLOAK_KEY_3 in your .env file
  4. Re-runs scripts/prepare-config.sh to apply the new keys to the config
After generating new keys, reload the config:
just irc reload
Warning: Changing cloak keys changes every user’s cloaked hostname. Existing channel bans based on cloaked hosts will stop matching. Coordinate key changes with your operator team.

Config template structure

The main template at apps/unrealircd/config/unrealircd.conf.template is organized into the following sections:
SectionLinesContents
Third-party modules320–370cloak_sha256, metadata, react, redact, relaymsg-atl
Server identity (me {})370–380Server name, SID, network info
Proxy/WEBIRC blocks380–420NPM gateway, The Lounge, X-Forwarded-For trust
Listen blocks420–460Ports 6697, 6900, 6901, 8600, 8000, Unix sockets
TLS configuration460–540Protocols, ciphers, STS, plaintext/outdated policies
Link and allow blocks540–570Atheme services link, client allow rules
Ban nicks570–690Reserved nicknames (services, system names)
Blacklists (DNSBL)690–730DroneBL, EFnetRBL, Tornevall
Network set {} block730–760Network name, cloak keys, hidden host prefix
Oper blocks760–800Admin oper, bridge oper, RPC user
Logging800–840Text log (100M), JSON log (250M)
Server set {} block840–endModes, anti-flood, connthrottle, restrict-commands, history

Audit findings and recommendations

The following findings from a configuration audit remain relevant to the current setup. They are informational — the defaults work for development, but you should address them before production deployment.

TLS configuration

The TLS setup is strong: TLS 1.2+ only, ECDHE-only ciphers with forward secrecy, and post-quantum hybrid key exchange (X25519MLKEM768) when OpenSSL 3.5.0+ is available. STS is enabled with a configurable phased rollout (IRC_STS_DURATION).

Oper block security

The admin oper block restricts connections to the Docker network (172.16.0.0/12) and requires a TLS connection (require-modes "z"). The oper password must be an argon2id hash — generate one with:
docker run --rm ghcr.io/allthingslinux/unrealircd \
  ./unrealircd mkpasswd argon2 'your-password-here'

Connection throttling

The connthrottle module is loaded and configured with exemptions for identified users and those with established reputation scores. For production, review the connect-flood rate (currently 5:60 — 5 connections per 60 seconds per IP).

DNSBL configuration

Three DNS blacklists are configured: DroneBL, EFnetRBL, and Tornevall. The Tornevall DNSBL has had historical reliability issues and uses a broad reply code range (1–16). Consider removing it or narrowing the reply codes if you experience false positives.

Missing spamfilter rules

The included spamfilter.conf contains rules from 2005 targeting obsolete malware. For production, either write modern rules targeting current spam patterns (crypto scams, phishing, mass-highlight floods) or rely on dynamic spamfilters via the /SPAMFILTER command. Two additional modules from the third-party-modules.list are worth enabling for production:
  • third/block_masshighlight — blocks mass-highlighting (mentioning many nicks at once), a common harassment tactic
  • third/repeatprot — catches repeated messages that slip through rate limits