Deployment guide

DAViCal

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 stay on infrastructure you control. They synchronise to any standards-compliant client, including Mozilla Thunderbird, Apple Calendar and Contacts, GNOME Evolution, iOS and the DAVx5 app on Android.

The SecureAnyCloud image delivers DAViCal fully installed and configured on Ubuntu 24.04. A complete calendar and contacts service is running within minutes of launch, and your schedule and contact data stays private. Administration is through a PHP web console, and the data is kept in PostgreSQL.

What you get:

  • DAViCal 1.1.12 (GPL-2.0-or-later) from the maintained Ubuntu 24.04 universe package, with libawl-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 are 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 demo user with a sample calendar and address book, so a fresh instance shows real content
  • apache2.service and postgresql.service as systemd units, enabled and active
  • 24/7 SecureAnyCloud 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 SecureAnyCloud's provisioning and support.

Prerequisites

  • An active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region
  • A VM size of Standard_B2s (2 vCPU / 4 GiB RAM) as a good starting point. Scale up for many users or large calendars
  • Network security group inbound rules that 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 SecureAnyCloud 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 select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:davical-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name davical \
  --image sac1647283583153:davical-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open HTTP so that 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

Apache with PHP serves DAViCal, and PostgreSQL backs it. Confirm that 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. It writes them to a root-only file. Read them with:

sudo cat /root/davical-credentials.txt

The file is mode 0600 and owned by root. It contains the web admin login (admin), the demo user login, the instance URL and the database role passwords. Store these credentials securely.

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. Use it to 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. 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 or address book. Use 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, and 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;"

The output confirms DAViCal 1.1.12-2 and PHP 8.3. It also confirms 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 and rotates the admin and demo passwords and the PostgreSQL role passwords to fresh per-VM values. It writes them to /root/davical-credentials.txt and then serves the console. Confirm that the one-shot service completed and check 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. It is a one-shot unit that ran once at first boot and is guarded by a sentinel, so it never re-runs. 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 network security group 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 you enable 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. If PHP packages change, restart Apache with sudo systemctl restart apache2.

Support

SecureAnyCloud provides 24/7 technical support for this DAViCal image by email (sales@secureanycloud.com) and live chat. Support covers deployment, retrieving first-boot credentials, creating users, groups and collections, and connecting CalDAV and CardDAV clients. It also covers access control and sharing, HTTPS and custom domains, PostgreSQL backup and administration, upgrades and patching, and troubleshooting.

Deploy on Azure

Launch DAViCal 1.1 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure