
Hello everyone!

Welcome to another self-host article! This month we’re hosting a CalDAV and CardDAV server.Baïkal, the lightweight CalDAV+CardDAV server.
We’re going to host it in a Podman container on a Fedora server.
Why Baïkal

Denis Nuțiu (@nuculabs@mastodon.social)
Attached: 2 images Hosted my own CalDAV and CardDAV server with Sabre-Dav on fedora server. Added an ansible playbook for it. https://forge.nuculabs.dev/dnutiu/ansible-playbooks/src/branch/master/sabre-dav #selfhost #fedora #podman #docker

Baïkal has multi-user support and allows you to create users from the administration interface andeach user has his own Calendars and Contacts address books.
It can be configured with a SQLite database or PostgrsSQL.
It also has a nice admin interface that allows you to add and remove users.

How-To Self Host
I’m using Podman and Fedora Server running on my oldPC as the host. The easiest way for me to automate the self hosting process is to write anAnsible playbook.You will need ansible installed. On Fedora:
Code:
sudo dnf install ansible
Then the typical dependencies:
Code:
ansible-galaxy collection install community.general
ansible-galaxy collection install containers.podman
ansible-galaxy collection install ansible.posix
If you’re not on Fedora you can install Ansible by browsingthe instructions.
Once you have all the dependencies installed you can clone the following playbook and editthe variables in variables.yaml.
The playbook can be downloadedfrom my Forge.
YAML:
setup_firewall: true # exposes the firewall ports
baikal:
container_image: "docker.io/ckulka/baikal:nginx"
port: 8069 # The port of the server
base_directory: "/baikal" # the base directory /baikal
data_directory: "data" # the data directory /baikal/data
config_directory: "config" # the config directory /baikal/config
mail: |
defaults\n\
auth on\n\
tls on\n\
tls_trust_file /etc/ssl/certs/ca-certificates.crt\n\
account default\n\
host host\n\
port 587\n\
from baikal@example.com\n\
user user\n\
password pass\n\
Once you’ve downloaded the playbook and edited the variables. You will need to configureyour webserver by editing inventory.ini.
Ansible will connect via SSH to example.com and using the user nuculabs which has sudo access.
Code:
[nuculabs]
example.com ansible_user=nuculabs
[local]
localhost
Once the inventory is configured you can run the playbook by running:
Code:
ansible-playbook -i inventory.ini playbook.yaml --ask-become-pass
When the playbook finishes, you should have a running Baïkal instance. You can then finishthe installation by visiting example.com:8069 (the configured port).
I personally don’t expose the fedora server over the internet. I use a reverse proxy in front on itfor services tha are being exposed. Baikal is not exposed in this instance, only accessible by VPN.
That’s about it!
Thank you for reading!