zerta

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: Apache-2.0

README

Zerta — XMPP Server

High-performance, production-grade XMPP server in Go. Fork of ortuman/jackal (base taken from jackal, continued under Apache 2.0).

XMPP 2024 Compliance Suite 100% | Go 1.25+ | Apache 2.0


Features

  • 78 XMPP modules — XMPP 2024 Compliance Suite complete (RFC 6120/6121)
  • Modern auth — SASL2 + Bind2 single round-trip, FAST token re-auth, channel binding
  • Multi-device sync — Message Carbons (XEP-0280), MAM (XEP-0313), Stream Management (XEP-0198)
  • Encryption — OMEMO (XEP-0384) with PEP key store
  • File sharing — HTTP Upload (XEP-0363), local or HMAC-signed URLs
  • Group chat — Multi-User Chat (XEP-0045) with persistent rooms, moderation, history
  • Voice/video — Embedded TURN/STUN (RFC 5766) with XEP-0215 credentials
  • Push notifications — XEP-0357 for mobile background delivery
  • Storage — MySQL 8+, PostgreSQL 12+, BoltDB
  • Caching — Redis-backed repository layer
  • Clustering — etcd, Redis, PostgreSQL, NATS, or Raft
  • Admin API — REST endpoints (/api/v1/) for user management
  • Monitoring — Prometheus metrics, health checks, pprof

Quick Start

Binary
git clone https://git.uuxo.net/UUXO/zerta.git
cd zerta
make install installctl
zerta --config=config.yaml
Environment Variables
export ZERTA_CONFIG_FILE=/path/to/config.yaml
zerta
CLI Flags
--config <file>    Configuration file (default: config.yaml)
--version          Print version
--help             Show this message
Database Setup

PostgreSQL example:

CREATE ROLE zerta WITH LOGIN PASSWORD 'password';
CREATE DATABASE zerta;
GRANT ALL PRIVILEGES ON DATABASE zerta TO zerta;
psql --user zerta --password -f sql/postgres.up.psql

The schema is not created automatically — import sql/postgres.up.psql (or sql/mysql.up.sql) once before the first start.

Configuration:

storage:
  type: pgsql
  pgsql:
    host: 127.0.0.1:5432
    user: zerta
    password: password
    database: zerta
Create Users
zertactl user add username:password
Docker
docker-compose -f dockerfiles/docker-compose.yml up

See helm/scripts/ for Kubernetes deployment.

Configuration

See docs/CONFIG_REFERENCE.md for complete configuration documentation.

Example configuration: config/example.config.yaml

Clustering

Configure a distributed KV store (etcd, Redis, PostgreSQL, NATS, or Raft):

cluster:
  type: kv
  kv:
    type: etcd
    etcd:
      endpoints:
        - http://127.0.0.1:2379
  server:
    port: 14369

Extensibility

Custom authenticators and components via gRPC. The protobuf definitions live in proto/.

Documentation

Security

Please report security issues privately — see SECURITY.md.

License

Apache 2.0. See LICENSE and NOTICE.

Directories

