LinuxCommandLibrary

znc

Run an IRC bouncer

TLDR

Run the initial setup

$ znc [[-c|--makeconf]]
copy

Start the IRC bouncer daemon
$ znc
copy

Setup znc for systemd
$ sudo [[-u|--user]] znc znc [[-c|--makeconf]] [[-d|--datadir]] /var/lib/znc
copy

Enable znc to start on boot and start it now
$ systemctl enable znc --now
copy

SYNOPSIS

znc [options]

PARAMETERS

-h, --help
    Display a help message and exit.

-v, --version
    Show ZNC's version information and exit.

-d <path>, --datadir <path>
    Specify the data directory path (default: ~/.znc or /var/lib/znc).

-c <file>, --config <file>
    Specify an alternative configuration file path.

-p <port>, --port <port>
    Start ZNC on a specific port, overriding the configured port.

-f, --foreground
    Run ZNC in the foreground; do not daemonize.

-D, --debug
    Enable verbose debug output for troubleshooting.

--makeconf
    Interactively create a new znc.conf configuration file.

--makepass
    Generate a hashed password for use in configuration entries.

--adduser <username>
    Interactively add a new user to the configuration.

--setpass <username>
    Interactively set or change a user's password.

--checkconf
    Validate the syntax and content of the configuration file for errors.

DESCRIPTION

ZNC is an IRC bouncer (BNC) that allows you to maintain a persistent connection to IRC networks, even when your client is offline. It acts as an intermediary, staying connected 24/7, buffering missed messages, and replaying them when you reconnect. This ensures you never miss conversations or network events.

ZNC supports multiple users and networks, making it ideal for shared server environments or individuals managing several IRC connections. Its modular architecture allows for extensive customization with various plugins for features like logging, SASL authentication, and more. A built-in web interface provides convenient administration, enabling users to manage settings, add/remove networks, and configure modules without direct command-line interaction. It's a robust solution for enhancing your IRC experience with reliability and flexibility.

CAVEATS

Requires a persistent server or VPS to run continuously for 24/7 availability.
Initial configuration can be complex, especially when setting up advanced features or modules.
Ensure proper file permissions on the data directory and strong passwords for security.

CONFIGURATION FILES

ZNC primarily uses znc.conf for its settings, user accounts, network definitions, and module configurations. This file is typically located in your data directory (e.g., ~/.znc/configs/ or /etc/znc/). It can be edited manually, through the built-in web interface, or initially created using znc --makeconf.

MODULES

ZNC's functionality is highly extensible through a wide array of modules. These modules can add diverse features such as away logging, auto-op, historical message buffering, SASL authentication, and more. Modules can be loaded globally for all users or on a per-user basis within the configuration.

WEB INTERFACE

ZNC includes a powerful web administration interface, usually accessible on a separate port defined in its configuration. This interface provides a user-friendly way to manage users, add/remove networks, configure modules, and adjust general settings without requiring direct command-line access to the server.

HISTORY

ZNC was first released around 2004, quickly gaining popularity as a robust and feature-rich IRC bouncer. It offered a more stable and powerful alternative to simpler BNCs, with its modular architecture allowing for extensive customization and extension. This flexibility contributed to its widespread adoption within the IRC community, and it continues to be actively developed and maintained as a cornerstone for persistent IRC connectivity.

SEE ALSO

irssi(1), weechat(1), screen(1), tmux(1), sshd(8)

Copied to clipboard