Overview
Discover what makes ZNC powerful
ZNC is a lightweight, event‑driven IRC bouncer written in **C++17** that sits between an IRC client and one or more IRC networks. Its core purpose is to maintain a persistent connection, allowing users to disconnect and reconnect without losing chat history or channel state. The daemon exposes a **web‑based administration interface**, an IRC command set, and a **plugin API** that lets developers extend functionality or integrate with external services. ZNC is distributed under the GPLv3, making it attractive for self‑hosted deployments that require full control over code and data.
Persistent channel state
Multi‑network support
Modular architecture
Web interface
Overview
ZNC is a lightweight, event‑driven IRC bouncer written in C++17 that sits between an IRC client and one or more IRC networks. Its core purpose is to maintain a persistent connection, allowing users to disconnect and reconnect without losing chat history or channel state. The daemon exposes a web‑based administration interface, an IRC command set, and a plugin API that lets developers extend functionality or integrate with external services. ZNC is distributed under the GPLv3, making it attractive for self‑hosted deployments that require full control over code and data.
Key Features
- Persistent channel state: Keeps users in channels, preserves modes, and buffers messages for offline periods.
- Multi‑network support: A single ZNC instance can manage dozens of networks per user.
- Modular architecture: Core functionality is split into modules (e.g.,
modperl,modpython,cyrusauth), each compiled as a shared library. - Web interface: Built on the lightweight Crow web framework, providing real‑time configuration and monitoring.
- Extensive logging & metrics: JSON log output, Prometheus‑style counters, and a configurable verbosity level.
Technical Stack
| Layer | Technology |
|---|---|
| Core daemon | C++17, Boost (filesystem, locale), OpenSSL/TLS, libevent |
| Build system | CMake 3.13+, GNU Make, optional SWIG for language bindings |
| Modules | Dynamic libraries (*.so/*.dll) written in C++, Perl, Python, or custom languages via SWIG |
| Web UI | Crow (embedded web server), HTML/CSS/JS, optional React for advanced dashboards |
| Persistence | Flat‑file SQLite (optional), or custom key/value store; configuration stored in ~/.znc/znc.conf |
| Packaging | Native packages for Debian, Fedora, FreeBSD, macOS; Docker images available |
Core Capabilities
- API surface: Each module exposes a set of exported functions (
ZNCMODULE_init,ZNCMODULE_deinit) and can register IRC hooks (e.g., onMessage, onUserConnect). - Event loop: ZNC uses a single threaded event loop powered by
libevent, ensuring deterministic latency for message delivery. - Plugin extensibility: Developers can write modules in C++ or embed scripting languages (Perl, Python). The module loader dynamically resolves symbols and injects configuration via a
znc::Configobject. - Webhooks & callbacks: Modules can expose HTTP endpoints or subscribe to Prometheus metrics, enabling integration with CI/CD pipelines or monitoring stacks.
Deployment & Infrastructure
ZNC is intentionally minimalistic: a single binary plus optional modules, making it ideal for containerized environments. The standard Docker image (znc/znc:latest) mounts a /config volume for persistence and exposes ports 6667 (IRC) and 8080 (web UI). For scaling, multiple ZNC instances can be load‑balanced behind a reverse proxy; each instance handles its own users, reducing contention. High availability can be achieved with Kubernetes StatefulSets and persistent volumes, while the lightweight footprint keeps resource usage under 50 MiB of RAM for a typical instance.
Integration & Extensibility
- Module ecosystem: The official repository hosts dozens of community modules (e.g.,
modflood,modlog). - Scripting hooks: The Python and Perl modules allow quick automation—send notifications to Slack, log events to ElasticSearch, or enforce custom policies.
- Web API: The web UI can be programmatically accessed via CSRF‑protected REST endpoints, enabling external dashboards or bots.
- Custom protocols: By writing a new module that implements the IRC client interface, developers can route traffic through proxies or VPNs transparently.
Developer Experience
ZNC’s documentation is comprehensive, with a dedicated wiki covering build options, module authoring guides, and configuration examples. The source tree is well‑structured: src/ contains the daemon core, modules/ houses individual modules, and docs/ holds Markdown and Doxygen outputs. Community support is active on #znc (Libera.Chat) and the GitHub issue tracker, with frequent releases and CI coverage. The modular design lowers the barrier to entry for contributors: adding a new module requires only implementing a few exported functions and registering hooks.
Use Cases
- Enterprise chat gateways: Organizations can run ZNC as an internal proxy, enforcing authentication via
cyrusauthand logging all traffic. - Personal productivity: Developers who use multiple IRC clients benefit from a single persistent connection, ensuring they never miss a private message.
- Bot hosting: Bots that need to stay online 24/7 can be run behind ZNC, which automatically reconnects on network outages.
- Educational labs: In teaching courses about IRC or networking, students can experiment with modules without exposing real clients to the public internet.
Advantages Over Alternatives
| Criterion | ZNC | Alternative (e.g., Exim, UnrealIRCd) |
|---|---|---|
| Performance | Single‑threaded, event‑driven; low latency | Often multi‑process, higher overhead |
| Extensibility | Native module API + scripting languages | Limited plugin support or requires full |
Open SourceReady to get started?
Join the community and start self-hosting ZNC today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps

SIP3
Real‑time VoIP and RTC traffic monitoring
AmuseWiki
Library‑oriented wiki engine for authoring, archiving and publishing
WinterCMS
Fast, secure CMS built on Laravel for developers and agencies
WeeChat
Lightweight, extensible chat client for multiple protocols
bitmagnet
Self‑hosted BitTorrent indexer with DHT crawling
Leed
Minimalist RSS/ATOM aggregator for fast, non‑intrusive feed reading