Path Synopsis
cmd
zerta command
Package main provides XMPP functionality.
Package main provides XMPP functionality.
zerta-import command
Package main provides XMPP functionality.
Package main provides XMPP functionality.
zertactl command
Package main provides XMPP functionality.
Package main provides XMPP functionality.
zertactl/ctlv1
Package ctlv1 provides zertactl v1 command definitions.
Package ctlv1 provides zertactl v1 command definitions.
zertactl/ctlv1/command
Package command provides XMPP functionality.
Package command provides XMPP functionality.
internal
testcert
Package testcert generates throwaway TLS material for tests.
Package testcert generates throwaway TLS material for tests.
pkg
admin/server
Package adminserver provides XMPP functionality.
Package adminserver provides XMPP functionality.
api/rest
Package rest provides a JSON REST API for server administration.
Package rest provides a JSON REST API for server administration.
auth
Package auth provides XMPP authentication mechanisms.
Package auth provides XMPP authentication mechanisms.
auth/pepper
Package pepper provides pepper key management for SCRAM password hashing.
Package pepper provides pepper key management for SCRAM password hashing.
c2s
cluster/connmanager
Package clusterconnmanager provides XMPP functionality.
Package clusterconnmanager provides XMPP functionality.
cluster/instance
Package instance provides cluster instance identification utilities.
Package instance provides cluster instance identification utilities.
cluster/kv
Package kv defines the cluster key-value store interface.
Package kv defines the cluster key-value store interface.
cluster/kv/etcd
Package etcdkv implements the cluster key-value store using etcd.
Package etcdkv implements the cluster key-value store using etcd.
cluster/kv/nats
Package natskv implements the cluster key-value store using NATS JetStream.
Package natskv implements the cluster key-value store using NATS JetStream.
cluster/kv/pgsql
Package pgsqlkv provides XMPP functionality.
Package pgsqlkv provides XMPP functionality.
cluster/kv/raft
Package raftkv provides XMPP functionality.
Package raftkv provides XMPP functionality.
cluster/kv/redis
Package rediskv implements the cluster key-value store using Redis.
Package rediskv implements the cluster key-value store using Redis.
cluster/kv/types
Package kvtypes defines shared types for the cluster key-value store subsystem.
Package kvtypes defines shared types for the cluster key-value store subsystem.
cluster/memberlist
Package memberlist provides XMPP functionality.
Package memberlist provides XMPP functionality.
cluster/resourcemanager
Package resourcemanager provides cluster resource management interfaces.
Package resourcemanager provides cluster resource management interfaces.
cluster/router
Package clusterrouter provides XMPP functionality.
Package clusterrouter provides XMPP functionality.
cluster/server
Package clusterserver provides cluster server component routing services.
Package clusterserver provides cluster server component routing services.
component
Package component defines the XMPP component interface.
Package component defines the XMPP component interface.
component/extcomponentmanager
Package extcomponentmanager provides XMPP functionality.
Package extcomponentmanager provides XMPP functionality.
component/xep0114
Package xep0114 provides XMPP functionality.
Package xep0114 provides XMPP functionality.
hook
Package hook provides XMPP functionality.
Package hook provides XMPP functionality.
host
Package host provides virtual host management for the XMPP server.
Package host provides virtual host management for the XMPP server.
installer
Package installer provides systemd service installation and removal for zerta.
Package installer provides systemd service installation and removal for zerta.
log
Package log provides XMPP functionality.
Package log provides XMPP functionality.
model
Package model defines common codec interfaces for zerta model types.
Package model defines common codec interfaces for zerta model types.
model/archive
Package archivemodel defines types for message archive storage.
Package archivemodel defines types for message archive storage.
model/blocklist
Package blocklistmodel defines types for XEP-0191 block list storage.
Package blocklistmodel defines types for XEP-0191 block list storage.
model/c2s
Package c2smodel defines types for client-to-server stream data.
Package c2smodel defines types for client-to-server stream data.
model/cluster
Package clustermodel provides XMPP functionality.
Package clustermodel provides XMPP functionality.
model/disco
Package discomodel defines types for XEP-0030 service discovery.
Package discomodel defines types for XEP-0030 service discovery.
model/last
Package lastmodel defines types for XEP-0012 Last Activity.
Package lastmodel defines types for XEP-0012 Last Activity.
model/mix
Package mixmodel provides MIX channel data models.
Package mixmodel provides MIX channel data models.
model/muc
Package mucmodel provides XMPP functionality.
Package mucmodel provides XMPP functionality.
model/mucrtbl
Package mucrtbl defines data types for the MUC Real-Time Block List.
Package mucrtbl defines data types for the MUC Real-Time Block List.
model/privacylist
Package privacylist defines types for XEP-0016 privacy lists.
Package privacylist defines types for XEP-0016 privacy lists.
model/pubsub
Package pubsubmodel provides XMPP functionality.
Package pubsubmodel provides XMPP functionality.
model/push
Package pushmodel defines types for push notification tokens.
Package pushmodel defines types for push notification tokens.
model/roster
Package rostermodel provides roster data models.
Package rostermodel provides roster data models.
model/sharedroster
Package sharedrostermodel defines types for the Shared Roster Groups feature.
Package sharedrostermodel defines types for the Shared Roster Groups feature.
model/user
Package usermodel defines types for XMPP user accounts.
Package usermodel defines types for XMPP user accounts.
module
Package module provides XMPP functionality.
Package module provides XMPP functionality.
module/accountactivity
Package accountactivity tracks user login/logout events via hooks.
Package accountactivity tracks user login/logout events via hooks.
module/announce
Package announce implements the Server Announce / MOTD module.
Package announce implements the Server Announce / MOTD module.
module/antispam
Package antispam provides XMPP functionality.
Package antispam provides XMPP functionality.
module/blockstrangers
Package blockstrangers silently drops incoming S2S messages from JIDs that are not in the recipient's roster.
Package blockstrangers silently drops incoming S2S messages from JIDs that are not in the recipient's roster.
module/certwatch
Package certwatch monitors TLS certificate expiry for all configured hosts.
Package certwatch monitors TLS certificate expiry for all configured hosts.
module/motd
Package motd implements a Message of the Day module.
Package motd implements a Message of the Day module.
module/mucrtbl
Package mucrtbl implements a MUC Real-Time Block List.
Package mucrtbl implements a MUC Real-Time Block List.
module/offline
Package offline provides XMPP functionality.
Package offline provides XMPP functionality.
module/prescounter
Package prescounter implements presence subscription flood detection.
Package prescounter implements presence subscription flood detection.
module/roster
Package roster provides XMPP functionality.
Package roster provides XMPP functionality.
module/sharedroster
Package sharedroster implements server-managed shared roster groups (mod_shared_roster).
Package sharedroster implements server-managed shared roster groups (mod_shared_roster).
module/webregister
Package webregister provides a simple HTML registration page.
Package webregister provides a simple HTML registration page.
module/xep0004
Package xep0004 implements XEP-0004: Data Forms.
Package xep0004 implements XEP-0004: Data Forms.
module/xep0012
Package xep0012 provides XMPP functionality.
Package xep0012 provides XMPP functionality.
module/xep0016
Package xep0016 implements XEP-0016: Privacy Lists.
Package xep0016 implements XEP-0016: Privacy Lists.
module/xep0030
Package xep0030 implements XEP-0030 Service Discovery.
Package xep0030 implements XEP-0030 Service Discovery.
module/xep0033
Package xep0033 implements Extended Stanza Addressing (XEP-0033) feature advertisement.
Package xep0033 implements Extended Stanza Addressing (XEP-0033) feature advertisement.
module/xep0045
Package xep0045 provides XMPP functionality.
Package xep0045 provides XMPP functionality.
module/xep0049
Package xep0049 provides XMPP functionality.
Package xep0049 provides XMPP functionality.
module/xep0050
Package xep0050 provides XMPP functionality.
Package xep0050 provides XMPP functionality.
module/xep0054
Package xep0054 provides XMPP functionality.
Package xep0054 provides XMPP functionality.
module/xep0055
Package xep0055 implements Jabber Search (XEP-0055).
Package xep0055 implements Jabber Search (XEP-0055).
module/xep0059
Package xep0059 implements XEP-0059: Result Set Management.
Package xep0059 implements XEP-0059: Result Set Management.
module/xep0060
Package xep0060 implements XEP-0060: Publish-Subscribe.
Package xep0060 implements XEP-0060: Publish-Subscribe.
module/xep0065
Package xep0065 implements XEP-0065: SOCKS5 Bytestreams.
Package xep0065 implements XEP-0065: SOCKS5 Bytestreams.
module/xep0066
Package xep0066 implements XEP-0066: Out of Band Data.
Package xep0066 implements XEP-0066: Out of Band Data.
module/xep0077
Package xep0077 implements XEP-0077: In-Band Registration.
Package xep0077 implements XEP-0077: In-Band Registration.
module/xep0084
Package xep0084 implements XEP-0084: User Avatar.
Package xep0084 implements XEP-0084: User Avatar.
module/xep0085
Package xep0085 implements XEP-0085: Chat State Notifications.
Package xep0085 implements XEP-0085: Chat State Notifications.
module/xep0092
Package xep0092 implements XEP-0092: Software Version.
Package xep0092 implements XEP-0092: Software Version.
module/xep0115
Package xep0115 implements XEP-0115: Entity Capabilities.
Package xep0115 implements XEP-0115: Entity Capabilities.
module/xep0133
Package xep0133 provides XMPP functionality.
Package xep0133 provides XMPP functionality.
module/xep0153
Package xep0153 implements XEP-0153: vCard-Based Avatars.
Package xep0153 implements XEP-0153: vCard-Based Avatars.
module/xep0156
Package xep0156 implements XEP-0156: Discovering Alternative XMPP Connection Methods.
Package xep0156 implements XEP-0156: Discovering Alternative XMPP Connection Methods.
module/xep0157
Package xep0157 implements XEP-0157: Contact Addresses for XMPP Services.
Package xep0157 implements XEP-0157: Contact Addresses for XMPP Services.
module/xep0178
Package xep0178 implements XEP-0178: Best Practices for Use of SASL EXTERNAL.
Package xep0178 implements XEP-0178: Best Practices for Use of SASL EXTERNAL.
module/xep0184
Package xep0184 implements XEP-0184: Message Delivery Receipts.
Package xep0184 implements XEP-0184: Message Delivery Receipts.
module/xep0191
Package xep0191 provides XMPP functionality.
Package xep0191 provides XMPP functionality.
module/xep0198
Package xep0198 provides XMPP functionality.
Package xep0198 provides XMPP functionality.
module/xep0198/queue
Package streamqueue provides XMPP functionality.
Package streamqueue provides XMPP functionality.
module/xep0199
Package xep0199 provides XMPP functionality.
Package xep0199 provides XMPP functionality.
module/xep0202
Package xep0202 provides XMPP functionality.
Package xep0202 provides XMPP functionality.
module/xep0206
Package xep0206 provides XMPP functionality.
Package xep0206 provides XMPP functionality.
module/xep0215
Package xep0215 implements XEP-0215: External Service Discovery.
Package xep0215 implements XEP-0215: External Service Discovery.
module/xep0227
Package xep0227 implements XEP-0227: Portable Import/Export Format for XMPP-IM Servers.
Package xep0227 implements XEP-0227: Portable Import/Export Format for XMPP-IM Servers.
module/xep0231
Package xep0231 implements Bits of Binary (XEP-0231) feature advertisement.
Package xep0231 implements Bits of Binary (XEP-0231) feature advertisement.
module/xep0279
Package xep0279 implements XEP-0279: Server IP Check.
Package xep0279 implements XEP-0279: Server IP Check.
module/xep0280
Package xep0280 implements XEP-0280: Message Carbons.
Package xep0280 implements XEP-0280: Message Carbons.
module/xep0292
Package xep0292 implements XEP-0292: vCard4 Over XMPP.
Package xep0292 implements XEP-0292: vCard4 Over XMPP.
module/xep0308
Package xep0308 provides XMPP functionality.
Package xep0308 provides XMPP functionality.
module/xep0313
Package xep0313 implements XEP-0313: Message Archive Management.
Package xep0313 implements XEP-0313: Message Archive Management.
module/xep0328
Package xep0328 implements JID Prep (XEP-0328) feature advertisement.
Package xep0328 implements JID Prep (XEP-0328) feature advertisement.
module/xep0333
Package xep0333 implements XEP-0333: Displayed Markers.
Package xep0333 implements XEP-0333: Displayed Markers.
module/xep0352
Package xep0352 implements XEP-0352: Client State Indication.
Package xep0352 implements XEP-0352: Client State Indication.
module/xep0353
Package xep0353 implements XEP-0353: Jingle Message Initiation.
Package xep0353 implements XEP-0353: Jingle Message Initiation.
module/xep0355
Package xep0355 implements Namespace Delegation (XEP-0355) feature advertisement.
Package xep0355 implements Namespace Delegation (XEP-0355) feature advertisement.
module/xep0356
Package xep0356 implements Privileged Entity (XEP-0356) feature advertisement.
Package xep0356 implements Privileged Entity (XEP-0356) feature advertisement.
module/xep0357
Package xep0357 implements XEP-0357 Push Notifications.
Package xep0357 implements XEP-0357 Push Notifications.
module/xep0359
Package xep0359 implements XEP-0359: Unique and Stable Stanza IDs.
Package xep0359 implements XEP-0359: Unique and Stable Stanza IDs.
module/xep0363
Package xep0363 implements XEP-0363: HTTP File Upload.
Package xep0363 implements XEP-0363: HTTP File Upload.
module/xep0369
Package xep0369 implements MIX (XEP-0369/XEP-0405) — Mediated Information eXchange.
Package xep0369 implements MIX (XEP-0369/XEP-0405) — Mediated Information eXchange.
module/xep0377
Package xep0377 implements XEP-0377: Spam Reporting.
Package xep0377 implements XEP-0377: Spam Reporting.
module/xep0380
Package xep0380 implements XEP-0380: Explicit Message Encryption.
Package xep0380 implements XEP-0380: Explicit Message Encryption.
module/xep0392
Package xep0392 implements XEP-0392: Consistent Color Generation.
Package xep0392 implements XEP-0392: Consistent Color Generation.
module/xep0394
Package xep0394 implements XEP-0394: Message Markup.
Package xep0394 implements XEP-0394: Message Markup.
module/xep0397
Package xep0397 implements XEP-0397: Instant Stream Resumption.
Package xep0397 implements XEP-0397: Instant Stream Resumption.
module/xep0398
Package xep0398 implements XEP-0398: User Avatar to vCard-Based Avatars Conversion.
Package xep0398 implements XEP-0398: User Avatar to vCard-Based Avatars Conversion.
module/xep0401
Package xep0401 provides XMPP functionality.
Package xep0401 provides XMPP functionality.
module/xep0411
Package xep0411 implements XEP-0411: Bookmarks Conversion.
Package xep0411 implements XEP-0411: Bookmarks Conversion.
module/xep0421
Package xep0421 provides XMPP functionality.
Package xep0421 provides XMPP functionality.
module/xep0424
Package xep0424 implements XEP-0424: Message Retraction.
Package xep0424 implements XEP-0424: Message Retraction.
module/xep0425
Package xep0425 provides XMPP functionality.
Package xep0425 provides XMPP functionality.
module/xep0433
Package xep0433 implements XEP-0433: Extended Channel Search.
Package xep0433 implements XEP-0433: Extended Channel Search.
module/xep0440
Package xep0440 implements XEP-0440: SASL Channel-Binding Type Capability.
Package xep0440 implements XEP-0440: SASL Channel-Binding Type Capability.
module/xep0441
Package xep0441 implements MAM Extended (XEP-0441) feature advertisement.
Package xep0441 implements MAM Extended (XEP-0441) feature advertisement.
module/xep0444
Package xep0444 implements XEP-0444: Message Reactions.
Package xep0444 implements XEP-0444: Message Reactions.
module/xep0453
Package xep0453 implements XEP-0453: DOAP usage in XMPP.
Package xep0453 implements XEP-0453: DOAP usage in XMPP.
module/xep0461
Package xep0461 provides XMPP functionality.
Package xep0461 provides XMPP functionality.
module/xep0482
Package xep0482 provides XMPP functionality.
Package xep0482 provides XMPP functionality.
module/xep0485
Package xep0485 implements XEP-0485: PubSub Server Information.
Package xep0485 implements XEP-0485: PubSub Server Information.
module/xep0490
Package xep0490 implements XEP-0490: Message Displayed Synchronization.
Package xep0490 implements XEP-0490: Message Displayed Synchronization.
purge
Package purge implements automatic purging of inactive XMPP user accounts.
Package purge implements automatic purging of inactive XMPP user accounts.
router
Package router provides XMPP functionality.
Package router provides XMPP functionality.
router/stream
Package stream defines the C2S and S2S stream interfaces used by the router.
Package stream defines the C2S and S2S stream interfaces used by the router.
runqueue/mpsc
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
Package mpsc provides an efficient implementation of a multi-producer, single-consumer lock-free queue.
s2s
Package s2s provides XMPP functionality.
Package s2s provides XMPP functionality.
session
Package session provides XMPP functionality.
Package session provides XMPP functionality.
shaper
Package shaper provides traffic shaping and rate limiting for XMPP streams.
Package shaper provides traffic shaping and rate limiting for XMPP streams.
storage
Package storage provides XMPP functionality.
Package storage provides XMPP functionality.
storage/boltdb
Package boltdb provides BoltDB-backed storage implementations for zerta.
Package boltdb provides BoltDB-backed storage implementations for zerta.
storage/cached
Package cachedrepository provides cached storage repository implementations.
Package cachedrepository provides cached storage repository implementations.
storage/cached/redis
Package rediscache provides a Redis-backed cache implementation.
Package rediscache provides a Redis-backed cache implementation.
storage/measured
Package measuredrepository provides XMPP functionality.
Package measuredrepository provides XMPP functionality.
storage/mysql
Package mysqlrepository provides XMPP functionality.
Package mysqlrepository provides XMPP functionality.
storage/pgsql
Package pgsqlrepository provides XMPP functionality.
Package pgsqlrepository provides XMPP functionality.
storage/repository
Package repository defines the storage repository interfaces for zerta.
Package repository defines the storage repository interfaces for zerta.
transport
Package transport provides XMPP stream transport implementations (socket, WebSocket).
Package transport provides XMPP stream transport implementations (socket, WebSocket).
transport/compress
Package compress provides XMPP functionality.
Package compress provides XMPP functionality.
util/crashreporter
Package crashreporter provides crash reporting and recovery utilities.
Package crashreporter provides crash reporting and recovery utilities.
util/ratelimiter
Package ratelimiter provides XMPP functionality.
Package ratelimiter provides XMPP functionality.
util/stringmatcher
Package stringmatcher provides interfaces and implementations for string pattern matching.
Package stringmatcher provides interfaces and implementations for string pattern matching.
util/strings
Package stringsutil provides string utility functions for zerta.
Package stringsutil provides string utility functions for zerta.
util/tls
Package tlsutil provides XMPP functionality.
Package tlsutil provides XMPP functionality.
util/xmpp
Package xmpputil provides XMPP utility functions.
Package xmpputil provides XMPP utility functions.
version
Package version provides semantic versioning for the zerta server.
Package version provides semantic versioning for the zerta server.
zerta
Package zerta provides XMPP functionality.
Package zerta provides XMPP functionality.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL