General

Running an IRC Server Through a Hidden Service

Started by zD9JXCDZm8jBxNBlo · Jan 27, 2025

#5794
The legendary IRC servers have always been part of the Hidden Services world and, in general, everything related to the Tor protocol. So, this time, I’ll share a basic setup for running an IRC server to chat securely on your trusted server.

Why Would I Want an IRC Server?

Personally, when I need to communicate with someone I don’t know and want to chat sporadically or conduct an interview, I’ve preferred to use IRC for these main reasons:

  • + Emails are stored permanently on servers, so any message — even encrypted ones — could potentially be used against you later, depending on what the state deems unacceptable. A service that only "stores" messages in RAM is a better alternative.
  • + Everything passes through the Tor network, so there’s an additional layer of security.
  • + The server is yours!


Running the Server & Configuration

In my case, I’ll run a minimalist server I developed myself in Rust, but feel free to use any other local IRC server.

Code: gitlab.torproject.org/mateolafalce/cepa-irc


cargo run


In your `/etc/tor/torrc`, modify the service port line to this:


HiddenServicePort 6667 127.0.0.1:6667


Once that’s done, start Tor (or restart it if it’s already running):


sudo systemctl start tor


After setting this up, you can access the server and start chatting:


torsocks telnet <HIDDEN_SERVICE_URL> 6667


Automating Domain Creation

In my experience, when chatting with an anonymous person, I use PGP-encrypted messages for added security. For each connection, I create a new `.onion` domain. To automate this task, I developed the following Bash script:


> new_domain.sh && chmod +x new_domain.sh


If you want to preserve your current `.onion` domain, back up the keys from the `/var/lib/tor/hidden_service` directory. Otherwise, run the following script to generate a new domain:


#!/bin/bash

sudo rm -rf /var/lib/tor/hidden_service
sudo systemctl stop tor
sudo systemctl start tor


You can then retrieve your new domain with:


sudo cat /var/lib/tor/hidden_service/hostname


Have you ever used a local IRC server to chat with peers? What server do you use?
#5795
↳ Replying to @zD9JXCDZm8jBxNBlo
IRC is an outdated toy. Anything is better.

There is no reason to deploy it today, no matter how nostalgic and romantic IRC may seem.

Everything passes through the Tor network, so there’s an additional layer of security


Maybe you meant the only layer of security?
#5796
↳ Replying to @secret
As I said in the post, the times I have used it I have done so through PGP messages with a peer. Obviously if you use it without any type of encryption it is plain text!
#5798
↳ Replying to @secret
I'm too lazy to type out a response so I'm just gonna have some random AI do it:

IRC is Not Outdated—It’s Ideal for .onion Hidden Services

The claim that "IRC is an outdated toy" is misguided, especially in the context of .onion services. While it may lack modern UX features, IRC remains one of the most efficient, secure, and privacy-friendly chat protocols available. If anything, it’s one of the best choices for running a .onion chat service.

1️⃣ IRC is Lightweight, Efficient, and Tor-Friendly

Unlike modern bloated chat solutions, IRC is purely text-based, making it ideal for Tor’s high-latency network. It:

Does not require heavy resources like JavaScript-laden chat platforms.

Works well over low-bandwidth connections, making it accessible for users in censored regions.

Does not inherently load external content, reducing fingerprinting and tracking risks.

Even modern end-to-end encrypted chat platforms like Signal or Matrix rely on complex infrastructures that struggle to function optimally over .onion services due to heavy metadata leaks, relay dependencies, and high latency.

2️⃣ Privacy and Anonymity: IRC vs. Other Chat Protocols

Most "modern" chat solutions suffer from privacy risks that IRC does not. Let’s compare:

Chat Protocol Can Run as a .onion? Metadata Exposure Risks Lightweight? Server Dependencies Best for Tor? IRC ✅ Yes 🔒 Minimal ✅ Yes 🔋 Self-hosted ✅ Perfect for .onion Matrix ⚠️ Partial 📡 Home server IP leaks, federation metadata ❌ No 🌍 Requires global federation ❌ Very slow over Tor XMPP (with OMEMO) ✅ Yes 🔓 JID exposes metadata ✅ Yes 🌍 Requires federation ⚠️ Somewhat usable Signal ❌ No 📞 Requires phone number ❌ No 🏢 Centralized ❌ Not usable for .onion Session ✅ Yes 📡 Centralized onion storage ❌ No 🏢 Closed-source backend ⚠️ Experimental Telegram ❌ No 📡 Requires phone number ❌ No 🏢 Centralized ❌ Not usable

✅ IRC wins because:

Does not require real-world identifiers (no phone numbers, no centralized accounts).

Can be entirely self-hosted on a .onion service with zero third-party dependencies.

No metadata leaks—unlike Matrix, which exposes home server information.

3️⃣ IRC is Battle-Tested and Does One Thing Well

IRC has been around for decades, proving its reliability. Unlike "modern" chat platforms that attempt to reinvent the wheel, IRC has stuck to its core strength: lightweight, efficient, real-time communication.

Many "modern" alternatives:

Require bloated clients that do not work well in high-latency networks like Tor.

Leak metadata to third parties, even when E2EE is implemented (e.g., Matrix federation).

Are centralized or semi-centralized, making .onion hosting difficult.

IRC, by contrast:

Does not require a web browser (unlike many newer chat systems that force JavaScript execution).

Can be used with simple clients like irssi, weechat, or hexchat, all of which work perfectly over Tor.

Does not require a federation of servers, reducing the risk of metadata exposure.

4️⃣ Security: IRC with TLS + Onion Routing = Private and Safe

While old-school IRC had security issues (plaintext passwords, lack of native encryption), today’s implementations support:

TLS encryption (+6697 ports).

SASL authentication to prevent credential leaks.

Tor Hidden Services (.onion IRC servers) to avoid IP leaks altogether.

Modern self-hosted IRC servers like UnrealIRCd, InspIRCd, and TheLounge support these features out of the box.

5️⃣ Self-Hosting is Simple and Censorship-Resistant

Setting up an IRC server as a .onion service is much easier than hosting alternatives like Matrix, XMPP, or Session, which require complex database setups and multiple moving parts.

A basic .onion IRC setup requires:

  • [] A Tor daemon running in Hidden Service mode.
  • [] A lightweight IRC server (e.g., UnrealIRCd or ngircd).
  • A simple user registration/authentication setup.


✅ No cloud, no centralization, no metadata leaks.

🚀 Conclusion: IRC is Still the Best for .onion Chat

The idea that "IRC is outdated" is shortsighted—especially in the context of Tor Hidden Services. Modern alternatives:

Are heavily bloated and poorly optimized for .onion services.

Have major metadata risks that compromise privacy.

Require centralized or federated servers, which increase attack surface and censorship risk.

✅ IRC remains the best choice for privacy-focused .onion chat rooms because:

  • [] It is minimalist and optimized for high-latency, low-bandwidth networks.
  • [] It is self-hosted and fully under the operator's control.
  • It avoids unnecessary third-party dependencies.


Instead of chasing hype-based solutions that do not fit the .onion model well, a properly configured IRC server remains the most efficient, secure, and censorship-resistant chat option available.