DAViCal on Ubuntu 24.04 on Azure User Guide
Overview
DAViCal is a free, open source server for shared calendars and contacts. It implements the CalDAV and CardDAV standards, so calendars, address books, to do lists and journal entries are stored on infrastructure you control and synchronised to any standards compliant client, including Mozilla Thunderbird, Apple Calendar and Contacts, GNOME Evolution, iOS and the DAVx5 app on Android. Administration is through a PHP web console, and the data is kept in PostgreSQL. The cloudimg image delivers DAViCal fully installed and configured on Ubuntu 24.04, so a complete groupware calendar and contacts service is running within minutes of launch, with your schedule and contact data staying private. Backed by 24/7 cloudimg support.
DAViCal is licensed under the GNU General Public License v2.0 or later (GPL-2.0-or-later). All product and company names are trademarks or registered trademarks of their respective holders. This image repackages the upstream open source release with cloudimg's provisioning and support.
What is included:
- DAViCal 1.1.12 (GPL-2.0-or-later) from the maintained Ubuntu 24.04
universepackage, withlibawl-php - Apache 2 with
libapache2-mod-php8.3, serving the web admin console and the CalDAV/CardDAV endpoint on port 80 - PostgreSQL 16 as the backing store, listening on localhost only
- A per-VM administrator password, a per-VM demo user password and fresh PostgreSQL role passwords, all generated on first boot and written to a root-only file, so no default or shared login ships in the image
- A ready to use
demouser with a sample calendar and address book, so a fresh instance shows real content apache2.serviceandpostgresql.serviceas systemd units, enabled and active- 24/7 cloudimg support

Prerequisites
An active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point; scale up for many users or large calendars. NSG inbound: allow 22/tcp from your management network and 80/tcp (HTTP) from your users and calendar clients. Add 443/tcp if you enable HTTPS.
Step 1 — Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for DAViCal by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size; under Administrator account choose SSH public key and paste your key; under Inbound port rules allow SSH (22) and HTTP (80). Then Review + create and Create.
Step 2 — Deploy from the Azure CLI
az vm create \
--resource-group <your-rg> \
--name davical \
--image <marketplace-image-urn> \
--size Standard_B2s \
--admin-username azureuser \
--generate-ssh-keys \
--public-ip-sku Standard
Open HTTP so calendar clients and the admin console are reachable:
az vm open-port --resource-group <your-rg> --name davical --port 80 --priority 900
Step 3 — Connect to your VM
ssh azureuser@<vm-public-ip>
Step 4 — Confirm the services are running
DAViCal is served by Apache with PHP, backed by PostgreSQL. Confirm both units are active and that the web endpoint answers on port 80:
sudo systemctl is-active apache2 postgresql
curl -sI http://localhost/ | head -1
Both units report active, and the HTTP request returns a 200 status line.

Step 5 — Retrieve your administrator and demo passwords
On first boot the image generates a unique administrator password, a demo user password and fresh PostgreSQL role passwords, and writes them to a root-only file. Read them with:
sudo cat /root/davical-credentials.txt
The file is mode 0600, owned by root, and contains the web admin login (admin), the demo user login, the instance URL and the database role passwords. Keep it safe.

Step 6 — Sign in to the web admin console
Browse to http://<vm-public-ip>/ and sign in as admin with the password from the credentials file. The DAViCal administration console opens, where you manage principals (users), groups, collections and access control.

Step 7 — Manage users and collections
Choose List Users to see the principals on the server. A ready to use demo user ships with the image alongside the admin account, so you can try a real calendar immediately, then create your own principals with Create Principal.

Open a principal to see and manage its collections. The demo user owns a sample Calendar (with example events) and an Addresses address book, so a fresh instance shows real content rather than an empty server.

Step 8 — Connect a CalDAV / CardDAV client
Point any standards compliant client at the DAViCal endpoint. In Thunderbird, Apple Calendar, Evolution, iOS or DAVx5 on Android, add a network calendar/address book with the server URL below and the username and password of the principal you want to sync:
CalDAV / CardDAV server URL: http://<vm-public-ip>/caldav.php/<username>/
Auto discovery (well-known): http://<vm-public-ip>/.well-known/caldav
Username: demo (or your own principal)
Password: the password from /root/davical-credentials.txt
The screenshot below shows a full CalDAV round-trip against the server from the command line: a PROPFIND on the demo calendar returns 207 Multi-Status, an event PUT returns 201 Created, the event reads back, and a request with the wrong password is refused with 401.

Step 9 — Confirm the version and the stack
dpkg-query -W -f='${Package} ${Version}\n' davical libawl-php
php -v | head -1
sudo -u postgres psql -d davical -tAc "SELECT count(*) AS collections FROM collection;"
This confirms DAViCal 1.1.12-2, PHP 8.3, and that the PostgreSQL davical database is present with its collections.
First-boot service and security model
The image ships with no usable default login. Before capture, every DAViCal login is locked and the database role passwords are set to throwaway values. On the first boot of your instance, davical-firstboot.service resolves the instance address, rotates the admin and demo passwords and the PostgreSQL role passwords to fresh per-VM values, writes them to /root/davical-credentials.txt, and then serves the console. Confirm the one-shot service completed and the file permissions:
sudo systemctl is-active davical-firstboot.service
sudo stat -c '%n %a %U:%G' /root/davical-credentials.txt
The service reports active (a one-shot unit that ran once at first boot, guarded by a sentinel so it never re-runs), and the credentials file is 600 root:root.

Enabling HTTPS with your own domain
Calendar clients send credentials with every request, so run DAViCal behind HTTPS in production. Point a DNS name at the VM, open 443/tcp in the NSG, and install a certificate with Certbot:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-apache
sudo certbot --apache -d davical.your-domain.com
Certbot configures Apache for HTTPS and sets up automatic renewal. After enabling TLS, use https://davical.your-domain.com/caldav.php/<username>/ in your clients.
Backup and maintenance
All calendar and contact data lives in the PostgreSQL davical database. Back it up with pg_dump:
sudo -u postgres pg_dump davical | gzip > davical-backup-$(date +%F).sql.gz
The OS receives automatic security updates through unattended-upgrades. Apply DAViCal and system package updates with sudo apt-get update && sudo apt-get upgrade, and restart Apache with sudo systemctl restart apache2 if PHP packages change.
Support
cloudimg provides 24/7 technical support for this DAViCal image by email (support@cloudimg.co.uk) and live chat. We help with deployment, retrieving first-boot credentials, creating users, groups and collections, connecting CalDAV and CardDAV clients, access control and sharing, HTTPS and custom domains, PostgreSQL backup and administration, upgrades and patching, and troubleshooting.