Clear, the xmppd mascot

xmppd

Carrier-grade XMPP server in Zig

BSD-2-Clause · v0.8.5 · Free & Open Source

About

xmppd is a from-scratch XMPP server written in Zig, inspired by Postfix's multi-process architecture. It targets FreeBSD first with kqueue-based async I/O, DANE-first federation, and thread-per-core scaling.

Built for operators who want a fast, auditable, and dependency-minimal messaging server that they fully control.

Architecture

Multi-Process Separate daemons for core, auth, S2S federation. Fault-isolated, privilege-separated.
Thread-Per-Core SO_REUSEPORT_LB load balancing with per-worker kqueue event loops and MPSC delivery.
DANE-First DNS-based authentication is the primary S2S trust path. PKIX/CA is the fallback, not the default.
Zero Runtime Deps Static Zig binaries. Only OpenSSL and your chosen storage backend at runtime.
Sub-Millisecond 0.31ms average message latency. No GC pauses, no VM overhead, no interpreter.
~30,000 LOC Entire server in ~30k lines of Zig. Auditable. No transitive dependency surprises.

Standards Compliance

19 XEPs implemented. Full RFC 6120/6121 core with 360/367 SINT interop tests passing.

RFC 6120 — XMPP Core RFC 6121 — XMPP IM XEP-0030 — Service Discovery XEP-0045 — Multi-User Chat XEP-0054 — vcard-temp XEP-0077 — In-Band Registration XEP-0085 — Chat State Notifications XEP-0092 — Software Version XEP-0115 — Entity Capabilities XEP-0163 — PEP XEP-0184 — Message Receipts XEP-0191 — Blocking Command XEP-0198 — Stream Management XEP-0280 — Message Carbons XEP-0308 — Last Message Correction XEP-0313 — MAM XEP-0333 — Chat Markers XEP-0334 — Message Processing Hints XEP-0352 — Client State Indication XEP-0402 — PEP Bookmarks

How It Compares

xmppd ejabberd Prosody
Language Zig Erlang Lua
Architecture Multi-process + thread-per-core Erlang VM Single process
Msg latency <0.4ms ~2–5ms ~1–3ms
Runtime deps OpenSSL only Erlang/OTP + ~50 deps Lua + ~30 deps
Federation DANE-first PKIX-first PKIX-first
License BSD-2-Clause GPL-2.0 MIT

Install

xmppd runs on FreeBSD. Install from the package repository or build from source.

# FreeBSD pkg
pkg install xmppd

# Build from source (requires Zig 0.15.2)
git clone https://github.com/securemessage/xmppd.git
cd xmppd && zig build -Doptimize=ReleaseSafe

# Start
service xmppd start

Six binaries are produced: xmppd, xmppd-core, xmppd-auth, xmppd-auth-oidc, xmppd-s2s, xmppctl

Source Code

xmppd is 100% free and open source under the BSD-2-Clause license.

Why

I want to kill SMS, and by extension, the phone number.

I've been waiting for a good XMPP server since the early 2000s — back when it was still called Jabber and the RFC process was just getting started. When XMPP became an official standard, I thought surely now someone will build a great server.

Years went by. Nobody did.

Meanwhile, proprietary messaging came and went. AIM disappeared. Slack showed up. WhatsApp. Telegram. Matrix. The world kept shifting toward centralization, and somehow SMS — an archaic, insecure technology from the 1990s — became more relevant, not less. Today you're expected to hand over a phone number to sign up for anything. Often it must be a cell phone, not VoIP. More control by legacy carriers. More centralization.

SMS needs to die!

Matrix gained traction, but it's an inferior protocol largely controlled by a single entity. Prosody, ejabberd, and Openfire are okay. They are not great.

After nearly 25 years of waiting, I finally realized: nobody else is going to do it.

So I'm building it myself. Not just a good server — a great one.