PHPackages                             texxasrulez/rounddav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. texxasrulez/rounddav

ActiveProject[API Development](/categories/api)

texxasrulez/rounddav
====================

RoundDAV - a SabreDAV-based CalDAV/CardDAV server tailored for Roundcube.

0.0.1(4mo ago)01GPL-3.0PHPPHP ^8.0

Since Dec 15Pushed 2mo agoCompare

[ Source](https://github.com/texxasrulez/rounddav)[ Packagist](https://packagist.org/packages/texxasrulez/rounddav)[ Docs](https://github.com/texxasrulez/rounddav)[ RSS](/packages/texxasrulez-rounddav/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

RoundDAV Server
===============

[](#rounddav-server)

[![Downloads](https://camo.githubusercontent.com/c3a729e3505cd8030c5013c5a5eecb3ea1759257be1f3e1bd8983894ed79824f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f726f756e646461762f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)](https://camo.githubusercontent.com/c3a729e3505cd8030c5013c5a5eecb3ea1759257be1f3e1bd8983894ed79824f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f74657878617372756c657a2f726f756e646461762f746f74616c3f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d6171756126636f6c6f723d626c7565)[![Packagist Downloads](https://camo.githubusercontent.com/735c39d3863879c5ecb5fc965a49331f37d93876ea3ca6eb0722f76eafeac283/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d446f776e6c6f616473266c6162656c436f6c6f723d626c756526636f6c6f723d676f6c64)](https://packagist.org/packages/texxasrulez/rounddav)[![Packagist Version](https://camo.githubusercontent.com/d6bfe3cb42dbe12ba42030e59b548a56d1a0b88d8b36a7c880e2fff5877bbb28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465266c6162656c3d56657273696f6e266c6162656c436f6c6f723d626c756526636f6c6f723d6c696d65677265656e)](https://packagist.org/packages/texxasrulez/rounddav)[![Github License](https://camo.githubusercontent.com/9f0c89b6cc8f20fa05b8279425848e83e48f8689d9f2f12393d9a688b3e28e87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d4c6963656e7365266c6162656c436f6c6f723d626c756526636f6c6f723d636f72616c)](https://github.com/texxasrulez/rounddav/LICENSE)[![GitHub Stars](https://camo.githubusercontent.com/cf179d9a4c09e1e543ed9c1d5d1fe8d68a159b17298d414b46c602ba8782080c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d5374617273266c6162656c436f6c6f723d626c756526636f6c6f723d64656570736b79626c7565)](https://github.com/texxasrulez/rounddav/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/0aa10d1913e3290b6e1c8ba0c579bc97d6d7d972a6a6cfc402b6739e20238820/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d676974687562266c6162656c3d497373756573266c6162656c436f6c6f723d626c756526636f6c6f723d61717561)](https://github.com/texxasrulez/rounddav/issues)[![GitHub Contributors](https://camo.githubusercontent.com/0e845ce220657c490d81cfaef52bd3ba2e67a55c2a1848f3c4ae5423af91a53c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d436f6e7472696275746f7273266c6162656c436f6c6f723d626c756526636f6c6f723d6f7263686964)](https://github.com/texxasrulez/rounddav/graphs/contributors)[![GitHub Forks](https://camo.githubusercontent.com/29c506a810d9309e794a8291280290a942fabd43c7d75779ef709ccc081e6faa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f74657878617372756c657a2f726f756e646461763f7374796c653d706c6173746963266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465266c6162656c3d466f726b73266c6162656c436f6c6f723d626c756526636f6c6f723d6461726b6f72616e6765)](https://github.com/texxasrulez/rounddav/forks)[![Donate Paypal](https://camo.githubusercontent.com/02124075ee7ea4c192ef867cb30577b0b43ba74ea42b8dbe20b56ef518d94cdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50617970616c2d4d6f6e65795f506c65617365212d626c75652e7376673f7374796c653d706c6173746963266c6162656c436f6c6f723d626c756526636f6c6f723d666f72657374677265656e266c6f676f3d70617970616c)](https://www.paypal.me/texxasrulez)

A lightweight CalDAV, CardDAV, and WebDAV storage engine designed for self-hosters who want full control without dragging in a monster stack. RoundDAV powers calendars, contacts, and file storage behind Roundcube - cleanly and predictably.

---

While this may work like any other sabre based server, this one is tailored for Roundcube specifically.

There are 3 Roundcube plugins to use with this and extend the bridge between the two.

Required for use with Roundcube:

[RoundDAV Provision Roundcube Plugin](https://github.com/texxasrulez/rounddav_provision)

Recommended Plugins:

[RoundDAV Files Roundcube Plugin](https://github.com/texxasrulez/rounddav_files)

[RoundDAV Bookmarks Roundcube Plugin](https://github.com/texxasrulez/rounddav_bookmarks)

---

Features
--------

[](#features)

- **CalDAV &amp; CardDAV**: Standards-compliant calendars and addressbooks
- **WebDAV Filesystem**: Per-user storage rooted at a filesystem path you control
- **Provisioning API**: Roundcube can create DAV users automatically
- **SSO-Ready**: Includes `/public/sso_login.php` and `/public/sso_logout.php`
- **Admin UI**: Simple administration panel for principals, calendars, addressbooks
- **Per-User Extras**: Extra calendars and addressbooks can be created on first login
- **Clean PHP**: No frameworks, minimal dependencies, easy to debug

---

Directory Layout
----------------

[](#directory-layout)

Typical layout on disk:

```
rounddav/
  config/
    config.dist.php
    config.php
  public/
    index.php
    install.php
    admin/
    files/
    api.php
    sso_login.php
    sso_logout.php
  src/
    Provision/
    Dav/
    ...

```

- `config/` – configuration files
- `public/` – web-exposed entry points (admin UI, files UI, SSO, API)
- `src/` – RoundDAV internals (provisioning, DAV backends, etc.)

---

Installation
------------

[](#installation)

1. Copy `rounddav/` to your server (outside your main vhost if you like).
2. Point a vhost or alias at `rounddav/public/`.

Example Nginx snippet:

```
location /rounddav/ {
    alias /var/www/rounddav/public/;
    index index.php;
}
```

3. Run the installer in your browser:

```
https://your.server/rounddav/public/install.php

```

4. Fill in:

    - Database DSN / user / password
    - Files root path (for WebDAV file storage)
    - Admin username + password
5. Submit. The installer writes `config/config.php` and initializes the database.
6. Run composer update in root to install dependencies.

---

Configuration Overview
----------------------

[](#configuration-overview)

`config/config.php` is generated from `config.dist.php` and contains (at least):

```
return [
    'database' => [
        'dsn'      => 'mysql:host=localhost;dbname=rounddav',
        'user'     => 'rounddav',
        'password' => 'secret',
        'options'  => [],
    ],

    'files' => [
        'root'       => '/srv/rounddav/files',
        'public_url' => 'https://your.server/rounddav/public/files/',
    ],

    'admin' => [
        'username'      => 'admin',
        'email'         => 'admin@example.com',
        'password_hash' => '$2y$10$...',
    ],

    'provision' => [
        'shared_secret'    => 'change_me_provision',
        'principal_prefix' => 'principals',
    ],

    'sso' => [
        'enabled' => true,
        'secret'  => 'change_me_sso',
        'ttl'     => 600,
    ],
];
```

Key points:

- `files.root` – base directory for per-user WebDAV storage.
- `files.public_url` – where the browser reaches the Files UI.
- `admin.email` (or `admin.username`) – use this to identify the admin user in templates.
- `provision.shared_secret` – for API calls if you ever protect them further.
- `sso.secret` – must match `rounddav_sso_secret` in the Roundcube `rounddav_provision` plugin.
- `security.headers` – optional response headers. Leave `x_frame_options` empty (default) if Files UI must be embedded by Roundcube on a different origin.

---

Provisioning API
----------------

[](#provisioning-api)

RoundDAV exposes a simple HTTP API for provisioning users:

```
POST /rounddav/public/api.php?r=provision/user
Content-Type: application/json

```

Example payload (this is what the Roundcube plugin sends):

```
{
  "username": "user@example.com",
  "password": "plaintext-or-derived",
  "extra_calendars": [
    {
      "uri": "todo",
      "displayname": "Tasks",
      "mode": "tasks",
      "shared": false
    }
  ],
  "extra_addressbooks": [
    {
      "uri": "work",
      "displayname": "Work Contacts",
      "shared": false
    }
  ]
}
```

The server will:

- Ensure the principal and credentials exist
- Ensure the default calendar + addressbook exist
- Ensure any additional calendars/addressbooks defined in the request exist

The endpoint replies with JSON, e.g.:

```
{
  "status": "ok",
  "message": "Provisioning OK for user@example.com",
  "principal_uri": "principals/user@example.com",
  "principal_id": 6
}
```

---

SSO Endpoints
-------------

[](#sso-endpoints)

These are used by Roundcube (`rounddav_provision` + `rounddav_files`) to log users into the web UI without a second login.

### Login

[](#login)

```
GET /rounddav/public/sso_login.php?user=&ts=&sig=

```

- `user` – principal identifier (usually the email / Roundcube username)
- `ts` – Unix timestamp when the token was issued
- `sig` – `hash_hmac('sha256', "$user|$ts", $config['sso']['secret'])`

If valid:

- Sets `$_SESSION['rounddav_files_user'] = $user`
- Redirects the browser to `files.public_url` or `./files/`

### Logout

[](#logout)

```
GET /rounddav/public/sso_logout.php?user=&ts=&sig=

```

- Signature is based on `"$user|$ts|logout"`

If valid:

- Destroys the PHP session
- Leaves no visible output

Roundcube’s logout hook fires a tiny `new Image().src = ".../sso_logout.php?...";` call to trigger this.

---

Admin UI
--------

[](#admin-ui)

Accessible under:

```
https://your.server/rounddav/public/admin/

```

You can:

- View and manage principals
- Create/delete calendars and addressbooks for each principal
- Edit calendar/addressbook properties (URI, displayname, flags)
- Toggle options like “tasks only” vs “events only” vs both

The Admin UI is intentionally minimal, built for admins who already know what DAV is.

[Admin README.md](README_rounddav_admin.md)

---

Config Backup, Restore, and Embed-Safe Security Settings
--------------------------------------------------------

[](#config-backup-restore-and-embed-safe-security-settings)

The Admin UI (`/public/admin/?action=config`) now includes config snapshot and backup tools for `config/config.php`.

### Backup and restore workflow

[](#backup-and-restore-workflow)

In **Config Snapshot**:

- **Create backup now** writes a timestamped `config-YYYYmmdd-HHMMSS-xxxxxxxx.php` file under `var/config_backups/`
- **Download** exports a single backup file
- **Restore** replaces the live `config.php` with the selected backup
- **Download all as ZIP** streams all backups as one archive for off-host storage

RoundDAV also creates a backup automatically before config writes/imports/restores.

### Retention policy

[](#retention-policy)

Retention is configurable in the same card:

- **Keep newest backups** (`backups.config.keep_last`)
- **Delete backups older than days** (`backups.config.max_age_days`, `0` disables age pruning)
- **Auto-prune after config writes/restores/backups** (`backups.config.auto_prune`)

Defaults in `config/config.dist.php`:

```
'backups' => [
    'config' => [
        'keep_last' => 30,
        'max_age_days' => 0,
        'auto_prune' => true,
    ],
],
```

### Recommended settings for Roundcube iframe embedding

[](#recommended-settings-for-roundcube-iframe-embedding)

If `rounddav_files` is shown inside Roundcube via iframe (especially cross-origin):

- Keep `security.headers.enabled = true`
- Keep `security.headers.x_content_type_options = true`
- Keep `security.headers.referrer_policy = strict-origin-when-cross-origin`
- Keep `security.headers.x_frame_options = ''` (empty; do not set `SAMEORIGIN`/`DENY` for cross-origin embeds)
- If CSP is enabled, ensure `frame-ancestors` includes your Roundcube origin (for example `https://mail.example.com`)

Use **Verify Current Headers** in the Security diagnostics panel to confirm live responses from Admin/Files endpoints match expected values.

---

Files UI
--------

[](#files-ui)

Accessible under:

```
https://your.server/rounddav/public/files/

```

This is the generic Files interface that `rounddav_files` embeds in an iframe inside Roundcube. It:

- Shows per-user directories under your configured `files.root`
- Allows uploads, downloads, deletions (depending on your implementation)
- Is styled to roughly match Roundcube skins when embedded

---

Philosophy
----------

[](#philosophy)

RoundDAV is meant to be:

- Small enough to understand
- Strong enough to be useful
- Quiet enough to disappear behind Roundcube

If you know Roundcube and a bit of PHP, you should be able to debug or extend this without fighting it.

Enjoy!

💰 **Donations** 💰

If you use this plugin and would like to show your appreciation by buying me a cup of coffee, I surely would appreciate it. A regular cup of Joe is sufficient, but a Starbucks Coffee would be better ...
Zelle (Zelle is integrated within many major banks Mobile Apps by default) - Just send to texxasrulez at yahoo dot com
No Zelle in your banks mobile app, no problem, just click [Paypal](https://paypal.me/texxasrulez?locale.x=en_US) and I can make a Starbucks run ...

I appreciate the interest in this plugin and hope all the best ...

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance81

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95c3af6e41a9786e8be2edb48176e43a7d1ddef429793a312168450ff4269deb?d=identicon)[texxasrulez](/maintainers/texxasrulez)

---

Top Contributors

[![texxasrulez](https://avatars.githubusercontent.com/u/10519182?v=4)](https://github.com/texxasrulez "texxasrulez (11 commits)")

### Embed Badge

![Health badge](/badges/texxasrulez-rounddav/health.svg)

```
[![Health](https://phpackages.com/badges/texxasrulez-rounddav/health.svg)](https://phpackages.com/packages/texxasrulez-rounddav)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M49](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
