How to setup Radicale (with Docker & Caddy)
Ready to use
Description
Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts) server, that:
- Shares calendars and contact lists through CalDAV, CardDAV and HTTP
- Supports events, todos, journal entries and business cards
- Works out-of-the-box, no complicated setup or configuration required
- Can limit access by authentication
- Can secure connections with TLS
- Works with many CalDAV and CardDAV clients
- Stores all data on the file system in a simple folder structure
- Can be extended with plugins
- Is GPLv3-licensed free software
Create a DNS record
Go to cPanel and add a new record (e.g. calendar.akdscloud.eu).
Caddy
calendar.akdscloud.eu:443 {
header Strict-Transport-Security max-age=31536000;
reverse_proxy localhost:5232
}
Files and folders
Create the folder structure
The configuration file
Inconfig write:
[server]
hosts = 0.0.0.0:5232
[auth]
type = htpasswd
htpasswd_filename = /config/users
htpasswd_encryption = bcrypt
[storage]
filesystem_folder = /data/collections
Creating users
To create a user (that you will use to log in after the service starts), do this:
cd ~/services/radicale/config
apt install apache2-utils # if not already installed
openssl rand -hex 20 # generates a strong password
htpasswd -c -B users dan # when prompted, use the strong password you just generated
Docker
-
Add the
radicalesection to yourdocker-compose.ymlfile:radicale: image: tomsquest/docker-radicale container_name: radicale ports: - 5232:5232 init: true read_only: true security_opt: - no-new-privileges:true cap_drop: - ALL cap_add: - SETUID - SETGID - CHOWN - KILL deploy: resources: limits: memory: 256M healthcheck: test: curl -f http://127.0.0.1:5232 || exit 1 interval: 30s retries: 3 restart: unless-stopped volumes: - ./radicale/config:/config - ./radicale/data:/data depends_on: - caddy -
Download and start
radicale: -
Restart Caddy to get an SSL certificate (details here)
Try it out
See if you can access the radicale web interface.
Troubleshooting
If it doesn't work, see the troubleshooting guide.
How to use
Add a new calendar
From the web interface, press the Green Plus button on the bottom-right corner.
Add the details of your new calendar.
Add a calendar to DAVx5
- Open DAVx5 on your Android Phone.
- Click on the
Plusbutton - Login with URL and user name
- https://calendar.akdscloud.eu/ + credentials