<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nbm</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nbm"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Nbm"/>
	<updated>2026-05-10T10:52:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZNC&amp;diff=16766</id>
		<title>ZNC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZNC&amp;diff=16766"/>
		<updated>2019-12-31T19:57:07Z</updated>

		<summary type="html">&lt;p&gt;Nbm: /* Run ZNC in a subdomain using NGINX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://wiki.znc.in/ZNC 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.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Install the package that contains ZNC.&lt;br /&gt;
    {{Cmd|apk add znc}}&lt;br /&gt;
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.&lt;br /&gt;
    {{Cmd|rc-service znc setup}}&lt;br /&gt;
    {{Note|Make sure the information you enter is as it&#039;s shown below.}}&lt;br /&gt;
    Listen on port: 1025&lt;br /&gt;
    Listen using SSL: yes&lt;br /&gt;
    Listen using both IPv4 and IPv6: no&lt;br /&gt;
    Username: your_username&lt;br /&gt;
    Enter password: your_password&lt;br /&gt;
    Confirm password: your_password&lt;br /&gt;
    Nick: nick&lt;br /&gt;
    Alternate nick: nick_&lt;br /&gt;
    Real name: optional&lt;br /&gt;
    Bind host: try to leave empty&lt;br /&gt;
    Set up a network? no&lt;br /&gt;
    Launch ZNC now? no&lt;br /&gt;
    {{Warning|Never edit the configuration file while ZNC is running; always check with &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rc-status&amp;lt;/code&amp;gt; if ZNC is running.}}&lt;br /&gt;
Start ZNC as service.&lt;br /&gt;
    {{Cmd|rc-service znc start}}&lt;br /&gt;
&lt;br /&gt;
== Run ZNC in a subdomain using NGINX ==&lt;br /&gt;
&lt;br /&gt;
=== Configure the ZNC webadmin page ===&lt;br /&gt;
&lt;br /&gt;
Open the ZNC webadmin page &amp;lt;code&amp;gt;https://YOUR_SERVER_IP:1025&amp;lt;/code&amp;gt; in your browser. Accept the insecure certificate and go forward.&lt;br /&gt;
Log in with your username and password and go to global settings.&lt;br /&gt;
We want to maintain the webadmin connections separate from the IRC connections.&lt;br /&gt;
Let&#039;s make a listening port for the IRC connections.&lt;br /&gt;
&lt;br /&gt;
In Listen Port(s) add:&lt;br /&gt;
&lt;br /&gt;
    Port: 6697&lt;br /&gt;
    BindHost: *&lt;br /&gt;
    SSL: on&lt;br /&gt;
    IPv4: on&lt;br /&gt;
    IPv6: off&lt;br /&gt;
    IRC: on&lt;br /&gt;
    HTTP: off&lt;br /&gt;
    URIPrefix: /&lt;br /&gt;
Save the information you entered and stop the service for now.&lt;br /&gt;
    {{Cmd|rc-service znc stop}}&lt;br /&gt;
Edit the configuration file.&lt;br /&gt;
    {{Cmd|vim /var/lib/znc/configs/znc.conf}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Listener0 is the webadmin port (it&#039;s listening port 1025). Listener1 is the IRC port (it&#039;s listening port 6697).}}&lt;br /&gt;
Your configuration file should look like this:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/lib/znc/configs/znc.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;Listener listener0&amp;gt;&lt;br /&gt;
    Allow IRC = false&lt;br /&gt;
    AllowWeb = true&lt;br /&gt;
    IPv4 = true&lt;br /&gt;
    IPv6 = false&lt;br /&gt;
    Port = 1025&lt;br /&gt;
    SSL = false&lt;br /&gt;
    URIPrefix = /&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Listener listener1&amp;gt;&lt;br /&gt;
    AllowIRC = true&lt;br /&gt;
    AllowWeb = false&lt;br /&gt;
    IPv4 = true&lt;br /&gt;
    IPv6 = false&lt;br /&gt;
    Port = 6697&lt;br /&gt;
    SSL = true&lt;br /&gt;
    URIPrefix = /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Start ZNC as service.&lt;br /&gt;
    {{Cmd|rc-service znc start}}&lt;br /&gt;
&lt;br /&gt;
=== Configure NGINX ===&lt;br /&gt;
Install NGINX if you haven&#039;t already.&lt;br /&gt;
    {{Cmd|apk add nginx}}&lt;br /&gt;
Create a configuration file in conf.d separated from the main configuration files.  &lt;br /&gt;
    {{Cmd|vim /etc/nginx/conf.d/znc.your_domain.com.conf}}&lt;br /&gt;
The file should look something like below.&lt;br /&gt;
{{Cat|/etc/nginx/conf.d/znc.your_domain.com.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
    server {&lt;br /&gt;
        server_name znc.yourdomain.com;&lt;br /&gt;
        location / {&lt;br /&gt;
            proxy_pass http://localhost:1025;&lt;br /&gt;
            }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
Restart the NGINX service.&lt;br /&gt;
    {{Cmd|rc-service nginx restart}}&lt;br /&gt;
&lt;br /&gt;
=== Set up SSL certificates ===&lt;br /&gt;
{{Note|We opt to use SSL certificates made by Let&#039;s Encrypt, instead of using the znc.pem certificate that comes with the program.}}&lt;br /&gt;
Install Certbot and its module to work with NGINX.&lt;br /&gt;
    {{Cmd|apk add certbot cerbot-nginx}}&lt;br /&gt;
Run Certbot, this program will create Let&#039;s Encrypt SSL certificates for free. You will have to manually or automatically renew them every month.&lt;br /&gt;
    {{Cmd|certbot}}&lt;br /&gt;
Restart NGINX and you&#039;re done. Your webadmin page will be automatically running the SSL certificate made by Let&#039;s Encrypt.&lt;br /&gt;
    {{Cmd|rc-service nginx restart}}&lt;br /&gt;
Now we will replace the znc.pem certificate with the Let&#039;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&lt;br /&gt;
    {{Cmd|cat /etc/letsencrypt/live/your_domain.com/privkey.pem /etc/letsencrypt/live/your_domain.com/fullchain.pem &amp;gt; /var/lib/znc/znc.pem}}&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:IRC]]&lt;/div&gt;</summary>
		<author><name>Nbm</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=ZNC&amp;diff=16672</id>
		<title>ZNC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=ZNC&amp;diff=16672"/>
		<updated>2019-11-16T06:02:37Z</updated>

		<summary type="html">&lt;p&gt;Nbm: /* Run ZNC in a subdomain using NGINX */ fixed little typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://wiki.znc.in/ZNC 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.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Install the package that contains ZNC.&lt;br /&gt;
    {{Cmd|apk add znc}}&lt;br /&gt;
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.&lt;br /&gt;
    {{Cmd|rc-service znc setup}}&lt;br /&gt;
    {{Note|Make sure the information you enter is as it&#039;s shown below.}}&lt;br /&gt;
    Listen on port: 1025&lt;br /&gt;
    Listen using SSL: yes&lt;br /&gt;
    Listen using both IPv4 and IPv6: no&lt;br /&gt;
    Username: your_username&lt;br /&gt;
    Enter password: your_password&lt;br /&gt;
    Confirm password: your_password&lt;br /&gt;
    Nick: nick&lt;br /&gt;
    Alternate nick: nick_&lt;br /&gt;
    Real name: optional&lt;br /&gt;
    Bind host: try to leave empty&lt;br /&gt;
    Set up a network? no&lt;br /&gt;
    Launch ZNC now? no&lt;br /&gt;
    {{Warning|Never edit the configuration file while ZNC is running; always check with &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;rc-status&amp;lt;/code&amp;gt; if ZNC is running.}}&lt;br /&gt;
Start ZNC as service.&lt;br /&gt;
    {{Cmd|rc-service znc start}}&lt;br /&gt;
&lt;br /&gt;
== Run ZNC in a subdomain using NGINX ==&lt;br /&gt;
&lt;br /&gt;
=== Configure the ZNC webadmin page ===&lt;br /&gt;
&lt;br /&gt;
Open the ZNC webadmin page &amp;lt;code&amp;gt;https://YOUR_SERVER_IP:1025&amp;lt;/code&amp;gt; in your browser. Accept the insecure certificate and go forward.&lt;br /&gt;
Log in with your username and password and go to global settings.&lt;br /&gt;
We want to maintain the webadmin connections separate from the IRC connections.&lt;br /&gt;
Let&#039;s make a listening port for the IRC connections.&lt;br /&gt;
&lt;br /&gt;
In Listen Port(s) add:&lt;br /&gt;
&lt;br /&gt;
    Port: 6697&lt;br /&gt;
    BindHost: *&lt;br /&gt;
    SSL: on&lt;br /&gt;
    IPv4: on&lt;br /&gt;
    IPv6: off&lt;br /&gt;
    IRC: on&lt;br /&gt;
    HTTP: off&lt;br /&gt;
    URIPrefix: /&lt;br /&gt;
Save the information you entered and stop the service for now.&lt;br /&gt;
    {{Cmd|rc-service znc stop}}&lt;br /&gt;
Edit the configuration file.&lt;br /&gt;
    {{Cmd|vim /var/lib/znc/configs/znc.conf}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Listener0 is the webadmin port (it&#039;s listening port 1025). Listener1 is the IRC port (it&#039;s listening port 6697).}}&lt;br /&gt;
Your configuration file should look like this:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/lib/znc/configs/znc.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;Listener listener0&amp;gt;&lt;br /&gt;
    Allow IRC = false&lt;br /&gt;
    AllowWeb = true&lt;br /&gt;
    IPv4 = true&lt;br /&gt;
    IPv6 = false&lt;br /&gt;
    Port = 1025&lt;br /&gt;
    SSL = false&lt;br /&gt;
    URIPrefix = /&lt;br /&gt;
 &amp;lt;Listener listener1&amp;gt;&lt;br /&gt;
    AllowIRC = true&lt;br /&gt;
    AllowWeb = false&lt;br /&gt;
    IPv4 = true&lt;br /&gt;
    IPv6 = false&lt;br /&gt;
    Port = 6697&lt;br /&gt;
    SSL = true&lt;br /&gt;
    URIPrefix = /&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Start ZNC as service.&lt;br /&gt;
    {{Cmd|rc-service znc start}}&lt;br /&gt;
&lt;br /&gt;
=== Configure NGINX ===&lt;br /&gt;
Install NGINX if you haven&#039;t already.&lt;br /&gt;
    {{Cmd|apk add nginx}}&lt;br /&gt;
Create a configuration file in conf.d separated from the main configuration files.  &lt;br /&gt;
    {{Cmd|vim /etc/nginx/conf.d/znc.your_domain.com.conf}}&lt;br /&gt;
The file should look something like below.&lt;br /&gt;
{{Cat|/etc/nginx/conf.d/znc.your_domain.com.conf|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
    server {&lt;br /&gt;
        server_name znc.yourdomain.com;&lt;br /&gt;
        location / {&lt;br /&gt;
            proxy_pass http://localhost:1025;&lt;br /&gt;
            }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
Restart the NGINX service.&lt;br /&gt;
    {{Cmd|rc-service nginx restart}}&lt;br /&gt;
&lt;br /&gt;
=== Set up SSL certificates ===&lt;br /&gt;
{{Note|We opt to use SSL certificates made by Let&#039;s Encrypt, instead of using the znc.pem certificate that comes with the program.}}&lt;br /&gt;
Install Certbot and its module to work with NGINX.&lt;br /&gt;
    {{Cmd|apk add certbot cerbot-nginx}}&lt;br /&gt;
Run Certbot, this program will create Let&#039;s Encrypt SSL certificates for free. You will have to manually or automatically renew them every month.&lt;br /&gt;
    {{Cmd|certbot}}&lt;br /&gt;
Restart NGINX and you&#039;re done. Your webadmin page will be automatically running the SSL certificate made by Let&#039;s Encrypt.&lt;br /&gt;
    {{Cmd|rc-service nginx restart}}&lt;br /&gt;
Now we will replace the znc.pem certificate with the Let&#039;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&lt;br /&gt;
    {{Cmd|cat /etc/letsencrypt/live/your_domain.com/privkey.pem /etc/letsencrypt/live/your_domain.com/fullchain.pem &amp;gt; /var/lib/znc/znc.pem}}&lt;br /&gt;
[[Category:Server]]&lt;br /&gt;
[[Category:IRC]]&lt;/div&gt;</summary>
		<author><name>Nbm</name></author>
	</entry>
</feed>