← Back to list

Building a Production-Ready IRC Network with InspIRCd, The Lounge, Anope & SSL on Docker

Introduction

Harshal Jethwa · 2026-05-22 15:44 · 0 claps · 4.5 min read
#docker #docker-compose #lounge #inspircd #irc-network
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Building a Production-Ready IRC Network with InspIRCd, The Lounge, Anope & SSL on Docker

Introduction

In this guide, we’ll build a complete modern IRC ecosystem using:

  • InspIRCd (IRC Server)
  • The Lounge (Web IRC Client)
  • Anope (IRC Services)
  • Docker & Docker Compose
  • Let’s Encrypt SSL Certificates
  • Custom Domains

By the end, you’ll have:

✅ Secure IRC over TLS ✅ Web-based IRC client ✅ NickServ & ChanServ services ✅ Dockerized deployment ✅ Domain + SSL integration ✅ Reverse proxy support ✅ Production-ready setup

Final Architecture

Users
   │
   ▼
https://<DOMAIN_NAME>
   │
   ▼
NGINX Reverse Proxy
   │
   ▼
The Lounge (Docker)
   │
   ▼
InspIRCd (Docker)
   │
   ▼
Anope Services

Prerequisites

Server Requirements

  • Ubuntu 22.04/24.04 VPS
  • 2 GB RAM minimum
  • Public IP
  • Docker installed
  • Docker Compose installed

Step 1 — Install Docker

Update Packages

sudo apt update && sudo apt upgrade -y

Install Docker

curl -fsSL https://get.docker.com | sh

Install Docker Compose

sudo apt install docker-compose-plugin -y

Verify

docker --version
docker compose version

Step 2 — Create Project Structure

mkdir ~/cysmos-irc
cd ~/cysmos-irc

Create folders:

mkdir logs
mkdir thelounge-data
mkdir -p atheme/config

Step 3 — Create Docker Compose File

Create:

nano docker-compose.yml

Add:

version: "3.8"
services:
  ircd:
    image: inspircd/inspircd-docker
    container_name: inspircd
    ports:
      - "6667:6667"
      - "6697:6697"
      - "7000:7000"
    volumes:
      - ./inspircd.conf:/inspircd/conf/inspircd.conf
      - ./logs:/inspircd/log
    networks:
      - irc_net
    restart: unless-stopped
  thelounge:
    image: thelounge/thelounge:latest
    container_name: thelounge
    ports:
      - "127.0.0.1:9000:9000"
    volumes:
      - ./thelounge-data:/var/opt/thelounge
    networks:
      - irc_net
    restart: unless-stopped
  atheme:
    build: ./atheme
    container_name: atheme
    depends_on:
      - ircd
    networks:
      - irc_net
    restart: unless-stopped
networks:
  irc_net:
    driver: bridge

Step 4 — Configure InspIRCd

Create:

nano inspircd.conf

Basic example:

<server
    name="irc.cysmos.chat"
    description="Cysmos IRC Network">
<admin
    name="Harshal"
    nick="admin"
    email="admin@cysmos.chat">
<bind
    address=""
    port="6667"
    type="clients">
<bind
    address=""
    port="6697"
    type="clients"
    sslprofile="main">
<sslprofile
    name="main"
    provider="gnutls"
    certfile="/inspircd/conf/cert.pem"
    keyfile="/inspircd/conf/key.pem">
<oper
    name="admin"
    password="StrongPassword123"
    host="*@*"
    type="NetAdmin">

Step 5 — Start IRC Stack

docker compose up -d

Check containers:

docker ps

Step 6 — Configure The Lounge

Enter container:

docker exec -it thelounge sh

Generate config:

thelounge install

Edit:

vi /var/opt/thelounge/config.js

Recommended config: Keep other settings as it is.

module.exports = {
  public: true,
reverseProxy: true,
  defaults: {
    name: "Cysmos.Chat",
    host: "irc.cysmos.chat",
    port: 6697,
    tls: true,
  },
};

Restart:

docker restart thelounge

Step 7 — Configure Domain

DNS Records

Main Website

<Domain_Name -> VPS_IP

IRC Server

irc.<Domain_Name>-> VPS_IP

Step 8 — Install NGINX

sudo apt install nginx -y

Step 9 — Configure Reverse Proxy

Create:

sudo nano /etc/nginx/sites-available/thelounge

Add:

