Public | Automated Build

Last pushed: 21 days ago
Short Description
IRC bouncer based on Alpine Linux w/ SSL
Full Description


IRC bouncer based on Alpine Linux

Quick Start


Initialize a mantlepro/znc container with --makeconf to store settings in a
persistent Docker volume:

docker run --rm -it -v znc:/znc mantlepro/znc --makeconf --datadir /znc

Choose port 6697 and https when prompted.

Once the initial configuration is complete, run your znc server:

First Run

docker run -it -d --name znc -v znc:/znc -p 6697:6697 mantlepro/znc

Optionally add --restart always to start the container automatically.

A restart policy can also be added after the container has been running:

docker update --restart=always znc

After the first run, the container can now be started and stopped with the usual
docker commands:

docker stop znc
docker start znc
docker restart znc

Browser Access

Point your favorite browser to https://localhost:6697/ and log in with the same
username and password chosen during setup.

Note: If accessing znc from a different machine other than localhost, insure port 6697
is open on the host machine.


Add the connection to irssi, using the freenode network for example:

/network add freenode
/server add -net freenode -auto -tls localhost 6697 <USERNAME>/freenode:<PASSWORD>
/connect freenode

To connect to the znc container without defining a network:

/connect 6697 -tls <USERNAME>:<PASSWORD>

Add /znc Alias

/alias znc msg *status


To be able to connect securely with TLS/SSL, Get the container's SHA512
fingerprint by running a temporary container with volumes from the znc

This fingerprint will be used later with /set irc.server.<NETWORK>.ssl_fingerprint

docker run --rm -it --volumes-from znc alpine cat /znc/znc.pem | openssl x509 -sha512 -fingerprint -noout | tr -d ':' | tr 'A-Z' 'a-z' | cut -d = -f 2

Add Server

/server add <NETWORK> <ZNC_HOST>/6697 -tls -username=<USERNAME>/<NETWORK> -password=<PASSWORD> -autoconnect
/set irc.server.<NETWORK>.ssl_fingerprint <SHA512_FINGERPRINT>
/connect <NETWORK>

Add /znc Alias

WeeChat doesn't send unknown commands to server by default to prevent
accidentally sending passwords or other sensitive content. You can either
disable this with /set on or create an alias
specifically for /znc:

/alias add znc /quote znc


To view a list of ZNC commands, issue

/znc help

If you don't see help output from *status, make sure the /znc alias has been

Add OFTC Network to ZNC

/znc addnetwork oftc
/znc jumpnetwork oftc
/znc addserver +6697
/join #debian

With multiple networks added to ZNC and subsequent servers added to your chat
client, you should be able to run /connect oftc and /connect freenode within
your IRC client, letting ZNC handle network and channel preferences.


Load sasl module to identify before connecting

/znc LoadMod sasl
<*status> Loaded module [sasl] [/usr/lib64/znc/]

Set username and password to the ones you've registered on freenode for example

<*sasl> Username has been set to [myusername]
<*sasl> Password has been set to [mypassword]

SASL in Irssi

/network add -sasl_username <REGISTERED_USERNAME> -sasl_password <REGISTERED_PASSWORD> -sasl_mechanism PLAIN freenode
/server add -auto -net freenode -ssl -ssl_verify 6697

SASL in WeeChat

/set irc.server_default.sasl_mechanism PLAIN

PLAIN sends username and password in plain text, so insure TLS/SSL is used and
use a unique password for your IRC account (insert common sense security lecture

Set SASL username and password for network

/unset irc.server.<NETWORK>.sasl_mechanism
/set irc.server.<NETWORK>.sasl_username <SASL_USERNAME>
/set irc.server.<NETWORK>.sasl_password <PASSWORD>

More info:


Pull requests are welcome, as are bugs, and feature requests via github

Docker Pull Command
Source Repository