Deploying Xandikos
Introduction
Xandikos is a lightweight yet standards-compliant CalDAV and CardDAV server written in Python. It stores calendar events and contacts in Git repositories, providing automatic version history for all your data. Xandikos aims for full compliance with CalDAV and CardDAV specifications while remaining simple to deploy.
Key highlights of Xandikos:
- Standards Compliant: Full CalDAV and CardDAV protocol support
- Git Storage: All data stored in Git for automatic versioning
- Lightweight: Minimal resource requirements
- No Database: File-based storage eliminates database dependencies
- Multi-User: Support for multiple users and calendars
- Event Scheduling: Full support for iTIP scheduling
- Contact Sync: CardDAV support for contact synchronization
- Python-Based: Easy to extend and customize
This guide walks through deploying Xandikos on Klutch.sh using Docker.
Why Deploy Xandikos on Klutch.sh
Deploying Xandikos on Klutch.sh provides several advantages:
Privacy: Keep your calendars and contacts on your own server.
Cross-Device Sync: Sync with any CalDAV/CardDAV compatible application.
HTTPS by Default: Secure sync with automatic SSL certificates.
Version History: Git storage provides automatic backup and change tracking.
Prerequisites
Before deploying Xandikos on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
Deploying Xandikos on Klutch.sh
- CalDAV URL:
https://your-app.klutch.sh/ - CardDAV URL:
https://your-app.klutch.sh/
Create Your Repository
Create a new GitHub repository with a Dockerfile:
FROM python:3.11-slim
# Install dependenciesRUN apt-get update && apt-get install -y git \ && pip install xandikos \ && apt-get clean
# Create data directoryRUN mkdir -p /data && git config --global user.email "xandikos@localhost" \ && git config --global user.name "Xandikos"
WORKDIR /data
ENV XANDIKOS_PORT=8080ENV XANDIKOS_DIRECTORY=/data
EXPOSE 8080
CMD ["python", "-m", "xandikos.web", "--port", "8080", "--listen-address", "0.0.0.0", "-d", "/data", "--defaults"]Push to GitHub
Push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
Set the traffic type to HTTP with port 8080.
Attach Persistent Volume
Add a persistent volume mounted at /data to store your calendars and contacts.
Deploy Your Application
Click Deploy to build and launch Xandikos.
Configure Your Clients
Add your Xandikos server to your calendar and contact applications using:
Additional Resources
Conclusion
Xandikos on Klutch.sh provides a standards-compliant CalDAV and CardDAV server that keeps your calendars and contacts private. The Git-based storage ensures you always have version history of your data, while the lightweight architecture makes it easy to deploy and maintain.