Add Another Network to ZNC

ZNC allows you to connect to multiple networks (in fact, it’s one of the benefits it touts on the wiki). It distinguishes between networks and servers (a network can have multiple servers), so this can be slightly confusing the first time you have to do it. The below is a quick summary of the steps that are necessary to add a new network to your ZNC instance, in this instance, Libera.

Let’s say you’re already connected to a network, and let’s say that network is OFTC. You can verify this using following commands:

/znc ListNetworks
/znc ListServers

The ListNetworks command will list this networks available to you.

/znc ListNetworks
+--------------+--------+----------------------+-----------------------------------+----------+
| Network      | On IRC | IRC Server           | IRC User                          | Channels |
+--------------+--------+----------------------+-----------------------------------+----------+
| oftc         | Yes    | weber.oftc.net       | [email protected] | 9        |
+--------------+--------+----------------------+-----------------------------------+----------+

The ListServers command will list the servers configured for this network.

/znc ListServers
+---------------+------+-----+----------+
| Host          | Port | SSL | Password |
+---------------+------+-----+----------+
| irc.oftc.net* | 6697 | SSL |          |
+---------------+------+-----+----------+

Now if you want to connect to another network, you can do so by adding a new network followed by adding a new server on this network. As noted previously, we’re going to configure a connection to Libera. First, we’d create the new network.

/znc AddNetwork libera

Next, we’d switch to this network:

/znc JumpNetwork libera

Now we can add the server:

/znc AddServer irc.libera.chat +6697

And finally, we can connect to the channels as usual:

/join #libera

To switch between networks, you’ll need to use the JumpNetwork command we used above. Alternatively, you can connect to ZNC multiple times by adding the /{network} suffix to your username. For example, if you were previously connecting using the username foo, you’d add another network that would connect using e.g. foo/libera.

More information the ZNC command can be found here.

comments powered by Disqus