server {
    listen 80;server_name <Domain_Name>;
    location / {
        proxy_pass http://127.0.0.1:9000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable:

sudo ln -s /etc/nginx/sites-available/thelounge /etc/nginx/sites-enabled/

Test:

sudo nginx -t

Reload:

sudo systemctl reload nginx

Step 10 — Configure SSL with Domain

Install Certbot

sudo apt install certbot python3-certbot-nginx -y

Generate Certificates

Main Domain

sudo certbot --nginx -d cysmos.chat

IRC Domain

sudo certbot certonly --standalone -d irc.<Domain_Name>

Step 11 — Mount SSL Certificates into Docker

Update docker-compose:

volumes:
  - ./inspircd.conf:/inspircd/conf/inspircd.conf
  - ./logs:/inspircd/log
  - /etc/letsencrypt/live/irc.<Domain_Name>/fullchain.pem:/inspircd/conf/cert.pem:ro
  - /etc/letsencrypt/live/irc.<Domain_Name>/privkey.pem:/inspircd/conf/key.pem:ro

Step 12 — Fix Certificate Permissions

Sometimes Docker cannot read Let’s Encrypt private keys.

Fix permissions:

sudo chmod 755 /etc/letsencrypt
sudo chmod 755 /etc/letsencrypt/live
sudo chmod 755 /etc/letsencrypt/archive
sudo chmod 644 /etc/letsencrypt/live/irc.<Domain_Name>/fullchain.pem
sudo chmod 644 /etc/letsencrypt/live/irc.<Domain_Name>/privkey.pem

Step 13 — Restart IRC Container

docker compose up -d --force-recreate ircd

Step 14 — Verify TLS

Test:

openssl s_client -connect irc.<Domain_Name>:6697

Expected:

Verify return code: 0 (ok)

Step 15 — Configure Without Domain (Optional)

If you don’t have a domain:

Self-Signed Certificate

Generate:

openssl req -x509 -nodes -days 365 \
-newkey rsa:2048 \
-keyout key.pem \
-out cert.pem

Move:

mv cert.pem ~/<Domain_Name>/
mv key.pem ~/<Domain_Name>/

Update compose:

volumes:
  - ./cert.pem:/inspircd/conf/cert.pem
  - ./key.pem:/inspircd/conf/key.pem

Restart:

docker compose up -d --force-recreate ircd

Users will receive SSL warnings, but TLS will still work.

Step 16 — Configure IRC Services (NickServ & ChanServ)

Register Nickname

/msg NickServ REGISTER password email@example.com

Identify

/msg NickServ IDENTIFY password

Register Channel

/msg ChanServ REGISTER #channel

Step 17 — Useful IRC Commands

Join Channel

/join #devops

Change Nick

/nick Harshal

Whois

/whois nickname

Oper Login

/oper admin password
/join #devops
Hello from IRC 🚀
/whois yournick
/motd
/list

/info

Check IRC version:

/version

Leave channel:

/part

Quit IRC:

/quit

Step 18 — Troubleshooting

The Lounge Stuck Loading

Usually caused by:

  • missing websocket headers
  • reverseProxy false
  • TLS issues

Fix:

reverseProxy: true

NGINX:

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

SSL Certificate Expired

Check:

sudo certbot certificates

Renew:

sudo certbot renew

Docker Compose YAML Error

Validate:

docker compose config

Permission Denied on key.pem

Fix:

sudo chmod 644 privkey.pem

Step 19 — Auto Renew Certificates

Add cron:

sudo crontab -e

Add:

0 3 * * * certbot renew --quiet && docker restart inspircd

Final Result

You now have:

✅ Secure IRC Network ✅ TLS Encryption ✅ Web IRC Client ✅ Dockerized Infrastructure ✅ Reverse Proxy ✅ NickServ & ChanServ ✅ Production Deployment ✅ Let’s Encrypt SSL ✅ Modern IRC Stack

Conclusion

In this tutorial, we built a complete production-ready IRC ecosystem using modern technologies and Docker containers.

This setup is lightweight, scalable, secure, and ideal for:

  • communities
  • private teams
  • developer chat systems
  • hobby IRC networks
  • retro communication platforms

With The Lounge providing a modern web experience and InspIRCd delivering powerful IRC server capabilities, you now have a fully functional self-hosted IRC platform.


메타데이터
post_id
162595d2bf77
slug
building-a-production-ready-irc-network-with-inspircd-the-lounge-anope-ssl-on-docker-162595d2bf77
url
https://medium.com/@harshaljethwaa/building-a-production-ready-irc-network-with-inspircd-the-lounge-anope-ssl-on-docker-162595d2bf77
canonical_url
https://medium.com/@harshaljethwaa/building-a-production-ready-irc-network-with-inspircd-the-lounge-anope-ssl-on-docker-162595d2bf77
author_url
https://medium.com/@harshaljethwaa
status
ok
fetched_at
2026-07-11 08:53:43