Job caldav-le-monitoring


Skip to build

Live test server

A test caldav server is setup at, which is a unikernel pushing to our calendar git repository. Please try using "mirage" as user and password either on our test server which serves as well a CalDavZAP user interface or configure our test server in your calendar client ( You can choose any not-yet-used username and password, an account will be created by caldav (using the "trust on first use" argument described below).

Compilation of CalDAV server unikernel

To begin the installation, you need to ssh into your server. Then, you need to install opam via your package manager (e.g. apt install opam). Make sure you have OCaml version >=4.10.0, and opam version >=2.0.0 and mirage version >=3.7.1 installed via your package manager. You can use ocaml --version, opam --version, and mirage --version to find out.

In addition, you currently need our opam repository overlay because we need some libraries that are not yet released for git-via-ssh and monitoring. It is recommended to use a custom opam switch:

opam switch create caldav 4.11.1
eval `opam env`
opam repo add git-ssh-dns git+
opam install lwt mirage

Now we're ready to compile the CalDAV server. Let's get the code:

git clone -b future-robur
cd caldav/mirage
mirage configure // -t xen / -t hvt works as well
make depend

The make command creates a caldav executable in caldav/mirage. This is the unikernel. If you compiled for unix (the default unless you specify -t xen/hvt/.., this is an executable you can run directly: We can see all its options:

./caldav --help

For other targets you have to create a virtual machine, e.g. solo5-hvt:

sudo solo5-hvt --net:service=tap100 -- caldav.hvt

CalDavZAP integration

CalDavZap is an externally developed web-UI for caldav servers. Embedding into this unikernel provides the web interface at

A minified and configured version can be obtained from here, which is based on the zip file and patch below.

Download (3936373 bytes, SHA256 1fb67a4f85c699bfd73f282407d60852f6649a34a923770ae2a378b4f2794dde) and unpack into mirage/caldavzap directory.

Edit mirage/caldavzap/config.js

diff -ur caldavzap/config.js mirage/caldavzap/config.js
--- a/config.js 2015-09-22 15:29:59.000000000 +0200
+++ b/config.js  2019-11-10 00:46:12.653501000 +0100
@@ -335,12 +335,11 @@
        href: location.protocol+'//'+location.hostname+
                (location.port ? ':'+location.port: '')+
-                location.pathname.replace(RegExp('/+[^/]+/*(index\.html)?$'),'')+
-               '/caldav.php/',
+               '/principals/',
        timeOut: 90000,
        lockTimeOut: 10000,
        checkContentType: true,
        settingsAccount: true,
-       delegation: true,
+       delegation: false,
        additionalResources: [],
        hrefLabel: null,
        forceReadOnly: null,

Running the unikernel

The following steps vary based on your desired server features.

HTTPS preparations

If you're planning to use https you need to create a certificate:

opam install certify
certify selfsign -c server.pem -k server.key ""
mv server.pem server.key caldav/mirage/tls/
cd caldav/mirage ; make

You can also copy an existing certificate and private key to that location.

First start

To start the server, we need a git remote (possibly with credentials) and an admin password, which will be used for the user root that always exists. The password needs to be set on first run only. It will then be hashed, salted and stored in the git repository. The git repository persists on disk when the unikernel is not running. It's the part with your precious user data that you might want to back up.

You have to set up a git repository and provide access to that, either using git_daemon and --enable=receive-pack (then everybody can push :/), or via https, or ssh with an RSA key. You can run awa_gen_key to get a seed (to be passed to the unikernel) and a public key (which you need to enable access to the git repository).

The arguments for the command line vary depending on the setup:

With HTTP server and git via TCP

--admin-password="somecoolpassword" --host="" --http=80 --remote=git://

With HTTPS server and git via https

--admin-password="somecoolpassword" --host="" --http=80 --https=443 --remote=

With HTTPS + trust on first use (tofu) and git via ssh:

--admin-password="somecoolpassword" --host="" --http=80 --https=443 --tofu --remote=ssh:// --seed=abcdef --authenticator=SHA256:b64-encoded-hash-of-server-key

Server administration

Create user

If you don't use trust on first use, you might want to create a new user:

curl -v -u root:somecoolpassword -X PUT ""

Update password

If someone forgot their password, root can set a new one:

curl -v -u root:somecoolpassword -X PUT ""

Delete user

If someone wants to leave, root can delete their account:

curl -v -u root:somecoolpassword -X DELETE ""

Create group

You might want to create a new group. Members is an optional query parameter.

curl -v -u root:somecoolpassword -X PUT ",viktor,carsten,else"

Update group members

You might want to update the members of a group. The members parameter will overwrite the existing group members. Be careful not to lose your groups.

curl -v -u root:somecoolpassword -X PUT ",viktor,carsten,else"

You might want to add a member to a group.

curl -v -u root:somecoolpassword -X PUT ""

You might want to remove a member from a group.

curl -v -u root:somecoolpassword -X DELETE ""

Delete group

You might want to delete a group. Root can do this.

curl -v -u root:somecoolpassword -X DELETE ""

Make calendar public

Make the private calendar TESTCALENDAR publicly readable for everybody, while keeping all privileges for the OWNER.

curl -v -u root:somecoolpassword -X PROPPATCH -d '<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:">
</D:propertyupdate>' ""

Make calendar private

Make the calendar TESTCALENDAR private, only accessible for the OWNER.

curl -v -u root:somecoolpassword -X PROPPATCH -d '<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:">
</D:propertyupdate>' ""

Vendored ocaml-webmachine

This project contains a vendored ocaml-webmachine (developed by Spiros Eliopoulos), using the webdav branch of in the ocaml-webmachine subdirectory (at commit fecaf3dfb9ce10821e86ca07e8bfe09afb1f73d0). The reason is because this version of webmachine has support for PROPFIND, PROPPATCH, REPORT HTTP verbs, as required by wedav. This is installed as caldav.webmachine sublibrary.

Build 2021-07-27 21:34:49Z

Back to readme

Built on platform freebsd-12

Build took 23min52s.

Execution result: exited 0.

Build info

Build artifacts

SHA256:55c4a1da8877651c00ec111ed4d7f717aa234365e87a35ceeef3d519697e0b3c (15.1MB)
SHA256:c9ecb50f870936db46e9187508e5a56b86745a498a95d8bc3f2ef80d7bb25ae7 (299B)
SHA256:fa9069d12550f9d0dc88b1a604923b589adec09791749981d289dd7eeb245d45 (20.9MB)
SHA256:ff7a859a7dc142e100146de85fb366e328aed535988cf3c8436137591897d906 (305kB)
SHA256:43af95390ee998bc2b1559e793287b65e924635fa268ce1ee3fbdc13ecff9696 (254B)

Reproduced by 1 builds

Comparisons with other builds on the same platform