Deploy The Lounge IRC Client on a VPS
Always-on, self-hosted IRC in your browser. Stays connected 24/7, keeps full message history, and works from any device.
At a Glance
| Project | The Lounge |
| License | MIT |
| Recommended Plan | Any RamNode VPS (1 GB RAM is sufficient) |
| OS | Ubuntu 22.04 LTS |
| Default Port | 9000 (proxied to 443 via Nginx) |
| Deployment | Docker + Docker Compose |
| Estimated Setup Time | 10–15 minutes |
Prerequisites
- A RamNode VPS running Ubuntu 22.04 LTS (any plan works; 1 GB RAM is more than sufficient)
- A non-root sudo user
- A domain or subdomain pointed at your VPS IP (e.g.,
irc.yourdomain.com) - Ports 80 and 443 open in your firewall
Update Your System
sudo apt update && sudo apt upgrade -yInstall Docker
The Lounge's official Docker image is the easiest path to a clean, upgradeable deployment.
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-pluginAdd your user to the docker group:
sudo usermod -aG docker $USER
newgrp dockerdocker --versionCreate the Data Directory
The Lounge stores all configuration, user accounts, and message logs in a single directory. Set ownership to UID 1000, which the official image uses internally:
sudo mkdir -p /opt/thelounge
sudo chown -R 1000:1000 /opt/theloungeCreate the Docker Compose File
nano /opt/thelounge/docker-compose.ymlversion: "3.8"
services:
thelounge:
image: ghcr.io/thelounge/thelounge:latest
container_name: thelounge
restart: unless-stopped
ports:
- "127.0.0.1:9000:9000"
volumes:
- /opt/thelounge/data:/var/opt/thelounge
environment:
- THELOUNGE_HOME=/var/opt/theloungeNote: Port 9000 is bound to localhost only. Nginx will handle SSL termination and public access.
Start the Container
cd /opt/thelounge
docker compose up -dCheck that it is running:
docker compose ps
docker compose logs -fYou should see output indicating The Lounge is listening on port 9000. Press Ctrl+C to exit the log stream.
Create Your First User
The Lounge uses a CLI for user management:
docker exec -it thelounge thelounge add yourusernameYou will be prompted to set a password. To list existing users:
docker exec -it thelounge thelounge listInstall and Configure Nginx
sudo apt install -y nginxCreate a server block (replace irc.yourdomain.com with your domain):
server {
listen 80;
listen [::]:80;
server_name irc.yourdomain.com;
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 X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
}Important: The Upgrade and Connection headers are required for WebSocket support. The proxy_read_timeout prevents idle WebSocket disconnects.
sudo ln -s /etc/nginx/sites-available/thelounge /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxObtain an SSL Certificate
sudo apt install -y certbot python3-certbot-nginxsudo certbot --nginx -d irc.yourdomain.comCertbot will automatically update your Nginx config to handle HTTPS. When prompted, choose to redirect HTTP to HTTPS.
sudo certbot renew --dry-runConfigure UFW
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw enableYou do not need to open port 9000 externally since Nginx handles all incoming traffic.
Log In and Connect to IRC
Open your browser and navigate to https://irc.yourdomain.com. Log in with the credentials from Step 6.
On first login, The Lounge will prompt you to add a network. Example settings for Libera.Chat:
| Server | irc.libera.chat |
| Port | 6697 |
| TLS | Enabled |
| Nick | Your preferred IRC identity |
The Lounge will hold this connection open indefinitely — even after you close the browser tab.
Managing The Lounge
Upgrade to a New Version
cd /opt/thelounge
docker compose pull
docker compose up -dConfiguration and message logs in /opt/thelounge/data are preserved across upgrades.
Add Additional Users
docker exec -it thelounge thelounge add seconduserBy default, The Lounge runs in private mode — only accounts you create via the CLI can log in.
Reset a Password
docker exec -it thelounge thelounge reset yourusernameRemove a User
docker exec -it thelounge thelounge remove yourusernameView Logs
docker compose -f /opt/thelounge/docker-compose.yml logs -fOptional Configuration
Push Notifications
The Lounge supports browser push notifications for highlights and private messages. This works out of the box over HTTPS — go to Settings → Notifications in the web client.
VAPID Keys for Self-Hosted Push
For full Web Push support independent of a third-party service, generate VAPID keys:
docker exec -it thelounge thelounge genconfigPaste the output values into /opt/thelounge/data/config.js under the vapid section. Restart after changes:
docker compose -f /opt/thelounge/docker-compose.yml restartTroubleshooting
Container exits immediately
Check logs and verify directory ownership:
docker compose logs thelounge
ls -la /opt/thelounge/data
sudo chown -R 1000:1000 /opt/thelounge/dataWebSocket connection fails
Ensure your Nginx config includes the Upgrade and Connection proxy headers and the proxy_read_timeout directive. A default 60-second timeout will cause WebSocket connections to drop.
Cannot connect to IRC network
Some IRC networks require identd or a valid reverse DNS entry. Set custom rDNS in the RamNode Client Portal. Libera.Chat and most networks support SASL authentication, which The Lounge supports natively.
Certbot fails on port 80
Make sure Nginx is running and UFW allows port 80:
sudo systemctl status nginx
sudo ufw status