ZNC: Difference between revisions

From NixOS Wiki
imported>Mth
Created page with "=ZNC= [https://znc.in/ ZNC] is an [https://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] bouncer: it stays connected to IRC networks so clients can disconnect without missin..."
 
imported>Mth
mNo edit summary
Line 1: Line 1:
=ZNC=
[https://znc.in/ ZNC] is an [https://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] bouncer: it stays connected to IRC networks so clients can disconnect without missing messages or losing the session.
[https://znc.in/ ZNC] is an [https://en.wikipedia.org/wiki/Internet_Relay_Chat IRC] bouncer: it stays connected to IRC networks so clients can disconnect without missing messages or losing the session.



Revision as of 21:11, 11 April 2019

ZNC is an IRC bouncer: it stays connected to IRC networks so clients can disconnect without missing messages or losing the session.

Note: This page concerns NixOS 19.03 and later.

Start with the following:

services.znc = {
  enable = true;
  mutable = false; # Overwrite configuration set by ZNC from the web and chat interfaces.
  useLegacyConfig = false; # Use services.znc.config instead of services.znc.confOptions.
};

And use services.znc.config to configure ZNC as described in Configuration on the ZNC wiki.

Clients

Generate a password with:

$ nix-shell --packages znc --command "znc --makepass"

Then, in configuration.nix:

services.znc = {
  # ...
  openFirewall = true;
  config = {
    LoadModule = [ "adminlog" ]; # Write logs to ~znc/moddata/adminlog/znc.log.
    User.bob = {
      Admin = true;
      Pass.password = {
        Method = "sha256"; # Fill out this section with the generated password.
        Hash = "...";
        Salt = "...";
      };
    };
  };
};

SSL is enabled by default and a self-signed certificate is generated to ~znc/znc.pem. A fingerprint can be extracted with:

cat ~znc/znc.pem | openssl x509 -sha512 -fingerprint -noout | tr -d ':' | tr 'A-Z' 'a-z' | cut -d = -f 2

See also Connecting and Category:Clients on the ZNC wiki.

Networks