Overview
Discover what makes Citadel powerful
Citadel is a self‑hosted, feature‑rich groupware platform that unifies messaging, calendaring, collaboration and web publishing within a single, modular codebase. At its core it exposes a **room‑based architecture**: each logical unit (email, calendar, wiki, forum, etc.) is a *room* that can be created, configured and shared independently. This abstraction allows developers to treat each service as a first‑class citizen while still sharing a common authentication, storage and UI layer.
Language & Runtime
Database
Web Interface
Networking
Overview
Citadel is a self‑hosted, feature‑rich groupware platform that unifies messaging, calendaring, collaboration and web publishing within a single, modular codebase. At its core it exposes a room‑based architecture: each logical unit (email, calendar, wiki, forum, etc.) is a room that can be created, configured and shared independently. This abstraction allows developers to treat each service as a first‑class citizen while still sharing a common authentication, storage and UI layer.
Technical Stack
- Language & Runtime: Citadel is written in C++ for performance and low‑level control, with a small C runtime layer. The application bundles its own event loop and networking stack, reducing external dependencies.
- Database: Data persistence is handled by a SQLite engine for lightweight deployments or PostgreSQL for larger, multi‑tenant environments. The schema is fully normalized and can be introspected via standard SQL tools.
- Web Interface: A modern, responsive UI is rendered by a built‑in HTTP server that serves static assets and dynamic content via JSON APIs. The front‑end is built with React‑like principles but compiled to vanilla JavaScript to keep the footprint minimal.
- Networking: SMTP/IMAP/POP3, CalDAV/CardDAV, XMPP (for instant messaging), and WebSocket support are all implemented in‑house, providing end‑to‑end encryption and TLS termination.
Core Capabilities & APIs
Citadel exposes a comprehensive RESTful API surface for every room type:
- Email – programmatic sending, folder management, and search.
- Calendar – CRUD operations on events, attendee invitations, and free‑busy queries via CalDAV.
- Wiki/Blog – Markdown rendering, revision history, and embed support.
- Forum & Mailing List – thread creation, moderation hooks, and subscription management.
Additionally, Citadel implements webhooks for real‑time notifications on events such as new messages or calendar invites. Developers can also extend the platform via a plugin system that accepts dynamic libraries (.so/.dll) compiled against a stable C++ API, enabling custom authentication providers or data exporters.
Deployment & Infrastructure
Citadel is designed for self‑hosting from a single machine to a clustered setup. The binary includes a lightweight container runtime, making Docker or Podman deployments straightforward:
- Single‑node: A single binary plus a SQLite database fits comfortably on an ARM or x86 laptop.
- High‑availability: Multiple Citadel instances can be load‑balanced behind a reverse proxy (NGINX/Traefik). PostgreSQL replication ensures data consistency across nodes.
- Scalability: The event‑driven architecture allows horizontal scaling of the HTTP and XMPP workers without sharing state, while the database layer handles contention via row‑level locking.
Citadel also supports multi‑domain hosting, enabling developers to run isolated rooms for each customer while sharing a single codebase.
Integration & Extensibility
Beyond the built‑in APIs, Citadel offers:
- LDAP/Active Directory integration for corporate authentication.
- OAuth2 support for external identity providers (Google, Azure AD).
- SAML single‑sign‑on for enterprise environments.
- Custom scripting via embedded Lua scripts that can intercept and modify message flow or calendar events.
The plugin framework is fully documented, allowing developers to write modules in C++ that hook into the core event loop. Sample plugins (e.g., a PDF attachment extractor) are provided in the source tree, demonstrating how to extend functionality without touching the core.
Developer Experience
Citadel’s configuration is largely declarative, using a simple YAML file (citadel.conf) that specifies database credentials, port numbers, and room visibility. The documentation is organized into a developer guide that covers API reference, plugin development, and deployment best practices. The community is active on the official forum (which itself runs on Citadel) and GitHub issues, ensuring rapid feedback for contributors.
Use Cases
- Enterprise Collaboration Hub: Companies can replace disparate tools (email, calendar, wiki) with a single, self‑hosted stack that integrates into existing LDAP directories.
- Educational Institutions: Schools can deploy Citadel to provide students with a unified messaging and scheduling platform, while keeping data on campus servers.
- Open‑Source Projects: Communities can host their own mailing lists, forums, and wikis under a single roof, avoiding external dependencies.
Advantages
- Performance: Native C++ implementation yields low latency for IMAP/SMTP and instant messaging.
- Flexibility: The room abstraction lets developers expose only the services needed, reducing attack surface.
- Licensing: Fully GPL‑licensed with no proprietary restrictions; perfect for privacy‑conscious deployments.
- Extensibility: Robust plugin API and webhooks enable rapid customization without forking the core.
In summary, Citadel offers a tightly integrated, developer‑friendly groupware platform that balances performance, extensibility, and self‑hosting simplicity—making it an attractive choice for teams seeking full control over their collaboration stack.
Open SourceReady to get started?
Join the community and start self-hosting Citadel today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Firezone
Zero‑trust VPN replacement built on WireGuard®
GO Feature Flag
Lightweight, Open‑Source Feature Flagging for Self‑Hosted Apps
Blocky
Fast, privacy‑first DNS proxy and ad blocker for local networks
Prisme Analytics
Privacy‑first web analytics in minutes
Fusio
Self-hosted API Management for Builders
Tiledesk
Open‑source, AI‑powered live chat for all channels
