ZNC is an advanced IRC bouncer that can establish such a permanent connection to several IRC networks and channels so your IRC client (or multiple clients) can disconnect/reconnect without losing the chat session, while appearing as a single user to other users.
Install the package that contains ZNC.
Create a ZNC configuration file, this command will automatically create znc.conf in /var/lib/znc/configs/. You will be asked to enter some information.
Listen on port: 1025 Listen using SSL: yes Listen using both IPv4 and IPv6: no Username: your_username Enter password: your_password Confirm password: your_password Nick: nick Alternate nick: nick_ Real name: optional Bind host: try to leave empty Set up a network? no Launch ZNC now? no
Start ZNC as service.
Run ZNC in a subdomain using NGINX
Configure the ZNC webadmin page
Open the ZNC webadmin page
https://YOUR_SERVER_IP:1025 in your browser. Accept the insecure certificate and go forward.
Log in with your username and password and go to global settings.
We want to maintain the webadmin connections separate from the IRC connections.
Let's make a listening port for the IRC connections.
In Listen Port(s) add:
Port: 6697 BindHost: * SSL: on IPv4: on IPv6: off IRC: on HTTP: off URIPrefix: /
Save the information you entered and stop the service for now.
Edit the configuration file.
Your configuration file should look like this:
Start ZNC as service.
Install NGINX if you haven't already.
Create a configuration file in conf.d separated from the main configuration files.
The file should look something like below.
Restart the NGINX service.
Set up SSL certificates
Install Certbot and its module to work with NGINX.
Run Certbot, this program will create Let's Encrypt SSL certificates for free. You will have to manually or automatically renew them every month.
Restart NGINX and you're done. Your webadmin page will be automatically running the SSL certificate made by Let's Encrypt.
Now we will replace the znc.pem certificate with the Let's Encrypt certificates for any person who wants to connect to our IRC bouncer. For this we need to concatenate two important files into znc.pem