#room) and direct messages.
IRC ships as an extension plugin, but it is configured in the main config under channels.irc.
Quick start
- Enable IRC config in
~/.openclaw/openclaw.json. - Set at least:
- Start/restart gateway:
Security defaults
channels.irc.dmPolicydefaults to"pairing".channels.irc.groupPolicydefaults to"allowlist".- With
groupPolicy="allowlist", setchannels.irc.groupsto define allowed channels. - Use TLS (
channels.irc.tls=true) unless you intentionally accept plaintext transport.
Access control
There are two separate “gates” for IRC channels:- Channel access (
groupPolicy+groups): whether the bot accepts messages from a channel at all. - Sender access (
groupAllowFrom/ per-channelgroups["#channel"].allowFrom): who is allowed to trigger the bot inside that channel.
- DM allowlist (DM sender access):
channels.irc.allowFrom - Group sender allowlist (channel sender access):
channels.irc.groupAllowFrom - Per-channel controls (channel + sender + mention rules):
channels.irc.groups["#channel"] channels.irc.groupPolicy="open"allows unconfigured channels (still mention-gated by default)
nick!user@host forms.
Common gotcha: allowFrom is for DMs, not channels
If you see logs like:
irc: drop group sender alice!ident@host (policy=allowlist)
- setting
channels.irc.groupAllowFrom(global for all channels), or - setting per-channel sender allowlists:
channels.irc.groups["#channel"].allowFrom
#tuirc-dev to talk to the bot):
Reply triggering (mentions)
Even if a channel is allowed (viagroupPolicy + groups) and the sender is allowed, OpenClaw defaults to mention-gating in group contexts.
That means you may see logs like drop channel … (missing-mention) unless the message includes a mention pattern that matches the bot.
To make the bot reply in an IRC channel without needing a mention, disable mention gating for that channel:
Security note (recommended for public channels)
If you allowallowFrom: ["*"] in a public channel, anyone can prompt the bot.
To reduce risk, restrict tools for that channel.
Same tools for everyone in the channel
Different tools per sender (owner gets more power)
UsetoolsBySender to apply a stricter policy to "*" and a looser one to your nick:
toolsBySenderkeys can be a nick (e.g."eigen") or a full hostmask ("[email protected]") for stronger identity matching.- The first matching sender policy wins;
"*"is the wildcard fallback.
NickServ
To identify with NickServ after connect:register after the nick is registered to avoid repeated REGISTER attempts.
Environment variables
Default account supports:IRC_HOSTIRC_PORTIRC_TLSIRC_NICKIRC_USERNAMEIRC_REALNAMEIRC_PASSWORDIRC_CHANNELS(comma-separated)IRC_NICKSERV_PASSWORDIRC_NICKSERV_REGISTER_EMAIL
Troubleshooting
- If the bot connects but never replies in channels, verify
channels.irc.groupsand whether mention-gating is dropping messages (missing-mention). If you want it to reply without pings, setrequireMention:falsefor the channel. - If login fails, verify nick availability and server password.
- If TLS fails on a custom network, verify host/port and certificate setup.