Overview
Discover what makes SabreDAV powerful
SabreDAV is a mature PHP framework that abstracts the implementation of WebDAV, CalDAV, and CardDAV servers. From a developer’s standpoint it functions as an extensible middleware layer that translates HTTP/WebDAV requests into domain‑specific operations on calendars and contacts. The framework exposes a clean object‑oriented API that lets you plug in custom backends, authentication strategies, and caching layers while still adhering to the RFCs for CalDAV (RFC 4791) and CardDAV (RFC 6350). By handling the low‑level request parsing, XML serialization, and protocol compliance internally, SabreDAV allows developers to focus on business logic rather than the intricacies of calendar and address book protocols.
Language & Runtime
Core Framework
Backends
Database
Overview
SabreDAV is a mature PHP framework that abstracts the implementation of WebDAV, CalDAV, and CardDAV servers. From a developer’s standpoint it functions as an extensible middleware layer that translates HTTP/WebDAV requests into domain‑specific operations on calendars and contacts. The framework exposes a clean object‑oriented API that lets you plug in custom backends, authentication strategies, and caching layers while still adhering to the RFCs for CalDAV (RFC 4791) and CardDAV (RFC 6350). By handling the low‑level request parsing, XML serialization, and protocol compliance internally, SabreDAV allows developers to focus on business logic rather than the intricacies of calendar and address book protocols.
Architecture
- Language & Runtime: PHP 7.4+ (8.x supported), ensuring compatibility with modern LTS distributions.
- Core Framework: The
sabre/davpackage is a set of PSR‑4 autoloaded classes that implement the WebDAV, CalDAV, and CardDAV specifications. It follows SOLID principles, with a clear separation between the protocol layer (Sabre\DAV) and backend abstractions (Sabre\DAV\Auth,Sabre\DAVACL). - Backends: The framework ships with several ready‑made backends (PDO, Doctrine DBAL, in‑memory). Developers can implement the
Sabre\DAV\Treeinterface to persist data in custom storage systems such as Redis, MongoDB, or even a graph database. - Database: No single database is required; the framework can operate with any PDO‑compatible database. The bundled SQLite backend is useful for quick prototypes, while production deployments typically use MySQL/MariaDB or PostgreSQL.
- HTTP Layer: SabreDAV is designed to run behind any PHP SAPI (Apache, Nginx via FPM, FastCGI). It expects to be mounted at a URL prefix and uses
Sabre\DAV\Request/Responseobjects to encapsulate the HTTP exchange.
Core Capabilities
- CalDAV/CardDAV Support: Full CRUD operations on calendars, events (VEVENT), tasks (VTODO), and contacts (VCARD). Supports recurring rules, alarms, and iCalendar properties.
- WebDAV Features: Properties, locking, versioning (via
Sabre\DAV\Locks), and file operations (PROPFIND, PROPPATCH, MOVE, COPY). - Authentication & Authorization: Pluggable auth backends (Basic, Digest, OAuth2) and ACL support (
Sabre\DAVACL) that maps WebDAV principals to application users. - Plugins: A modular plugin system lets developers add features such as logging, quota enforcement, or custom property handling without modifying core code.
- API Exposure: All server logic is exposed through PHP objects, enabling integration into frameworks like Laravel or Symfony. Developers can expose a subset of functionality via REST endpoints that internally delegate to SabreDAV’s API.
Deployment & Infrastructure
- Self‑Hosting: Since it is pure PHP, SabreDAV can be deployed on any LAMP/LEMP stack. It requires a writable directory for temporary files and optional storage for lock files.
- Scalability: Statelessness of the HTTP layer allows horizontal scaling behind a load balancer. Persistent data is stored in external databases, so adding read replicas or sharding is straightforward.
- Containerization: Official Docker images are available, simplifying CI/CD pipelines. The image is lightweight (based on
php:8-fpm-alpine) and can be extended with custom PHP extensions or Composer dependencies. - Performance: Benchmarks show sub‑millisecond response times for simple property queries and < 5 ms for calendar CRUD operations on a MySQL backend, making it suitable for high‑traffic intranets.
Integration & Extensibility
- Plugin System: Developers can write custom
Sabre\DAV\ServerPluginclasses to hook into request/response cycles. Common use cases include rate limiting, custom logging, or injecting X‑headers for downstream services. - Webhooks & Events: The framework emits events (
Sabre\DAV\Event) that can be listened to via a PSR‑14 event dispatcher, enabling real‑time synchronization with external services (e.g., pushing calendar updates to a mobile app). - Custom Principals: The
Sabre\DAVACLcomponent allows mapping of WebDAV principals to LDAP or OAuth users, facilitating single‑sign‑on scenarios. - Extending Storage: Implementing
Sabre\DAV\Backend\DirectoryorSabre\DAV\Backend\Calendarlets developers persist data in NoSQL stores, making the framework adaptable to diverse infrastructure.
Developer Experience
- Documentation: The official site hosts comprehensive guides, API references, and example projects. Inline PHPDoc comments aid IDE autocompletion.
- Community & Support: Active GitHub repository with frequent releases (master branch is current). Commercial support from fruux is available for enterprises.
- Testing: The codebase includes extensive PHPUnit tests and CI pipelines, ensuring stability when integrating into larger applications.
- Configuration: Most settings are controlled via PHP arrays, making it easy to embed SabreDAV in frameworks that use service containers.
Use Cases
- Enterprise Calendar/Contact Server: Replace proprietary solutions with an open‑source CalDAV/CardDAV backend that integrates with Outlook, Apple Calendar, and Android.
- Internal File Sync: Use WebDAV for
Open SourceReady to get started?
Join the community and start self-hosting SabreDAV 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
MiroTalk P2P
Peer‑to‑peer web video conferencing, no download needed.
Apache Solr
Fast, scalable search engine for full‑text and vector queries
File Browser
Self-hosted file manager for your server
Icecast 2
Open‑source streaming media server for radio and more
DOCAT
Versioned self‑hosted docs, simple and fast
TrailBase
Fast, single‑file Firebase alternative built on Rust