IRC Setup: ZNC Bouncer & HexChat Configuration
1. Install ZNC on Debian VPS
On your Debian VPS, install ZNC via apt:
Bash
sudo apt update
sudo apt install znc
2. Initialize ZNC Configuration
Run the interactive wizard to set up your admin user and network:
Bash
znc --makeconf
-
Follow the prompts to set a username and a strong password.
-
Choose a port (e.g., 6697 for SSL/TLS).
-
Confirm "Would you like to load a global module?" -> cert.
-
After creation, start the ZNC process.
3. Configure SSL/TLS
Ensure secure connection:
Bash
znc --makepem
4. HexChat Configuration
To connect HexChat to your ZNC instance, configure the network settings:
-
Open HexChat and go to Network List (
Ctrl+S). -
Add a new network named
ZNC. -
Click Edit.
-
In the "Servers" list, add your VPS address and the ZNC port (e.g.,
irc.yourdomain.tld/6697). -
In the Password field, use the format:
user/network:password.- Example:
myuser/freenode:mysecretpassword
- Example:
-
Check "Enable SSL for all the servers on this network".
-
Accept the certificate if prompted.
5. Useful ZNC Modules
Load modules via the IRC query window with your user (*status):
Bash
/msg *status loadmod controlpanel
/msg *status loadmod log
/msg *status loadmod admin
Notes for Arch Linux
-
Make sure your system time is synced.
-
Use
microto edit~/.znc/configs/znc.confif manual adjustments are required. -
If you use
ufwon your VPS, ensure the ZNC port is open:sudo ufw allow 6697/tcp
ZNC Configuration: Tailscale Only
To restrict ZNC access exclusively to your Tailscale network, modify the listener configuration in znc.conf.
1. Identify your Tailscale IP
Find your Tailscale IP address on the VPS:
Bash
tailscale ip -4
(Let's assume your Tailscale IP is 100.x.y.z)
2. Edit the ZNC Configuration
-
Stop the ZNC service:
Bash
TXTsystemctl stop znc -
Open the configuration file (using
micro):Bash
TXTmicro ~/.znc/configs/znc.conf -
Locate the
<Listener>section and change theHostorListenHostdirective:Plaintext
TXT<Listener listener0> Port = 6697 Host = 100.x.y.z # Set this to your Tailscale IP SSL = true </Listener>
3. Verify Firewall (ufw/nftables)
Since you are using a VPS, ensure your firewall does not expose port 6697 to the public internet:
Bash
# If using UFW:
sudo ufw delete allow 6697/tcp
# Only allow connections from within the Tailscale subnet if necessary:
sudo ufw allow in on tailscale0 to any port 6697 proto tcp
4. Connect via Tailscale
In HexChat or HexDroid, use your Tailscale MagicDNS name or the Tailscale IP as the server address.
Pro-Tip for your setup:
Wenn du ZNC ausschließlich über Tailscale betreibst, kannst du innerhalb von ZNC auch SSL = false in Erwägung ziehen, sofern du das interne Tailscale-Netzwerk als sicher betrachtest (da der Traffic zwischen deinen Geräten ohnehin via WireGuard verschlüsselt ist). Ich würde jedoch bei SSL = true bleiben, um die Verschlüsselung durchgängig auf App-Ebene zu halten.
Soll ich dir noch zeigen, wie du ZNC als systemd-Service einrichtest, damit es bei einem Reboot deines VPS automatisch mit den richtigen Netzwerkkonfigurationen startet?