Internet Relay Chat (IRC): A Comprehensive Guide¶
IRC is a text-based, real-time chat protocol from 1988. It predates the web, it has no owner, and it's still running: thousands of open source projects coordinate on it every day, Twitch's chat is built on it, and you can run a full network on a Raspberry Pi.
This page is the overview. The hands-on companion pages are:
- IRC Command Reference — day-to-day user, channel operator, and services commands
- irssi — the terminal client: config, SASL, TLS, scripts
- UnrealIRCd and Anope — running your own IRC server with services
1. What IRC Is¶
IRC is a client–server chat protocol. You run a client, connect to a server, pick a nickname, and join channels (rooms whose names start with #). Messages you send to a channel are relayed by the server to everyone else in it — hence relay chat. You can also send private messages directly to another nick.
A few properties make IRC different from modern chat platforms:
- It's an open protocol, not a product. Anyone can write a client, a server, or a bot. There is no central company and no account required to connect (on most networks).
- Servers don't store history. If you're not connected, you don't see what was said. (Bouncers and IRCv3
chathistoryfix this — see §8.) - It's line-oriented plain text over TCP. You can speak the protocol by hand with
openssl s_client. That makes it trivially scriptable and very cheap to run. - Identity is weak by default. A nickname is just a string until you register it with network services.
2. A Short History¶
| Year | Event |
|---|---|
| 1988 | Jarkko Oikarinen writes IRC at the University of Oulu, Finland, to replace a BBS chat program. |
| 1990 | EFnet ("Eris-Free net") forms after a split over an open-relay server. Effectively the original network. |
| 1991 | IRC gains fame relaying live reports during the Gulf War and the Soviet coup attempt. |
| 1992–96 | Splits over policy create Undernet (1992), DALnet (1994, which popularized NickServ/ChanServ), and IRCnet (1996). |
| 1993 | RFC 1459 documents the protocol. |
| Mid-90s | freenode starts as a home for Linux and free software projects. |
| 2000 | RFCs 2810–2813 update the architecture, client, channel, and server protocols. |
| Early 2000s | IRC's peak: well over a million concurrent users across the big networks. mIRC is on every gamer's PC. |
| 2010s | Users drift to Skype, Slack, then Discord. IRCv3 working group begins modernizing the protocol. |
| 2014 | RFC 7194 registers port 6697 as the default for IRC over TLS. |
| May 2021 | freenode's ownership dispute leads its entire volunteer staff to resign and found Libera.Chat. Most major projects (Fedora, Ubuntu, Gentoo, FreeBSD, the FSF, Wikimedia) move there within weeks. |
| 2023 | The Matrix.org-hosted bridge to Libera.Chat is shut down after stability and privacy problems. |
| Today | Libera.Chat is the largest network; IRCv3 features like SASL, server-time, and chathistory are widely deployed. |
Takeaway from 2021: whoever controls a network's servers controls the network. The freenode collapse is why many projects now keep an official channel list on their own website rather than assuming a network is forever.
3. Architecture¶
Servers, networks, and the spanning tree¶
An IRC network is a set of servers linked into a spanning tree (no loops). Each server knows about every user and channel on the network, and messages are propagated along the tree.
hub1 ──── hub2
/ \ \
leaf-a leaf-b leaf-c
(you) (your friend)
When a link between servers breaks, the tree splits in two and each side sees the other's users quit at once — a netsplit. When the link is restored, users "rejoin" (a netjoin). The spanning-tree design is the reason IRC networks top out at tens of thousands of users per network rather than millions: every server holds the full state.
Clients, nicks, and hostmasks¶
Every connected user is identified by a hostmask:
nick!user@host
amercer!~amercer@umoswg-D6F9202F.cpe.teksavvy.com
nick— your display name, changeable at any timeuser— your username/ident (prefixed with~if the server couldn't verify it via identd)host— your hostname or IP, often cloaked (hashed) by the server for privacy
Bans and operator access are written against hostmasks, so understanding them matters (see the ban notes in the command reference).
Services¶
Classic IRC has no concept of accounts. Services are a special pseudo-server linked to the network that provides bots like:
| Service | Purpose |
|---|---|
| NickServ | Register and protect nicknames (accounts) |
| ChanServ | Register channels, persist ops/topics/modes, access lists |
| MemoServ | Offline messages |
| HostServ | Assign vanity hosts (vhosts) |
| BotServ | Assign persistent bots to channels |
| OperServ | Network administration for IRC operators |
Common services packages are Anope and Atheme. Libera.Chat runs Atheme; small networks usually run Anope.
Ports¶
| Port | Use |
|---|---|
| 6667 | Plaintext (legacy — avoid) |
| 6697 | TLS (RFC 7194 standard) |
| 7000, 9999 | Alternate TLS ports some networks still offer |
| 6900, 7000 (localhost) | Common choices for server-to-server and services links |
4. Speaking the Protocol by Hand¶
IRC is plain text lines ending in \r\n. Connecting manually is the best way to understand it.
openssl s_client -quiet -crlf -connect irc.libera.chat:6697
-crlf makes OpenSSL send \r\n line endings, which servers expect. Then type:
CAP LS 302
NICK amercer_test
USER amercer 0 * :Andrew Mercer
CAP END
What you'll see back (trimmed):
:server CAP * LS :account-notify away-notify extended-join multi-prefix sasl=PLAIN,EXTERNAL ...
:server 001 amercer_test :Welcome to the Libera.Chat Internet Relay Chat Network amercer_test
:server 005 amercer_test CHANTYPES=# PREFIX=(ov)@+ ... :are supported by this server
PING :server
Answer pings or you'll be disconnected:
PONG :server
JOIN #libera
PRIVMSG #libera :hello from a raw socket
QUIT :bye
Anatomy of a message:
:amercer!~amercer@host PRIVMSG #channel :the actual text
│└─────── prefix ────┘ └verb─┘ └target┘ └─ trailing param ─┘
Numeric replies are three-digit codes: 001 welcome, 005 server capabilities (ISUPPORT), 332 topic, 353 names list, 433 nickname in use, 474 banned from channel. The excellent Modern IRC docs list them all.
UnrealIRCd note: Unreal sends a PING cookie before registration completes and won't let you in until you
PONGit. Naive "pipe some lines into netcat" bots break on this; use a proper library (e.g. the Rustirccrate) for anything automated.
5. Modes¶
User modes (set on yourself with /mode yournick +x)¶
| Mode | Meaning (varies by IRCd) |
|---|---|
+i |
Invisible — hidden from /who unless sharing a channel |
+w |
Receive wallops |
+x |
Cloak your hostname |
+R |
Only accept private messages from registered users |
+Z |
Connected over TLS (informational) |
+o |
You are an IRC operator |
Channel modes¶
| Mode | Meaning |
|---|---|
+n |
No messages from users outside the channel |
+t |
Only ops can change the topic |
+s / +p |
Secret / private (hidden from /list) |
+i |
Invite only |
+k key |
Channel password |
+l N |
User limit |
+m |
Moderated — only voiced (+v) and above can speak |
+R / +r |
Registered users only (letter differs per IRCd) |
+b mask |
Ban |
+e mask |
Ban exception |
+I mask |
Invite exception |
Channel membership prefixes¶
| Prefix | Mode | Role |
|---|---|---|
~ |
+q |
Owner (UnrealIRCd, InspIRCd) |
& |
+a |
Admin/protected |
@ |
+o |
Operator |
% |
+h |
Half-op |
+ |
+v |
Voice |
Channel operator ≠ IRC operator. A channel op (
@) manages one channel. An IRC operator (/oper) administers the server/network. My old notes conflated the two — you don't need to be an IRC operator to give someone+oin a channel you op.
6. IRCv3: The Modernization Effort¶
IRCv3 is a working group of client and server developers extending IRC without breaking old clients. Everything is negotiated with CAP: the client asks what the server supports and opts in.
| Capability | What it gives you |
|---|---|
sasl |
Log in to your account during connection (before joining channels), so cloaks apply immediately and nick protection is seamless |
server-time |
Timestamps on messages — essential for bouncer playback |
message-tags |
Arbitrary metadata on messages (reactions, reply threading, msgids) |
account-tag / account-notify |
See which account sent a message / when users log in |
away-notify |
Live away-status updates without polling |
echo-message |
Server echoes your own messages back (reliable multi-device sync) |
batch, labeled-response |
Group related messages; match replies to requests |
chathistory |
Fetch scrollback from the server — IRC's answer to "I missed what was said" |
sts |
Strict Transport Security: server tells clients to always use TLS |
multi-prefix |
Show all of a user's channel prefixes (@+nick) |
| WebSocket | Browser clients connect natively without a gateway |
Support is uneven: modern servers (Ergo, UnrealIRCd 6, InspIRCd 4, Solanum) and clients (WeeChat, Halloy, Goguma, gamja, The Lounge, senpai) implement a lot; older clients implement little beyond SASL.
7. Is IRC Still Relevant?¶
Short answer: yes, in specific niches — and those niches are healthier than the "IRC is dead" meme suggests.
By the numbers¶
IRC is far smaller than at its 2000s peak. Libera.Chat, the biggest network, typically shows somewhere around 30,000–45,000 concurrent users depending on the source and date (see netsplit.de for live figures). Discord has orders of magnitude more. But user count is the wrong measure for IRC — its users are disproportionately the maintainers and core contributors of the software everyone else runs.
Where it's used today¶
| Area | Examples |
|---|---|
| Open source development | Fedora, Ubuntu, Gentoo, FreeBSD, the FSF, and hundreds of smaller projects on Libera.Chat; Debian and many others on OFTC. Release coordination, support channels, and meeting bots (e.g. MeetBot minutes) still happen here. |
| Infrastructure & ops | Bot-driven alerting and CI notifications; out-of-band "Slack is down" channels; self-hosted chat for privacy-sensitive teams and air-gapped environments. |
| Streaming | Twitch chat speaks IRC (irc.chat.twitch.tv:6697) — most Twitch chatbots are IRC bots with Twitch-specific message tags. |
| Hobby & regional communities | Rizon (anime), QuakeNet and GameSurge (gaming), IRCnet (strong in Europe), EFnet/Undernet/DALnet (legacy communities), hackint (hacker/CCC scene). |
| Self-hosting & homelabs | A complete chat server with services and a bouncer fits in a few MB of RAM. |
| Education & retro computing | Teaching sockets/protocols; vintage machines that can't run a browser can still IRC. |
Why people choose it¶
- No vendor lock-in. Clients, servers, and bots are interchangeable. Nobody can pull the rug (and when someone tried, in 2021, the communities just moved).
- Low barrier, low resources. No phone number, no Electron app, no account required to lurk.
- Scriptable. A bot is a socket and a loop.
- Focus. No embeds, no reactions avalanche — just text.
- Public, loggable discussion that suits open projects.
Honest drawbacks¶
- No history by default. Needs a bouncer or IRCv3
chathistorysupport. - No end-to-end encryption. TLS protects client↔server only; operators of each server can read traffic. (OTR/IRC-level crypto add-ons exist but are niche.)
- Weak mobile story. Mobile OSes kill idle sockets; you need a bouncer plus a push-capable client (e.g. soju + Goguma).
- Onboarding friction. Nick registration, SASL, and netiquette are a learning curve for newcomers.
- Spam waves. Large networks periodically get hit, which is why many channels are
+R(registered users only).
IRC compared¶
| IRC | Matrix | XMPP | Discord | Slack | |
|---|---|---|---|---|---|
| Open protocol | Yes | Yes | Yes | No | No |
| Self-hostable | Trivially | Yes (heavier) | Yes | No | No |
| Federation | Within a network only | Yes | Yes | No | No |
| Persistent history | Bouncer / IRCv3 | Built-in | Server-dependent | Built-in | Built-in (paid limits) |
| E2E encryption | No (add-ons only) | Yes | Yes (OMEMO) | No | No |
| Resource cost | Tiny | Moderate–high | Low | n/a | n/a |
| Rich media / threads | Minimal | Yes | Partial | Yes | Yes |
When IRC is the right choice: public open-source community chat, lightweight internal ops/alerting chat, a self-hosted homelab chat server, bots and automation, or anywhere you want zero dependency on a company.
When it isn't: you need E2E encryption, rich media, or non-technical users on phones with zero setup.
8. Networks Worth Knowing (2026)¶
| Network | Focus | Connect |
|---|---|---|
| Libera.Chat | FOSS projects, the largest network | irc.libera.chat:6697 (TLS) |
| OFTC | FOSS projects (Debian, many kernel/graphics projects) | irc.oftc.net:6697 |
| EFnet | The original; no services | irc.efnet.org (TLS on 6697) |
| IRCnet | European, no nick services | open.ircnet.net |
| Undernet | Long-running general network | irc.undernet.org |
| DALnet | General; birthplace of NickServ/ChanServ | irc.dal.net:6697 |
| QuakeNet | Gaming (uses the Q bot rather than NickServ) |
irc.quakenet.org |
| Rizon | Anime and general | irc.rizon.net:6697 |
| EsperNet | Gaming, Minecraft modding communities | irc.esper.net:6697 |
| hackint | Hacker/maker scene | irc.hackint.org:6697 |
| GameSurge | Gaming | irc.gamesurge.net |
freenode still exists, but nearly every major project left in 2021; if older docs (including my own) say chat.freenode.net, read it as irc.libera.chat unless the project explicitly says otherwise. SILC, which shipped in irssi's default config, is effectively dead.
Always check the network's website for current TLS ports — prefer 6697 everywhere it's offered.
9. Clients¶
| Client | Type | Notes |
|---|---|---|
| irssi | Terminal | Perl scripting, rock-solid, the classic. See irssi. |
| WeeChat | Terminal | More IRCv3 support than irssi, plugins in many languages, built-in relay for remote/web/mobile frontends. |
| senpai | Terminal | Minimal, designed around soju and IRCv3 (chathistory, etc). |
| catgirl | Terminal | Tiny, TLS-only, opinionated. |
| Halloy | GUI (Rust/iced) | Modern cross-platform desktop client with solid IRCv3 support. |
| HexChat | GUI | Popular for years but no longer maintained (archived 2024). Avoid for new setups. |
| KVIrc / Konversation / Quassel | GUI | Qt-based; Quassel is a client + core (built-in bouncer) pair. |
| The Lounge | Web (self-hosted) | Always-on web client that doubles as a bouncer. |
| gamja | Web | Lightweight web client, pairs with soju. |
| Kiwi IRC | Web | Common embedded webchat. |
| Goguma | Android | Built for soju; push notifications via the bouncer. |
| Palaver | iOS | Mature iOS client with push via ZNC/soju modules. |
| ERC / Circe | Emacs | If you live in Emacs. |
10. Bouncers: Staying Connected¶
A bouncer (BNC) is an always-on proxy that stays connected to IRC for you and replays what you missed when you reconnect. It solves IRC's two biggest usability problems: history and multi-device.
| Bouncer | Notes |
|---|---|
| soju | Modern, IRCv3-native (serves chathistory to clients), multi-user, multi-network. Pair with Goguma / senpai / gamja. The best default choice today. |
| ZNC | The long-time standard; huge module ecosystem; playback via modules. |
| Quassel core | Only works with Quassel clients. |
| The Lounge | Web client with built-in persistence. |
| irssi-proxy | irssi's built-in proxy module — works, but a dedicated bouncer is cleaner. |
The old pattern of "irssi in screen + screen_away.pl + awayproxy.pl emailing me messages" is now better served by soju + any client. Running irssi in tmux on a server is still perfectly valid if you only ever use a terminal.
11. Security and Privacy¶
- Always use TLS (port 6697) with certificate verification. Plaintext 6667 exposes your NickServ password and every message.
- Authenticate with SASL, not
/msg NickServ IDENTIFY. SASL logs you in before you join anything, so your cloak is applied before your real host leaks into channels. - Prefer SASL EXTERNAL (CertFP). Authenticate with a client TLS certificate instead of storing a password in your client config. See irssi → CertFP.
- Use a cloak. Most networks cloak your host automatically or on request (
+x, or a project cloak likeuser/amerceron Libera). - Don't accept DCC from strangers. DCC SEND/CHAT open direct connections and reveal your IP.
- CTCP VERSION reveals your client and version; some clients let you blank it.
- Assume channels are logged. Public channels on FOSS networks are often published on the web.
- Never paste commands strangers give you. "Type
/exec ..." is an old trick. - VPN/Tor policies vary. Libera.Chat blocks VPN and Tor connections for users without a registered account; register first, then connect via SASL.
12. Etiquette (the parts that still matter)¶
- Don't ask to ask. Just ask your question, with details.
- Wait. People are in different timezones and idle for hours. Answers can take a while; stay connected.
- Use a pastebin for anything longer than ~3 lines (most project channels name a preferred one in the topic).
- Read the topic — it usually contains rules, links, and current status.
- Don't highlight people unnecessarily, and don't private-message project members for support unless invited.
- Plain text only. No colour spam, no ALL CAPS.
- Lurking is normal and fine.
13. Running Your Own Network¶
| Component | Options |
|---|---|
| IRCd | UnrealIRCd 6 (most popular, feature-rich, excellent docs), InspIRCd 4 (modular), Solanum (what Libera.Chat runs), Ergo (Go; IRCd + built-in services + bouncer + history in one binary), ngIRCd (small and simple) |
| Services | Anope (pairs naturally with UnrealIRCd), Atheme (pairs with Solanum/InspIRCd). Ergo needs neither. |
| Bouncer | soju or ZNC |
| Web client | gamja, The Lounge, Kiwi IRC |
Two sensible homelab designs:
Classic: UnrealIRCd 6 + Anope + soju. Most flexible, most to configure. Full walkthrough: UnrealIRCd and Anope.
All-in-one: Ergo alone gives you an IRCd, NickServ/ChanServ equivalents, SASL, and server-side history with a single YAML config and container image. For a personal or small-team server this is the least-effort route. A minimal Compose service following the homelab conventions (network name only in .env):
services:
ergo:
image: ghcr.io/ergochat/ergo:stable
container_name: ergo
restart: unless-stopped
ports:
- "6697:6697"
volumes:
- ergo-data:/ircd
networks: [default]
volumes:
ergo-data:
networks:
default:
name: ${NETWORK}
external: true
Edit the generated ircd.yaml in the volume to set the server name, TLS certificate paths, and operator password before exposing it.
14. Bots and Automation¶
IRC is still one of the easiest targets for notifications:
- CI/CD notifications — GitLab's Irker integration, or a few lines in a pipeline job pushing to a small bot.
- Monitoring alerts — Alertmanager → webhook → IRC relay bot.
- Meeting bots — MeetBot/Limnoria produce minutes for FOSS project meetings.
- Frameworks — Limnoria (Python), Sopel (Python), or the Rust
irccrate for a bespoke tool.
Rules of the road for bots: register the bot's nick, authenticate with SASL, respect flood limits (one line every ~2 seconds is a safe default), and ask channel ops before adding one.
15. Further Reading¶
- Modern IRC Client Protocol — the practical, up-to-date protocol reference
- IRCv3 specifications
- RFC 1459, 2810–2813, 7194
- Libera.Chat guides — registration, SASL, cloaks, CertFP
- netsplit.de — network statistics
- UnrealIRCd documentation
- irssi documentation