2021-12-14 00:25:31 +01:00
# Documentation
## Getting started
#### About Radicale
2020-02-27 02:53:22 +01:00
2020-05-22 21:45:01 +02:00
Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV
2020-02-27 02:53:22 +01:00
(contacts) server, that:
2021-12-14 00:25:31 +01:00
* 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.
2025-09-09 22:21:32 +02:00
* Offers flexible authentication options.
* Can limit access by authorization.
2021-12-14 00:25:31 +01:00
* Can secure connections with TLS.
* Works with many
2021-12-14 22:28:33 +01:00
[CalDAV and CardDAV clients ](#supported-clients ).
2021-12-14 00:25:31 +01:00
* Stores all data on the file system in a simple folder structure.
* Can be extended with plugins.
* Is GPLv3-licensed free software.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Installation
2020-02-27 02:53:22 +01:00
2025-03-22 18:24:05 +01:00
Check
2020-02-27 02:53:22 +01:00
2025-03-22 07:10:16 +01:00
* [Tutorials ](#tutorials )
* [Documentation ](#documentation-1 )
* [Wiki on GitHub ](https://github.com/Kozea/Radicale/wiki )
2025-09-09 22:21:32 +02:00
* [Discussions on GitHub ](https://github.com/Kozea/Radicale/discussions )
2025-03-22 18:24:05 +01:00
* [Open and already Closed Issues on GitHub ](https://github.com/Kozea/Radicale/issues?q=is%3Aissue )
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### What's New?
2020-02-27 02:53:22 +01:00
2025-03-22 07:10:16 +01:00
Read the [Changelog on GitHub ](https://github.com/Kozea/Radicale/blob/master/CHANGELOG.md ).
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
## Tutorials
### Simple 5-minute setup
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
You want to try Radicale but only have 5 minutes free in your calendar?
Let's go right now and play a bit with Radicale!
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
The server, configured with settings from this section, only binds to localhost
(i.e. it is not reachable over the network), and you can log in with any username and password.
When everything works, you may get a local [client ](#supported-clients )
and start creating calendars and address books.
If Radicale fits your needs, it may be time for some [basic configuration ](#basic-configuration )
to support remote clients and desired authentication type.
2020-02-27 02:53:22 +01:00
Follow one of the chapters below depending on your operating system.
2021-12-14 00:25:31 +01:00
#### Linux / \*BSD
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Hint: instead of downloading from PyPI, look for packages provided by your [distribution ](#linux-distribution-packages ).
They contain also startup scripts integrated into your distributions, that allow Radicale to run daemonized.
2025-01-03 00:41:26 +01:00
First, make sure that **python** 3.9 or later and **pip** are installed. On most distributions it should be
2020-02-27 02:53:22 +01:00
enough to install the package ``python3-pip` `.
2025-03-22 07:10:16 +01:00
##### as normal user
Recommended only for testing - open a console and type:
2020-02-27 02:53:22 +01:00
```bash
2025-01-26 12:10:37 +01:00
# Run the following command to only install for the current user
python3 -m pip install --user --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
2025-03-22 07:10:16 +01:00
```
2025-09-09 22:21:32 +02:00
If _install_ is not working and instead `error: externally-managed-environment` is displayed,
create and activate a virtual environment in advance.
2025-03-22 07:10:16 +01:00
```bash
python3 -m venv ~/venv
2025-03-22 18:24:15 +01:00
source ~/venv/bin/activate
2025-03-22 07:10:16 +01:00
```
and try to install with
```bash
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
```
Start the service manually, data is stored only for the current user
```bash
# Start, data is stored for the current user only
2025-04-13 11:10:18 +02:00
python3 -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections --auth-type none
2025-01-26 12:10:37 +01:00
```
2025-03-22 07:10:16 +01:00
##### as system user (or as root)
2025-09-09 22:21:32 +02:00
Alternatively, you can install and run as system user or as root (not recommended):
2025-01-26 12:10:37 +01:00
```bash
2025-09-09 22:21:32 +02:00
# Run the following command as root (not recommended) or non-root system user
# (the later may require --user in case dependencies are not available system-wide and/or virtual environment)
2025-01-26 12:10:37 +01:00
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
2025-03-22 07:10:16 +01:00
```
2025-09-09 22:21:32 +02:00
Start the service manually, with data stored in a system folder under `/var/lib/radicale/collections` :
2025-03-22 07:10:16 +01:00
```bash
# Start, data is stored in a system folder (requires write permissions to /var/lib/radicale/collections)
2025-03-22 07:14:24 +01:00
python3 -m radicale --storage-filesystem-folder=/var/lib/radicale/collections --auth-type none
2020-02-27 02:53:22 +01:00
```
2021-12-14 00:25:31 +01:00
#### Windows
2020-02-27 02:53:22 +01:00
The first step is to install Python. Go to
[python.org ](https://python.org ) and download the latest version of Python 3.
Then run the installer.
On the first window of the installer, check the "Add Python to PATH" box and
click on "Install now". Wait a couple of minutes, it's done!
Launch a command prompt and type:
```powershell
2021-12-20 21:33:23 +01:00
python -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
2025-03-22 07:14:24 +01:00
python -m radicale --storage-filesystem-folder=~/radicale/collections --auth-type none
2020-02-27 02:53:22 +01:00
```
2025-05-09 18:08:22 +02:00
##### Common
2025-09-09 22:21:32 +02:00
Success!!! Open < http: / / localhost:5232 > in your browser!
2025-07-26 11:21:17 +02:00
You can log in with any username and password as no authentication is required by example option `--auth-type none` .
2025-09-09 22:21:32 +02:00
This is **INSECURE** , see [Configuration/Authentication ](#auth ) for more details.
2020-02-27 02:53:22 +01:00
2025-05-09 18:08:22 +02:00
Just note that default configuration for security reason binds the server to `localhost` (IPv4: `127.0.0.1` , IPv6: `::1` ).
2025-09-09 22:21:32 +02:00
See [Addresses ](#addresses ) and [Configuration/Server ](#server ) for more details.
2025-05-09 18:08:22 +02:00
2021-12-14 00:25:31 +01:00
### Basic Configuration
2020-02-27 02:53:22 +01:00
2020-04-18 13:23:50 +02:00
Installation instructions can be found in the
2021-12-14 22:28:33 +01:00
[simple 5-minute setup ](#simple-5-minute-setup ) tutorial.
2020-02-27 02:53:22 +01:00
2020-04-11 16:14:41 +02:00
Radicale tries to load configuration files from `/etc/radicale/config` and
`~/.config/radicale/config` .
Custom paths can be specified with the `--config /path/to/config` command
line argument or the `RADICALE_CONFIG` environment variable.
Multiple configuration files can be separated by `:` (resp. `;` on Windows).
Paths that start with `?` are optional.
2020-02-27 02:53:22 +01:00
You should create a new configuration file at the desired location.
(If the use of a configuration file is inconvenient, all options can be
passed via command line arguments.)
2020-04-18 13:23:50 +02:00
All configuration options are described in detail in the
2021-12-14 22:28:33 +01:00
[Configuration ](#configuration ) section.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Authentication
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
In its default configuration since version 3.5.0, Radicale rejects all
authentication attempts by using config option `type = denyall` (introduced
with 3.2.2) as default until explicitly configured.
2025-07-26 11:21:17 +02:00
2025-09-09 22:21:32 +02:00
Versions before 3.5.0 did not check usernames or passwords at all, unless explicitly configured.
If such a server is reachable over a network, you should change this as soon as possible.
2020-02-27 02:53:22 +01:00
2022-01-07 23:54:34 +01:00
First a `users` file with all usernames and passwords must be created.
2020-02-27 02:53:22 +01:00
It can be stored in the same directory as the configuration file.
2021-12-14 00:25:31 +01:00
##### The secure way
2020-02-27 02:53:22 +01:00
The `users` file can be created and managed with
[htpasswd ](https://httpd.apache.org/docs/current/programs/htpasswd.html ):
2020-04-18 13:23:50 +02:00
2025-09-09 22:21:32 +02:00
Note: some OSes or distributions contain outdated versions of `htpasswd` (< 2.4.59 ) without
support for SHA-256 or SHA-512 (e.g. Ubuntu LTS 22).
In these cases use `htpasswd` 's command line option `-B` for the `bcrypt` hash method (recommended),
or stay with the insecure (not recommended) MD5 (default) or SHA-1 (command line option `-s` ).
2025-03-13 06:43:27 +01:00
2025-09-09 22:21:32 +02:00
Note: support of SHA-256 and SHA-512 was introduced with 3.1.9
2025-03-15 14:33:55 +01:00
2020-02-27 02:53:22 +01:00
```bash
2024-09-01 17:19:53 +02:00
# Create a new htpasswd file with the user "user1" using SHA-512 as hash method
$ htpasswd -5 -c /path/to/users user1
2020-02-27 02:53:22 +01:00
New password:
Re-type new password:
# Add another user
2024-09-01 17:19:53 +02:00
$ htpasswd -5 /path/to/users user2
2020-02-27 02:53:22 +01:00
New password:
Re-type new password:
```
Authentication can be enabled with the following configuration:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
[auth]
type = htpasswd
htpasswd_filename = /path/to/users
2024-09-01 17:19:53 +02:00
htpasswd_encryption = autodetect
2020-02-27 02:53:22 +01:00
```
2021-12-14 00:25:31 +01:00
##### The simple but insecure way
2020-02-27 02:53:22 +01:00
2022-01-07 23:54:34 +01:00
Create the `users` file by hand with lines containing the username and
2020-02-27 02:53:22 +01:00
password separated by `:` . Example:
```htpasswd
user1:password1
user2:password2
```
Authentication can be enabled with the following configuration:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
[auth]
type = htpasswd
htpasswd_filename = /path/to/users
# encryption method used in the htpasswd file
htpasswd_encryption = plain
```
2021-12-14 00:25:31 +01:00
#### Addresses
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
The default configuration binds the server to localhost. It cannot be reached
2020-02-27 02:53:22 +01:00
from other computers. This can be changed with the following configuration
2020-04-11 16:14:41 +02:00
options (IPv4 and IPv6):
2020-02-27 02:53:22 +01:00
```ini
[server]
2020-04-11 16:14:41 +02:00
hosts = 0.0.0.0:5232, [::]:5232
2020-02-27 02:53:22 +01:00
```
2021-12-14 00:25:31 +01:00
#### Storage
2020-02-27 02:53:22 +01:00
Data is stored in the folder `/var/lib/radicale/collections` . The path can
be changed with the following configuration:
```ini
[storage]
filesystem_folder = /path/to/storage
```
2025-09-09 22:21:32 +02:00
> **Security:** The storage folder shall not be readable by unauthorized users.
2020-04-18 16:57:10 +02:00
> Otherwise, they can read the calendar data and lock the storage.
> You can find OS dependent instructions in the
2021-12-14 22:28:33 +01:00
> [Running as a service](#running-as-a-service) section.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Limits
2020-02-27 02:53:22 +01:00
Radicale enforces limits on the maximum number of parallel connections,
the maximum file size (important for contacts with big photos) and the rate of
incorrect authentication attempts. Connections are terminated after a timeout.
The default values should be fine for most scenarios.
```ini
[server]
max_connections = 20
# 100 Megabyte
max_content_length = 100000000
# 30 seconds
timeout = 30
[auth]
# Average delay after failed login attempts in seconds
delay = 1
```
2021-12-14 00:25:31 +01:00
### Running as a service
2020-02-27 02:53:22 +01:00
The method to run Radicale as a service depends on your host operating system.
Follow one of the chapters below depending on your operating system and
requirements.
2021-12-14 00:25:31 +01:00
#### Linux with systemd system-wide
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Recommendation: check support by [Linux Distribution Packages ](#linux-distribution-packages )
instead of manual setup / initial configuration.
Create the **radicale** user and group for the Radicale service by running (as `root` :
```bash
useradd --system --user-group --home-dir / --shell /sbin/nologin radicale
```
2024-06-06 06:05:56 +02:00
2025-09-09 22:21:32 +02:00
The storage folder must be writable by the **radicale** user by running (as `root` ):
```bash
mkdir -p /var/lib/radicale/collections & & chown -R radicale:radicale /var/lib/radicale/collections
```
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
If a dedicated cache folder is configured (see option [filesystem_cache_folder ](#filesystem_cache_folder )),
it also must be also writable by **radicale** . To achieva that, run (as `root` ):
```bash
mkdir -p /var/cache/radicale & & chown -R radicale:radicale /var/cache/radicale
````
2025-05-25 08:46:13 +02:00
2025-09-09 22:21:32 +02:00
> **Security:** The storage shall not be readable by others.
> To make sure this is the case, run (as `root`):
> ```bash
> chmod -R o= /var/lib/radicale/collections
> ```
2020-02-27 02:53:22 +01:00
Create the file `/etc/systemd/system/radicale.service` :
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target
[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
User=radicale
# Deny other users access to the calendar data
UMask=0027
# Optional security settings
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
NoNewPrivileges=true
2025-05-25 08:46:13 +02:00
ReadWritePaths=/var/lib/radicale/
2025-09-09 22:21:32 +02:00
# Replace with following in case dedicated cache folder should be used
2025-05-25 08:46:13 +02:00
#ReadWritePaths=/var/lib/radicale/ /var/cache/radicale/
2020-02-27 02:53:22 +01:00
[Install]
WantedBy=multi-user.target
```
2021-12-14 00:25:31 +01:00
2025-09-09 22:21:32 +02:00
In this system-wide implementation, Radicale will load the configuration from the file `/etc/radicale/config` .
2020-02-27 02:53:22 +01:00
To enable and manage the service run:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```bash
# Enable the service
$ systemctl enable radicale
# Start the service
$ systemctl start radicale
# Check the status of the service
$ systemctl status radicale
# View all log messages
$ journalctl --unit radicale.service
```
2021-12-14 00:25:31 +01:00
#### Linux with systemd as a user
2020-04-18 13:23:50 +02:00
Create the file `~/.config/systemd/user/radicale.service` :
```ini
[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
2020-02-27 02:53:22 +01:00
2020-04-18 13:23:50 +02:00
[Install]
WantedBy=default.target
```
2025-09-09 22:21:32 +02:00
In this user-specific configuration, Radicale will load the configuration from
the file `~/.config/radicale/config` .
2020-04-18 13:23:50 +02:00
You should set the configuration option `filesystem_folder` in the `storage`
section to something like `~/.var/lib/radicale/collections` .
To enable and manage the service run:
```bash
# Enable the service
$ systemctl --user enable radicale
# Start the service
$ systemctl --user start radicale
# Check the status of the service
$ systemctl --user status radicale
# View all log messages
$ journalctl --user --unit radicale.service
```
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Windows with "NSSM - the Non-Sucking Service Manager"
2020-02-27 02:53:22 +01:00
First install [NSSM ](https://nssm.cc/ ) and start `nssm install` in a command
prompt. Apply the following configuration:
2021-12-14 00:25:31 +01:00
* Service name: `Radicale`
* Application
* Path: `C:\Path\To\Python\python.exe`
2025-05-13 06:22:49 +02:00
* Arguments: `--config C:\Path\To\Config`
2021-12-14 00:25:31 +01:00
* I/O redirection
* Error: `C:\Path\To\Radicale.log`
2020-02-27 02:53:22 +01:00
2020-04-18 16:57:10 +02:00
> **Security:** Be aware that the service runs in the local system account,
> you might want to change this. Managing user accounts is beyond the scope of
2020-05-22 21:45:01 +02:00
> this manual. Also, make sure that the storage folder and log file is not
2020-04-18 16:57:10 +02:00
> readable by unauthorized users.
2020-02-27 02:53:22 +01:00
The log file might grow very big over time, you can configure file rotation
in **NSSM** to prevent this.
The service is configured to start automatically when the computer starts.
To start the service manually open **Services** in **Computer Management** and
start the **Radicale** service.
2021-12-14 00:25:31 +01:00
### Reverse Proxy
2020-02-27 02:53:22 +01:00
2023-06-15 10:57:44 +02:00
When a reverse proxy is used, and Radicale should be made available at a path
below the root (such as `/radicale/` ), then this path must be provided via
the `X-Script-Name` header (without a trailing `/` ). The proxy must remove
the location from the URL path that is forwarded to Radicale. If Radicale
should be made available at the root of the web server (in the nginx case
using `location /` ), then the setting of the `X-Script-Name` header should be
removed from the example below.
2020-02-27 02:53:22 +01:00
2025-06-19 07:33:08 +02:00
Example **nginx** configuration extension:
2020-04-18 13:23:50 +02:00
2025-06-19 07:33:08 +02:00
See also for latest examples: https://github.com/Kozea/Radicale/tree/master/contrib/nginx/
2024-11-17 07:12:20 +01:00
2020-02-27 02:53:22 +01:00
```nginx
location /radicale/ { # The trailing / is important!
2025-09-11 08:02:40 +02:00
proxy_pass http://localhost:5232;
2020-02-27 02:53:22 +01:00
proxy_set_header X-Script-Name /radicale;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2024-11-17 07:12:20 +01:00
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
2020-05-03 23:26:54 +02:00
proxy_set_header Host $http_host;
2020-02-27 02:53:22 +01:00
proxy_pass_header Authorization;
}
```
2025-06-19 07:33:08 +02:00
Example **Caddy** configuration extension:
See also for latest examples: https://github.com/Kozea/Radicale/tree/master/contrib/caddy/
2023-08-05 18:35:05 +02:00
2024-07-12 10:29:35 +02:00
```
handle_path /radicale/* {
uri strip_prefix /radicale
2023-08-05 18:37:26 +02:00
reverse_proxy localhost:5232 {
}
2023-08-05 18:35:05 +02:00
}
```
2025-06-19 07:33:08 +02:00
Example **Apache** configuration extension:
2020-04-18 13:23:50 +02:00
2025-06-19 07:33:08 +02:00
See also for latest examples: https://github.com/Kozea/Radicale/tree/master/contrib/apache/
2024-11-17 07:12:20 +01:00
2020-02-27 02:53:22 +01:00
```apache
RewriteEngine On
RewriteRule ^/radicale$ /radicale/ [R,L]
< Location " / radicale / " >
ProxyPass http://localhost:5232/ retry=0
ProxyPassReverse http://localhost:5232/
2020-08-16 18:14:43 +02:00
RequestHeader set X-Script-Name /radicale
2023-04-30 08:56:46 +02:00
RequestHeader set X-Forwarded-Port "%{SERVER_PORT}s"
2024-11-17 07:12:20 +01:00
RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
2025-09-10 19:42:02 +02:00
< IfVersion > = 2.4.40>
Proxy100Continue Off
< / IfVersion >
2020-02-27 02:53:22 +01:00
< / Location >
```
2020-08-16 18:14:43 +02:00
Example **Apache .htaccess** configuration:
```apache
DirectoryIndex disabled
RewriteEngine On
RewriteRule ^(.*)$ http://localhost:5232/$1 [P,L]
# Set to directory of .htaccess file:
RequestHeader set X-Script-Name /radicale
2023-04-30 08:56:46 +02:00
RequestHeader set X-Forwarded-Port "%{SERVER_PORT}s"
2023-04-30 09:01:26 +02:00
RequestHeader unset X-Forwarded-Proto
2023-04-30 08:56:46 +02:00
< If " % { HTTPS } = ~ / on / " >
RequestHeader set X-Forwarded-Proto "https"
< / If >
2020-08-16 18:14:43 +02:00
```
2021-04-18 20:45:19 +01:00
Example **lighttpd** configuration:
```lighttpd
2023-09-18 18:03:17 +01:00
server.modules += ( "mod_proxy" , "mod_setenv", "mod_rewrite" )
2021-04-18 20:45:19 +01:00
$HTTP["url"] =~ "^/radicale/" {
proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => "5232" )) )
proxy.header = ( "map-urlpath" => ( "/radicale/" => "/" ))
setenv.add-request-header = (
"X-Script-Name" => "/radicale",
"Script-Name" => "/radicale",
)
2023-09-18 18:03:17 +01:00
url.rewrite-once = ( "^/radicale/radicale/(.*)" => "/radicale/$1" )
2021-04-18 20:45:19 +01:00
}
2020-08-16 18:14:43 +02:00
```
2020-02-27 02:53:22 +01:00
Be reminded that Radicale's default configuration enforces limits on the
maximum number of parallel connections, the maximum file size and the rate of
incorrect authentication attempts. Connections are terminated after a timeout.
2021-12-14 00:25:31 +01:00
#### Manage user accounts with the reverse proxy
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Set the configuration option `type` in the `auth` section to
`http_x_remote_user` .
2022-01-07 23:54:34 +01:00
Radicale uses the username provided in the `X-Remote-User` HTTP header and
2025-09-09 22:21:32 +02:00
disables its internal HTTP authentication.
2020-02-27 02:53:22 +01:00
Example **nginx** configuration:
```nginx
location /radicale/ {
proxy_pass http://localhost:5232/;
proxy_set_header X-Script-Name /radicale;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Remote-User $remote_user;
2020-05-03 23:26:10 +02:00
proxy_set_header Host $http_host;
2020-02-27 02:53:22 +01:00
auth_basic "Radicale - Password Required";
auth_basic_user_file /etc/nginx/htpasswd;
}
```
2024-07-12 10:29:35 +02:00
Example **Caddy** configuration:
```
handle_path /radicale/* {
uri strip_prefix /radicale
basicauth {
USER HASH
}
reverse_proxy localhost:5232 {
header_up X-Script-Name /radicale
header_up X-remote-user {http.auth.user.id}
}
}
```
2020-02-27 02:53:22 +01:00
Example **Apache** configuration:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```apache
RewriteEngine On
RewriteRule ^/radicale$ /radicale/ [R,L]
< Location " / radicale / " >
2020-08-16 18:14:43 +02:00
AuthType Basic
AuthName "Radicale - Password Required"
AuthUserFile "/etc/radicale/htpasswd"
Require valid-user
2020-02-27 02:53:22 +01:00
ProxyPass http://localhost:5232/ retry=0
ProxyPassReverse http://localhost:5232/
2025-09-10 19:42:02 +02:00
< IfVersion > = 2.4.40>
Proxy100Continue Off
< / IfVersion >
2020-08-16 18:14:43 +02:00
RequestHeader set X-Script-Name /radicale
2020-02-27 02:53:22 +01:00
RequestHeader set X-Remote-User expr=%{REMOTE_USER}
< / Location >
```
2020-08-16 18:14:43 +02:00
Example **Apache .htaccess** configuration:
```apache
DirectoryIndex disabled
RewriteEngine On
RewriteRule ^(.*)$ http://localhost:5232/$1 [P,L]
AuthType Basic
AuthName "Radicale - Password Required"
AuthUserFile "/etc/radicale/htpasswd"
Require valid-user
# Set to directory of .htaccess file:
RequestHeader set X-Script-Name /radicale
RequestHeader set X-Remote-User expr=%{REMOTE_USER}
```
2020-04-18 16:57:10 +02:00
> **Security:** Untrusted clients should not be able to access the Radicale
2025-03-14 21:39:20 +01:00
> server directly. Otherwise, they can authenticate as any user by simply
2025-09-09 22:21:32 +02:00
> setting related HTTP header. This can be prevented by listening to the
> loopback interface only or local firewall rules.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Secure connection between Radicale and the reverse proxy
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
SSL certificates can be used to encrypt and authenticate the connection between
Radicale and the reverse proxy. First you have to generate a certificate for
Radicale and a certificate for the reverse proxy. The following commands
generate self-signed certificates. You will be asked to enter additional
2025-09-09 22:21:32 +02:00
information about the certificate, these values do not really matter and you can
keep the defaults.
2020-02-27 02:53:22 +01:00
```bash
2021-12-14 00:25:31 +01:00
openssl req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem \
-nodes -days 9999
openssl req -x509 -newkey rsa:4096 -keyout client_key.pem -out client_cert.pem \
-nodes -days 9999
2020-02-27 02:53:22 +01:00
```
Use the following configuration for Radicale:
```ini
[server]
ssl = True
certificate = /path/to/server_cert.pem
key = /path/to/server_key.pem
certificate_authority = /path/to/client_cert.pem
```
2025-09-09 22:21:32 +02:00
If you are using the Let's Encrypt Certbot, the configuration should look similar to this:
2022-05-29 10:22:48 +02:00
```ini
[server]
ssl = True
certificate = /etc/letsencrypt/live/{Your Domain}/fullchain.pem
key = /etc/letsencrypt/live/{Your Domain}/privkey.pem
```
2020-02-27 02:53:22 +01:00
Example **nginx** configuration:
```nginx
location /radicale/ {
proxy_pass https://localhost:5232/;
...
# Place the files somewhere nginx is allowed to access (e.g. /etc/nginx/...).
proxy_ssl_certificate /path/to/client_cert.pem;
proxy_ssl_certificate_key /path/to/client_key.pem;
}
```
2021-12-14 00:25:31 +01:00
### WSGI Server
2020-02-27 02:53:22 +01:00
Radicale is compatible with the WSGI specification.
2020-04-18 13:23:50 +02:00
A configuration file can be set with the `RADICALE_CONFIG` environment
variable, otherwise no configuration file is loaded and the default
configuration is used.
2020-02-27 02:53:22 +01:00
Example **uWSGI** configuration:
```ini
[uwsgi]
http-socket = 127.0.0.1:5232
processes = 8
plugin = python3
module = radicale
env = RADICALE_CONFIG=/etc/radicale/config
```
Example **Gunicorn** configuration:
```bash
2021-12-14 00:25:31 +01:00
gunicorn --bind '127.0.0.1:5232' --env 'RADICALE_CONFIG=/etc/radicale/config' \
--workers 8 radicale
2020-02-27 02:53:22 +01:00
```
2021-12-14 00:25:31 +01:00
#### Manage user accounts with the WSGI server
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Set the configuration option `type` in the `auth` section to `remote_user` .
2025-09-09 22:21:32 +02:00
This way Radicale uses the username provided by the WSGI server and disables
its internal authentication over HTTP.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
### Versioning collections with Git
2020-02-27 02:53:22 +01:00
2020-04-18 13:23:50 +02:00
This tutorial describes how to keep track of all changes to calendars and
2020-02-27 02:53:22 +01:00
address books with **git** (or any other version control system).
2024-11-23 21:35:58 +01:00
The repository must be initialized in the collection base directory
of the user running `radicale` daemon.
2020-04-18 13:23:50 +02:00
2024-11-23 21:35:58 +01:00
```bash
## assuming "radicale" user is starting "radicale" service
# change to user "radicale"
su -l -s /bin/bash radicale
2024-11-24 16:37:35 +01:00
# change to collection base directory defined in [storage] -> filesystem_folder
# assumed here /var/lib/radicale/collections
2024-11-23 21:35:58 +01:00
cd /var/lib/radicale/collections
# initialize git repository
git init
# set user and e-mail, here minimum example
git config user.name "$USER"
git config user.email "$USER@$HOSTNAME"
# define ignore of cache/lock/tmp files
cat < < 'END' >.gitignore
2020-02-27 02:53:22 +01:00
.Radicale.cache
.Radicale.lock
.Radicale.tmp-*
2024-11-23 21:35:58 +01:00
END
2020-02-27 02:53:22 +01:00
```
The configuration option `hook` in the `storage` section must be set to
the following command:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```bash
2024-03-14 22:01:19 +01:00
git add -A && (git diff --cached --quiet || git commit -m "Changes by \"%(user)s\"")
2020-02-27 02:53:22 +01:00
```
The command gets executed after every change to the storage and commits
the changes into the **git** repository.
2024-11-23 21:35:58 +01:00
Log of `git` can be investigated using
2023-10-31 23:13:46 +01:00
```bash
2024-11-23 21:35:58 +01:00
su -l -s /bin/bash radicale
cd /var/lib/radicale/collections
git log
2023-10-31 23:13:46 +01:00
```
2024-11-24 16:37:35 +01:00
In case of problems, make sure you run radicale with ``--debug` ` switch and
inspect the log output. For more information, please visit
2024-11-24 17:10:07 +01:00
[section on logging ](#logging-overview ).
2024-11-24 16:37:35 +01:00
Reason for problems can be
- SELinux status -> check related audit log
- problematic file/directory permissions
- command is not fond or cannot be executed or argument problem
2024-11-23 21:35:58 +01:00
2021-12-14 00:25:31 +01:00
## Documentation
### Configuration
2020-02-27 02:53:22 +01:00
Radicale can be configured with a configuration file or with
command line arguments.
2025-09-09 22:21:32 +02:00
Configuration files have INI-style syntax comprising key-value pairs
grouped into sections with section headers enclosed in brackets.
2020-02-27 02:53:22 +01:00
An example configuration file looks like:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
[server]
# Bind all addresses
2020-04-11 16:14:41 +02:00
hosts = 0.0.0.0:5232, [::]:5232
2020-02-27 02:53:22 +01:00
[auth]
type = htpasswd
2020-04-18 13:23:50 +02:00
htpasswd_filename = ~/.config/radicale/users
2024-09-01 17:19:53 +02:00
htpasswd_encryption = autodetect
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
[storage]
filesystem_folder = ~/.var/lib/radicale/collections
```
2020-04-11 16:14:41 +02:00
Radicale tries to load configuration files from `/etc/radicale/config` and
`~/.config/radicale/config` .
Custom paths can be specified with the `--config /path/to/config` command
line argument or the `RADICALE_CONFIG` environment variable.
Multiple configuration files can be separated by `:` (resp. `;` on Windows).
Paths that start with `?` are optional.
2020-02-27 02:53:22 +01:00
The same example configuration via command line arguments looks like:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```bash
2021-12-14 00:25:31 +01:00
python3 -m radicale --server-hosts 0.0.0.0:5232,[::]:5232 \
--auth-type htpasswd --auth-htpasswd-filename ~/.config/radicale/users \
2024-09-01 17:19:53 +02:00
--auth-htpasswd-encryption autodetect
2020-02-27 02:53:22 +01:00
```
2020-04-11 16:14:41 +02:00
Add the argument `--config ""` to stop Radicale from loading the default
configuration files. Run `python3 -m radicale --help` for more information.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
You can also use command-line options in startup scripts as shown in the following examples:
2024-12-27 08:32:29 +01:00
```bash
## simple variable containing multiple options
RADICALE_OPTIONS="--logging-level=debug --config=/etc/radicale/config --logging-request-header-on-debug --logging-rights-rule-doesnt-match-on-debug"
/usr/bin/radicale $RADICALE_OPTIONS
## variable as array method #1
RADICALE_OPTIONS=("--logging-level=debug" "--config=/etc/radicale/config" "--logging-request-header-on-debug" "--logging-rights-rule-doesnt-match-on-debug")
/usr/bin/radicale ${RADICALE_OPTIONS[@]}
## variable as array method #2
RADICALE_OPTIONS=()
RADICALE_OPTIONS+=("--logging-level=debug")
RADICALE_OPTIONS+=("--config=/etc/radicale/config")
/usr/bin/radicale ${RADICALE_OPTIONS[@]}
```
2025-09-09 22:21:32 +02:00
The following describes all configuration sections and options.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
#### [server]
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
The configuration options in this section are only relevant in standalone
mode; they are ignored, when Radicale runs on WSGI.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
##### hosts
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
A comma separated list of addresses that the server will bind to.
2020-04-11 16:14:41 +02:00
Default: `localhost:5232`
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
##### max_connections
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
The maximum number of parallel connections. Set to `0` to disable the limit.
2020-04-11 16:14:41 +02:00
Default: `8`
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
##### max_content_length
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
The maximum size of the request body. (bytes)
Default: `100000000`
2025-06-14 10:19:44 +02:00
In case of using a reverse proxy in front of check also there related option
2021-12-14 00:25:31 +01:00
##### timeout
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Socket timeout. (seconds)
Default: `30`
2021-12-14 00:25:31 +01:00
##### ssl
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Enable transport layer encryption.
Default: `False`
2021-12-14 00:25:31 +01:00
##### certificate
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Path of the SSL certifcate.
Default: `/etc/ssl/radicale.cert.pem`
2021-12-14 00:25:31 +01:00
##### key
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Path to the private key for SSL. Only effective if `ssl` is enabled.
Default: `/etc/ssl/radicale.key.pem`
2021-12-14 00:25:31 +01:00
##### certificate_authority
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Path to the CA certificate for validating client certificates. This can be used
to secure TCP traffic between Radicale and a reverse proxy. If you want to
authenticate users with client-side certificates, you also have to write an
2022-01-07 23:54:34 +01:00
authentication plugin that extracts the username from the certificate.
2020-02-27 02:53:22 +01:00
2025-03-15 14:35:30 +01:00
Default: (unset)
2020-02-27 02:53:22 +01:00
2024-11-13 22:37:53 +01:00
##### protocol
2025-03-15 14:35:30 +01:00
_(>= 3.3.1)_
2024-11-14 06:14:45 +01:00
Accepted SSL protocol (maybe not all supported by underlying OpenSSL version)
2024-11-13 22:37:53 +01:00
Example for secure configuration: ALL -SSLv3 -TLSv1 -TLSv1.1
Format: Apache SSLProtocol list (from "mod_ssl")
Default: (system default)
##### ciphersuite
2025-03-15 14:35:30 +01:00
_(>= 3.3.1)_
2024-11-14 06:14:45 +01:00
Accepted SSL ciphersuite (maybe not all supported by underlying OpenSSL version)
2024-11-13 22:37:53 +01:00
Example for secure configuration: DHE:ECDHE:-NULL:-SHA
Format: OpenSSL cipher list (see also "man openssl-ciphers")
Default: (system-default)
2025-03-02 09:04:36 +01:00
##### script_name
2025-03-15 14:35:30 +01:00
_(>= 3.5.0)_
2025-03-02 09:04:36 +01:00
Strip script name from URI if called by reverse proxy
Default: (taken from HTTP_X_SCRIPT_NAME or SCRIPT_NAME)
2025-09-09 22:21:32 +02:00
#### [encoding]
2021-12-14 00:25:31 +01:00
##### request
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Encoding for responding requests.
Default: `utf-8`
2021-12-14 00:25:31 +01:00
##### stock
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Encoding for storing local collections
Default: `utf-8`
2025-09-09 22:21:32 +02:00
#### [auth]
2021-12-14 00:25:31 +01:00
##### type
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
The method to verify usernames and passwords.
2025-09-09 22:21:32 +02:00
Available types are:
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `none`
Just allows all usernames and passwords.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `denyall` _(>= 3.2.2)_
Just denies all usernames and passwords.
2025-03-15 14:32:10 +01:00
2025-09-09 22:21:32 +02:00
* `htpasswd`
Use an
2020-04-18 13:23:50 +02:00
[Apache htpasswd file ](https://httpd.apache.org/docs/current/programs/htpasswd.html )
to store usernames and passwords.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `remote_user`
Takes the username from the `REMOTE_USER` environment variable and disables
Radicale's internal HTTP authentication. This can be used to provide the
username from a WSGI server which authenticated the client upfront.
Requires validation, otherwise clients can supply the header themselves,
which then is unconditionally trusted.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `http_x_remote_user`
Takes the username from the `X-Remote-User` HTTP header and disables
Radicale's internal HTTP authentication. This can be used to provide the
username from a reverse proxy which authenticated the client upfront.
Requires validation, otherwise clients can supply the header themselves,
which then is unconditionally trusted.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `ldap` _(>= 3.3.0)_
Use a LDAP or AD server to authenticate users by relaying credentials from clients and handle results.
2022-02-19 11:57:58 +01:00
2025-09-09 22:21:32 +02:00
* `dovecot` _(>= 3.3.1)_
Use a Dovecot server to authenticate users by relaying credentials from clients and handle results.
2024-10-31 09:29:03 -10:00
2025-09-09 22:21:32 +02:00
* `imap` _(>= 3.4.1)_
Use an IMAP server to authenticate users by relaying credentials from clients and handle results.
2025-02-02 09:14:04 +01:00
2025-09-09 22:21:32 +02:00
* `oauth2` _(>= 3.5.0)_
Use an OAuth2 server to authenticate users by relaying credentials from clients and handle results.
OAuth2 authentication (SSO) directly on client is not supported. Use herefore `http_x_remote_user`
2025-03-28 06:19:03 +01:00
in combination with SSO support in reverse proxy (e.g. Apache+mod_auth_openidc).
2025-01-16 06:01:01 +01:00
2025-09-09 22:21:32 +02:00
* `pam` _(>= 3.5.0)_
Use local PAM to authenticate users by relaying credentials from client and handle result..
2025-02-22 17:48:31 +01:00
2025-09-09 22:21:32 +02:00
Default: `none` _(< 3.5.0)_ / `denyall` _(>= 3.5.0)_
2020-02-27 02:53:22 +01:00
2024-12-30 08:16:45 +01:00
##### cache_logins
2025-03-15 14:35:30 +01:00
_(>= 3.4.0)_
2024-12-31 16:13:05 +01:00
Cache successful/failed logins until expiration time. Enable this to avoid
overload of authentication backends.
2024-12-30 08:16:45 +01:00
2025-09-09 22:21:32 +02:00
Default: `False`
2024-12-30 08:16:45 +01:00
2024-12-31 07:57:54 +01:00
##### cache_successful_logins_expiry
2024-12-30 08:16:45 +01:00
2025-03-15 14:35:30 +01:00
_(>= 3.4.0)_
2024-12-30 08:16:45 +01:00
Expiration time of caching successful logins in seconds
2024-12-31 16:13:05 +01:00
Default: `15`
2024-12-30 08:16:45 +01:00
2024-12-31 07:57:54 +01:00
##### cache_failed_logins_expiry
2025-03-15 14:35:30 +01:00
_(>= 3.4.0)_
2024-12-31 07:57:54 +01:00
Expiration time of caching failed logins in seconds
2024-12-31 16:13:05 +01:00
Default: `90`
2024-12-31 07:57:54 +01:00
2021-12-14 00:25:31 +01:00
##### htpasswd_filename
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Path to the htpasswd file.
2023-02-10 22:03:33 +01:00
Default: `/etc/radicale/users`
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
##### htpasswd_encryption
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
The encryption method that is used in the htpasswd file. Use
2020-02-27 02:53:22 +01:00
[htpasswd ](https://httpd.apache.org/docs/current/programs/htpasswd.html )
or similar to generate this files.
Available methods:
2025-09-09 22:21:32 +02:00
* `plain`
Passwords are stored in plaintext.
This is not recommended. as it is obviously **insecure!**
2020-02-27 02:53:22 +01:00
The htpasswd file for this can be created by hand and looks like:
2021-12-14 00:25:31 +01:00
2020-02-27 02:53:22 +01:00
```htpasswd
user1:password1
user2:password2
```
2025-09-09 22:21:32 +02:00
* `bcrypt`
This uses a modified version of the Blowfish stream cipher, which is considered very secure.
The installation of Python's **bcrypt** module is required for this to work.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `md5`
Use an iterated MD5 digest of the password with salt (nowadays insecure).
2024-03-12 06:10:16 +01:00
2025-09-09 22:21:32 +02:00
* `sha256` _(>= 3.1.9)_
Use an iterated SHA-256 digest of the password with salt.
2024-03-12 06:10:16 +01:00
2025-09-09 22:21:32 +02:00
* `sha512` _(>= 3.1.9)_
Use an iterated SHA-512 digest of the password with salt.
2024-03-12 06:10:16 +01:00
2025-09-09 22:21:32 +02:00
* `argon2` _(>= 3.5.3)_
Use an iterated ARGON2 digest of the password with salt.
The installation of Python's **argon2-cffi** module is required for this to work.
2025-04-30 06:24:10 +02:00
2025-09-09 22:21:32 +02:00
* `autodetect` _(>= 3.1.9)_
Automatically detect the encryption method used per user entry.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Default: `md5` _(< 3.3.0)_ / `autodetect` _(>= 3.3.0)_
2020-02-27 02:53:22 +01:00
2025-01-01 16:31:31 +01:00
##### htpasswd_cache
2025-03-15 14:35:30 +01:00
_(>= 3.4.0)_
2025-01-01 16:31:31 +01:00
Enable caching of htpasswd file based on size and mtime_ns
Default: `False`
2021-12-14 00:25:31 +01:00
##### delay
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Average delay (in seconds) after failed login attempts.
2020-02-27 02:53:22 +01:00
Default: `1`
2021-12-14 00:25:31 +01:00
##### realm
2020-04-11 16:14:41 +02:00
Message displayed in the client when a password is needed.
Default: `Radicale - Password Required`
2022-02-19 11:57:58 +01:00
##### ldap_uri
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
URI to the LDAP server.
Mandatory for auth type `ldap` .
2022-02-19 11:57:58 +01:00
Default: `ldap://localhost`
##### ldap_base
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
Base DN of the LDAP server.
Mandatory for auth type `ldap` .
2022-02-19 11:57:58 +01:00
2025-09-08 21:59:29 +02:00
Default: (unset)
2022-02-19 11:57:58 +01:00
##### ldap_reader_dn
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
DN of a LDAP user with read access users and - if defined - groups.
Mandatory for auth type `ldap` .
2022-02-19 11:57:58 +01:00
2025-09-08 21:59:29 +02:00
Default: (unset)
2022-02-19 11:57:58 +01:00
##### ldap_secret
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
Password of `ldap_reader_dn` .
Mandatory for auth type `ldap` unless `ldap_secret_file` is given.
2024-07-30 00:22:07 -07:00
2025-09-08 21:59:29 +02:00
Default: (unset)
2024-07-30 00:22:07 -07:00
##### ldap_secret_file
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
Path to the file containing the password of `ldap_reader_dn` .
Mandatory for auth type `ldap` unless `ldap_secret` is given.
2022-02-19 11:57:58 +01:00
2025-09-08 21:59:29 +02:00
Default: (unset)
2022-02-19 11:57:58 +01:00
##### ldap_filter
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
Filter to search for the LDAP entry of the user to authenticate.
It must contain '{0}' as placeholder for the login name.
2022-02-19 11:57:58 +01:00
Default: `(cn={0})`
2025-01-01 20:52:55 +01:00
##### ldap_user_attribute
2024-12-29 08:05:42 +01:00
2025-03-15 14:35:30 +01:00
_(>= 3.4.0)_
2025-09-08 21:59:29 +02:00
LDAP attribute whose value shall be used as the username after successful authentication.
2025-03-15 14:35:30 +01:00
2025-09-08 21:59:29 +02:00
If set, you can use flexible logins in `ldap_filter` and still have consolidated usernames,
2025-09-09 22:21:32 +02:00
e.g. to allow users to login using mail addresses as an alternative to cn, simply set
```ini
2025-09-08 21:59:29 +02:00
ldap_filter = (& (objectclass=inetOrgPerson)(|(cn={0})(mail={0})))
ldap_user_attribute = cn
```
Even for simple filter setups, it is recommended to set it in order to get usernames exactly
as they are stored in LDAP and to avoid inconsistencies in the upper-/lower-case spelling of the
login names.
2025-01-01 20:41:55 +01:00
2025-09-08 21:59:29 +02:00
Default: (unset, in which case the login name is directly used as the username)
2025-01-01 20:41:55 +01:00
2024-09-23 15:46:08 +02:00
##### ldap_use_ssl
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-09 22:21:32 +02:00
Use ssl on the LDAP connection. **Deprecated!** Use `ldap_security` instead.
2024-09-23 15:46:08 +02:00
2025-04-21 21:26:58 +02:00
##### ldap_security
2025-04-19 17:02:45 +02:00
_(>= 3.5.2)_
2025-09-09 22:21:32 +02:00
Use encryption on the LDAP connection.
One of
* `none`
* `tls`
* `starttls`
2025-04-19 17:02:45 +02:00
2025-09-08 21:59:29 +02:00
Default: `none`
2024-09-23 15:46:08 +02:00
##### ldap_ssl_verify_mode
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-09 22:21:32 +02:00
Certificate verification mode for tls and starttls.
One of
* `NONE`
* `OPTIONAL`
* `REQUIRED` .
2024-09-23 15:46:08 +02:00
2025-09-08 21:59:29 +02:00
Default: `REQUIRED`
2024-09-23 15:46:08 +02:00
##### ldap_ssl_ca_file
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2025-09-08 21:59:29 +02:00
Path to the CA file in PEM format which is used to certify the server certificate
2024-09-23 15:46:08 +02:00
2025-09-08 21:59:29 +02:00
Default: (unset)
##### ldap_groups_attribute
_(>= 3.4.0)_
LDAP attribute in the authenticated user's LDAP entry to read the group memberships from.
E.g. `memberOf` to get groups on Active Directory and alikes, `groupMembership` on Novell eDirectory, ...
If set, get the user's LDAP groups from the attribute given.
For DN-valued attributes, the value of the RDN is used to determine the group names.
The implementation also supports non-DN-valued attributes: their values are taken directly.
The user's group names can be used later on to define rights.
They also give you access to the group calendars, if those exist.
* Group calendars are placed directly under *collection_root_folder* `/GROUPS/`
with the base64-encoded group name as the calendar folder name.
* Group calendar folders are not created automatically.
This must be done manually. In the [LDAP-authentication section of Radicale's wiki ](https://github.com/Kozea/Radicale/wiki/LDAP-authentication ) you can find a script to create a group calendar.
Default: (unset)
##### ldap_group_members_attribute
_(>= 3.5.6)_
Attribute in the group entries to read the group's members from.
E.g. `member` for groups with objectclass `groupOfNames` .
Using `ldap_group_members_attribute` , `ldap_group_base` and `ldap_group_filter` is an alternative
approach to getting the user's groups. Instead of reading them from `ldap_groups_attribute`
in the user's entry, an additional query is performed to seach for those groups beneath `ldap_group_base` ,
that have the user's DN in their `ldap_group_members_attribute` and additionally fulfil `ldap_group_filter` .
As with DN-valued `ldap_groups_attribute` , the value of the RDN is used to determine the group names.
Default: (unset)
##### ldap_group_base
_(>= 3.5.6)_
Base DN to search for groups.
Only necessary if `ldap_group_members_attribute` is set, and if the base DN for groups differs from `ldap_base` .
Default: (unset, in which case `ldap_base` is used as fallback)
##### ldap_group_filter
_(>= 3.5.6)_
Search filter to search for groups having the user DN found as member.
Only necessary `ldap_group_members_attribute` is set, and you want the groups returned to be restricted
instead of all groups the user's DN is in.
Default: (unset)
2024-09-23 15:46:08 +02:00
2025-03-24 20:19:28 +01:00
##### ldap_ignore_attribute_create_modify_timestamp
2025-03-24 22:14:29 +01:00
_(>= 3.5.1)_
2025-03-24 20:19:28 +01:00
2025-09-08 21:59:29 +02:00
Quirks for Authentik LDAP server, which violates the LDAP RFCs:
add modifyTimestamp and createTimestamp to the exclusion list of internal ldap3 client
so that these schema attributes are not checked.
2025-03-24 20:19:28 +01:00
2025-09-09 22:21:32 +02:00
Default: `False`
2025-03-24 20:19:28 +01:00
2025-09-09 22:21:32 +02:00
##### dovecot_connection_type
2025-01-14 08:57:35 +01:00
2025-03-15 14:35:30 +01:00
_(>= 3.4.1)_
2025-09-09 22:21:32 +02:00
Connection type for dovecot authentication.
One of:
* `AF_UNIX`
* `AF_INET`
* `AF_INET6`
2025-01-14 08:57:35 +01:00
Note: credentials are transmitted in cleartext
Default: `AF_UNIX`
2024-10-31 09:29:03 -10:00
##### dovecot_socket
2025-03-15 14:35:30 +01:00
_(>= 3.3.1)_
2025-09-09 22:21:32 +02:00
Path to the Dovecot client authentication socket (eg. /run/dovecot/auth-client on Fedora).
Radicale must have read & write access to the socket.
2024-10-31 09:29:03 -10:00
2025-01-14 08:57:35 +01:00
Default: `/var/run/dovecot/auth-client`
##### dovecot_host
2025-03-15 14:35:30 +01:00
_(>= 3.4.1)_
2025-09-09 22:21:32 +02:00
Host of dovecot socket exposed via network
2025-01-14 08:57:35 +01:00
Default: `localhost`
##### dovecot_port
2025-03-15 14:35:30 +01:00
_(>= 3.4.1)_
2025-09-09 22:21:32 +02:00
Port of dovecot socket exposed via network
2025-01-14 08:57:35 +01:00
Default: `12345`
2024-10-31 09:29:03 -10:00
2025-09-09 20:22:44 +02:00
##### remote_ip_source
2025-08-30 21:59:22 +02:00
_(>= 3.5.6)_
2025-09-09 20:22:44 +02:00
For authentication mechanisms that are made aware of the remote IP
(such as dovecot via the `rip=` auth protocol parameter), determine
the source to use. Currently, valid values are
2025-08-30 21:59:22 +02:00
2025-09-09 20:22:44 +02:00
`REMOTE_ADDR` (default)
: Use the REMOTE_ADDR environment variable that captures the remote
address of the socket connection.
`X-Remote-Addr`
: Use the `X-Remote-Addr` HTTP header value.
In the case of `X-Remote-Addr` , Radicale must be running be running
behind a proxy that you control and that sets/overwrites the
`X-Remote-Addr` header (doesn't pass it) so that the value passed
to dovecot is reliable. For example, for nginx, add
2025-08-30 21:59:22 +02:00
```
proxy_set_header X-Remote-Addr $remote_addr;
```
to the configuration sample.
2025-09-09 20:22:44 +02:00
Default: `REMOTE_ADDR`
2025-08-30 21:59:22 +02:00
2025-01-16 06:01:01 +01:00
##### imap_host
2025-03-15 14:35:30 +01:00
_(>= 3.4.1)_
2025-09-09 22:21:32 +02:00
IMAP server hostname.
One of:
* address
* address:port
* [address]:port (for IPv5 addresses)
* imap.server.tld
2025-01-16 06:01:01 +01:00
Default: `localhost`
##### imap_security
2025-03-15 14:35:30 +01:00
_(>= 3.4.1)_
2025-09-09 22:21:32 +02:00
Secure the IMAP connection:
One of:
* `tls`
* `starttls`
* `none`
2025-01-16 06:01:01 +01:00
Default: `tls`
2025-02-02 09:14:04 +01:00
##### oauth2_token_endpoint
2025-03-15 14:35:30 +01:00
_(>= 3.5.0)_
2025-09-09 22:21:32 +02:00
Endpoint URL for the OAuth2 token
2025-02-02 09:14:04 +01:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-02-02 09:14:04 +01:00
2025-02-22 17:48:51 +01:00
##### pam_service
2025-03-15 14:35:30 +01:00
_(>= 3.5.0)_
2025-09-09 22:21:32 +02:00
PAM service name
2025-02-22 17:48:51 +01:00
2025-09-09 22:21:32 +02:00
Default: `radicale`
2025-02-22 17:48:51 +01:00
##### pam_group_membership
2025-03-15 14:35:30 +01:00
_(>= 3.5.0)_
2025-02-22 17:48:51 +01:00
PAM group user should be member of
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-02-22 17:48:51 +01:00
2024-04-18 22:06:16 +03:00
##### lc_username
2025-09-09 22:21:32 +02:00
С onvert username to lowercase.
Recommended to be `True` for case-insensitive auth providers like ldap, kerberos, ...
2024-04-18 22:06:16 +03:00
Default: `False`
2025-09-08 21:59:29 +02:00
Notes:
* `lc_username` and `uc_username` are mutually exclusive
2025-09-09 22:21:32 +02:00
* for auth type `ldap` the use of `ldap_user_attribute` is preferred over `lc_username`
2024-12-14 09:25:36 +01:00
##### uc_username
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2025-09-09 22:21:32 +02:00
С onvert username to uppercase.
Recommended to be `True` for case-insensitive auth providers like ldap, kerberos, ...
2024-12-14 09:25:36 +01:00
Default: `False`
2025-09-08 21:59:29 +02:00
Notes:
* `uc_username` and `lc_username` are mutually exclusive
2025-09-09 22:21:32 +02:00
* for auth type `ldap` the use of `ldap_user_attribute` is preferred over `uc_username`
2024-12-14 09:25:36 +01:00
2024-07-18 06:50:29 +02:00
##### strip_domain
2025-03-15 14:35:30 +01:00
_(>= 3.2.3)_
2024-07-18 06:50:29 +02:00
Strip domain from username
Default: `False`
2025-05-05 15:25:56 -05:00
##### urldecode_username
_(>= 3.5.3)_
2025-09-09 22:21:32 +02:00
URL-decode the username.
If the username is an email address, some clients send the username URL-encoded
(notably iOS devices) breaking the authentication process
(user@example .com becomes user%40example.com).
This setting forces decoding the username.
2025-05-05 15:25:56 -05:00
Default: `False`
2025-09-09 22:21:32 +02:00
#### [rights]
2021-12-14 00:25:31 +01:00
##### type
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Authorization backend that is used to check the access rights to collections.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
The default and recommended backend is `owner_only` . If access to calendars
and address books outside the user's collection directory (that's `/username/` )
is granted, clients will not detect these collections automatically and
will not show them to the users.
Choosing any other authorization backend is only useful if you access
calendars and address books directly via URL.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Available backends are:
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `authenticated`
Authenticated users can read and write everything.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `owner_only`
Authenticated users can read and write their own collections under the path
2020-02-27 02:53:22 +01:00
*/USERNAME/* .
2025-09-09 22:21:32 +02:00
* `owner_write`
Authenticated users can read everything and write their own collections under
2020-02-27 02:53:22 +01:00
the path */USERNAME/* .
2025-09-09 22:21:32 +02:00
* `from_file`
Load the rules from a file.
2020-02-27 02:53:22 +01:00
Default: `owner_only`
2021-12-14 00:25:31 +01:00
##### file
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Name of the file containing the authorization rules for the `from_file` backend.
See the [Rights ](#authorization-and-rights ) section for details.
Default: `/etc/radicale/rights`
2020-02-27 02:53:22 +01:00
2024-03-09 06:52:34 +01:00
##### permit_delete_collection
2025-03-15 14:35:30 +01:00
_(>= 3.1.9)_
2024-03-09 06:52:34 +01:00
2025-09-09 22:21:32 +02:00
Global permission to delete complete collections.
* If `False` it can be explicitly granted per collection by `permissions: D`
* If `True` it can be explicitly forbidden per collection by `permissions: d`
2025-08-31 17:38:59 +02:00
2025-09-09 22:21:32 +02:00
Default: `True`
2024-03-09 06:52:34 +01:00
2024-09-30 21:13:00 +02:00
##### permit_overwrite_collection
2025-03-15 14:35:30 +01:00
_(>= 3.3.0)_
2024-09-30 21:13:00 +02:00
2025-09-09 22:21:32 +02:00
Global permission to overwrite complete collections.
* If `False` it can be explicitly granted per collection by `permissions: O`
* If `True` it can be explicitly forbidden per collection by `permissions: o`
2025-08-31 17:38:59 +02:00
2025-09-09 22:21:32 +02:00
Default: `True`
2024-09-30 21:13:00 +02:00
2025-09-09 22:21:32 +02:00
#### [storage]
2021-12-14 00:25:31 +01:00
##### type
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Backend used to store data.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Available backends are:
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `multifilesystem`
Stores the data in the filesystem.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `multifilesystem_nolock`
The `multifilesystem` backend without file-based locking.
2021-12-14 00:25:31 +01:00
Must only be used with a single process.
2021-12-08 21:41:12 +01:00
2020-02-27 02:53:22 +01:00
Default: `multifilesystem`
2021-12-14 00:25:31 +01:00
##### filesystem_folder
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Folder for storing local collections; will be auto-created if not present.
2020-02-27 02:53:22 +01:00
Default: `/var/lib/radicale/collections`
2024-12-10 08:23:32 +01:00
##### filesystem_cache_folder
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2025-09-09 22:21:32 +02:00
Folder for storing cache of local collections; will be auto-created if not present
2024-12-10 08:23:32 +01:00
2024-12-10 08:52:51 +01:00
Default: (filesystem_folder)
2024-12-10 08:23:32 +01:00
2025-09-09 22:21:32 +02:00
Note: only used if use_cache_subfolder_* options are active
2024-12-10 08:23:32 +01:00
Note: can be used on multi-instance setup to cache files on local node (see below)
2024-12-03 21:31:12 +01:00
##### use_cache_subfolder_for_item
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2024-12-10 08:23:32 +01:00
Use subfolder `collection-cache` for cache file structure of 'item' instead of inside collection folders, created if not present
Default: `False`
Note: can be used on multi-instance setup to cache 'item' on local node
##### use_cache_subfolder_for_history
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2024-12-10 08:23:32 +01:00
Use subfolder `collection-cache` for cache file structure of 'history' instead of inside collection folders, created if not present
2024-12-03 21:31:12 +01:00
Default: `False`
2025-09-09 22:21:32 +02:00
Note: only use on single-instance setup: it will break consistency with clients in multi-instance setup
2024-12-10 08:23:32 +01:00
##### use_cache_subfolder_for_synctoken
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2024-12-10 08:23:32 +01:00
Use subfolder `collection-cache` for cache file structure of 'sync-token' instead of inside collection folders, created if not present
Default: `False`
2025-09-09 22:21:32 +02:00
Note: only use on single-instance setup: it will break consistency with clients in multi-instance setup
2024-12-10 08:23:32 +01:00
2024-12-15 11:40:20 +01:00
##### use_mtime_and_size_for_item_cache
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2025-09-09 22:21:32 +02:00
Use last modification time (in nanoseconds) and size (in bytes) for 'item' cache instead of SHA256 (improves speed)
2024-12-15 11:40:20 +01:00
Default: `False`
2025-09-09 22:21:32 +02:00
Notes:
* check used filesystem mtime precision before enabling
* conversion is done on access
* bulk conversion can be done offline using the storage verification option `radicale --verify-storage`
2024-12-15 12:20:24 +01:00
2024-12-10 08:23:32 +01:00
##### folder_umask
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2025-09-09 22:21:32 +02:00
umask to use for folder creation (not applicable for OS Windows)
2024-12-10 08:23:32 +01:00
2025-09-09 22:21:32 +02:00
Default: (system-default, usually `0022` )
2024-12-10 08:23:32 +01:00
2025-09-09 22:21:32 +02:00
Useful values:
* `0077` (user:rw group:- other:-)
* `0027` (user:rw group:r other:-)
* `0007` (user:rw group:rw other:-)
* `0022` (user:rw group:r other:r)
2024-12-10 08:23:32 +01:00
2021-12-14 00:25:31 +01:00
##### max_sync_token_age
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Delete sync-tokens that are older than the specified time (in seconds).
2020-02-27 02:53:22 +01:00
Default: `2592000`
2024-07-04 09:37:25 +02:00
##### skip_broken_item
2024-06-09 13:57:32 +02:00
2025-03-15 14:35:30 +01:00
_(>= 3.2.2)_
2024-06-09 13:57:32 +02:00
Skip broken item instead of triggering an exception
2024-06-18 17:42:49 +02:00
Default: `True`
2024-06-09 13:57:32 +02:00
2021-12-14 00:25:31 +01:00
##### hook
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Command that is run after changes to storage. Take a look at the
2025-09-09 22:21:32 +02:00
[Versioning collections with Git ](#versioning-collections-with-git )
tutorial for an example.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2020-02-27 02:53:22 +01:00
2024-11-24 16:29:14 +01:00
Supported placeholders:
2025-03-27 08:32:23 +01:00
- `%(user)s` : logged-in user
- `%(cwd)s` : current working directory _(>= 3.5.1)_
- `%(path)s` : full path of item _(>= 3.5.1)_
2025-08-12 16:10:11 +02:00
- `%(to_path)s` : full path of destination item (only set on MOVE request) _(>= 3.5.5)_
- `%(request)s` : request method _(>= 3.5.5)_
2024-11-24 16:29:14 +01:00
2025-09-09 22:21:32 +02:00
The command will be executed with base directory defined in `filesystem_folder` (see above)
2024-11-24 16:29:14 +01:00
2024-04-22 12:23:24 +03:00
##### predefined_collections
2025-09-09 22:21:32 +02:00
Create predefined user collections.
2024-04-22 12:23:24 +03:00
2025-09-09 22:21:32 +02:00
Example:
```json
{
"def-addressbook": {
"D:displayname": "Personal Address Book",
"tag": "VADDRESSBOOK"
},
"def-calendar": {
"C:supported-calendar-component-set": "VEVENT,VJOURNAL,VTODO",
"D:displayname": "Personal Calendar",
"tag": "VCALENDAR"
}
}
```
Default: (unset)
2024-04-22 12:23:24 +03:00
2025-09-09 22:21:32 +02:00
#### [web]
2021-12-14 00:25:31 +01:00
##### type
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
The backend that provides the web interface of Radicale.
2025-09-09 22:21:32 +02:00
Available backends are:
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `none`
Simply shows the message "Radicale works!".
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `internal`
Allows creation and management of address books and calendars.
2020-02-27 02:53:22 +01:00
Default: `internal`
2025-09-09 22:21:32 +02:00
#### [logging]
2021-12-14 00:25:31 +01:00
##### level
2020-02-27 13:50:30 +01:00
2020-04-11 16:14:41 +02:00
Set the logging level.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Available levels are:
* `debug`
* `info`
* `warning`
* `error`
* `critical`
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Default: `warning` _(< 3.2.0)_ / `info` _(>= 3.2.0)_
2020-02-27 02:53:22 +01:00
2025-07-19 14:39:47 +02:00
##### trace_on_debug
_(> 3.5.4)_
Do not filter debug messages starting with 'TRACE'
Default: `False`
##### trace_filter
_(> 3.5.4)_
Filter debug messages starting with 'TRACE/< TOKEN > '
2025-09-09 22:21:32 +02:00
Prerequisite: `trace_on_debug = True`
2025-07-19 14:39:47 +02:00
Default: (empty)
2021-12-14 00:25:31 +01:00
##### mask_passwords
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
Do not include passwords in logs.
2020-02-27 02:53:22 +01:00
Default: `True`
2024-06-02 11:35:13 +02:00
##### bad_put_request_content
2025-03-15 14:35:30 +01:00
_(>= 3.2.1)_
2024-06-02 11:35:13 +02:00
Log bad PUT request content (for further diagnostics)
2024-06-18 17:43:35 +02:00
Default: `False`
2024-06-02 11:35:13 +02:00
2024-06-09 13:42:08 +02:00
##### backtrace_on_debug
2025-03-15 14:35:30 +01:00
_(>= 3.2.2)_
2025-09-09 22:21:32 +02:00
Log backtrace on `level = debug`
2024-06-09 13:42:08 +02:00
2024-06-18 17:43:35 +02:00
Default: `False`
2024-06-09 13:42:08 +02:00
2024-06-11 13:23:03 +02:00
##### request_header_on_debug
2025-03-15 14:35:30 +01:00
_(>= 3.2.2)_
2025-09-09 22:21:32 +02:00
Log request on `level = debug`
2024-06-11 13:23:03 +02:00
2024-06-18 17:43:35 +02:00
Default: `False`
2024-06-11 13:23:03 +02:00
##### request_content_on_debug
2025-03-15 14:35:30 +01:00
_(>= 3.2.2)_
2025-09-09 22:21:32 +02:00
Log request on `level = debug`
2024-06-11 13:23:03 +02:00
2024-06-18 17:43:35 +02:00
Default: `False`
2024-06-11 13:23:03 +02:00
2024-12-14 16:49:54 +01:00
##### response_content_on_debug
2024-06-11 13:23:03 +02:00
2025-03-15 14:35:30 +01:00
_(>= 3.2.2)_
2025-09-09 22:21:32 +02:00
Log response on `level = debug`
2024-06-11 13:23:03 +02:00
2024-06-18 17:43:35 +02:00
Default: `False`
2024-06-11 13:23:03 +02:00
2024-12-14 16:49:54 +01:00
##### rights_rule_doesnt_match_on_debug
2024-08-28 08:03:16 +02:00
2025-05-18 07:34:50 +02:00
_(>= 3.2.3)_
2025-09-09 22:21:32 +02:00
Log rights rule which doesn't match on `level = debug`
2024-08-28 08:03:16 +02:00
Default: `False`
2024-12-15 12:21:39 +01:00
##### storage_cache_actions_on_debug
2024-12-14 16:49:54 +01:00
2025-03-15 14:35:30 +01:00
_(>= 3.3.2)_
2025-09-09 22:21:32 +02:00
Log storage cache actions on `level = debug`
2024-12-14 16:49:54 +01:00
Default: `False`
2025-09-09 22:21:32 +02:00
#### [headers]
2020-02-27 13:50:30 +01:00
2025-09-09 22:21:32 +02:00
This section can be used to specify additional HTTP headers that will be sent to clients.
2020-02-27 02:53:22 +01:00
An example to relax the same-origin policy:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
Access-Control-Allow-Origin = *
```
2025-09-09 22:21:32 +02:00
#### [hook]
2023-02-10 22:03:33 +01:00
##### type
2020-08-17 02:47:45 +02:00
Hook binding for event changes and deletion notifications.
2025-09-09 22:21:32 +02:00
Available types are:
2020-08-17 02:47:45 +02:00
2025-09-09 22:21:32 +02:00
* `none`
Disabled. Nothing will be notified.
2020-08-17 02:47:45 +02:00
2025-09-09 22:21:32 +02:00
* `rabbitmq` _(>= 3.2.0)_
Push the message to the rabbitmq server.
2020-08-17 02:47:45 +02:00
2025-09-09 22:21:32 +02:00
* `email` _(>= 3.5.5)_
Send an email notification to event attendees.
2025-06-19 02:00:09 -06:00
2020-08-17 02:47:45 +02:00
Default: `none`
2025-07-22 20:57:05 +02:00
##### dryrun
_(> 3.5.4)_
2025-09-09 22:21:32 +02:00
Dry-Run / simulate (i.e. do not really trigger) the hook action.
2025-07-22 20:57:05 +02:00
Default: `False`
2025-01-09 22:50:51 +01:00
##### rabbitmq_endpoint
2020-08-17 02:47:45 +02:00
2025-03-15 14:35:30 +01:00
_(>= 3.2.0)_
2020-08-17 02:47:45 +02:00
End-point address for rabbitmq server.
2025-09-09 22:21:32 +02:00
E.g.: `amqp://user:password@localhost:5672/`
2020-08-17 02:47:45 +02:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2020-08-17 02:47:45 +02:00
2025-01-09 22:50:51 +01:00
##### rabbitmq_topic
2020-08-17 02:47:45 +02:00
2025-03-15 14:35:30 +01:00
_(>= 3.2.0)_
2025-09-09 22:21:32 +02:00
RabbitMQ topic to publish message in.
2020-08-17 02:47:45 +02:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2020-08-17 02:47:45 +02:00
2025-01-09 22:50:51 +01:00
##### rabbitmq_queue_type
2024-03-02 13:38:42 +01:00
2025-03-15 14:35:30 +01:00
_(>= 3.2.0)_
2024-03-02 13:38:42 +01:00
RabbitMQ queue type for the topic.
2025-09-09 22:21:32 +02:00
Default: `classic`
2024-03-02 13:38:42 +01:00
2025-06-19 02:00:09 -06:00
##### smtp_server
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Address of SMTP server to connect to.
2025-06-19 02:00:09 -06:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-06-19 02:00:09 -06:00
##### smtp_port
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Port on SMTP server to connect to.
2025-06-19 02:00:09 -06:00
Default:
2025-06-29 00:47:26 -06:00
##### smtp_security
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Use encryption on the SMTP connection.
2025-06-29 00:47:26 -06:00
2025-09-09 22:21:32 +02:00
One of:
* `none`
* `tls`
* `starttls`
Default: `none`
2025-06-29 00:47:26 -06:00
##### smtp_ssl_verify_mode
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
The certificate verification mode for tls and starttls.
2025-06-29 00:47:26 -06:00
2025-09-09 22:21:32 +02:00
One of:
* `NONE`
* `OPTIONAL`
* `REQUIRED`
Default: `REQUIRED`
2025-06-29 00:47:26 -06:00
2025-06-19 02:00:09 -06:00
##### smtp_username
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Username to authenticate with SMTP server.
Leave empty to disable authentication (e.g. using local mail server).
2025-06-19 02:00:09 -06:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-06-19 02:00:09 -06:00
##### smtp_password
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Password to authenticate with SMTP server.
Leave empty to disable authentication (e.g. using local mail server).
2025-06-19 02:00:09 -06:00
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-06-19 02:00:09 -06:00
##### from_email
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-06-19 02:00:09 -06:00
Email address to use as sender in email notifications.
2025-09-09 22:21:32 +02:00
Default: (unset)
2025-06-19 02:00:09 -06:00
##### mass_email
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
When enabled, send one email to all attendee email addresses.
When disabled, send one email per attendee email address.
2025-06-19 02:00:09 -06:00
Default: `False`
2025-07-19 23:12:54 -06:00
##### new_or_added_to_event_template
2025-06-19 02:00:09 -06:00
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Template to use for added/updated event email body sent to an attendee when the event is created or they are added to a pre-existing event.
2025-06-19 02:00:09 -06:00
The following placeholders will be replaced:
2025-09-09 22:21:32 +02:00
* `$organizer_name` : Name of the organizer, or "Unknown Organizer" if not set in event
* `$from_email` : Email address the email is sent from
* `$attendee_name` : Name of the attendee (email recipient), or "everyone" if mass email enabled.
* `$event_name` : Name/summary of the event, or "No Title" if not set in event
* `$event_start_time` : Start time of the event in ISO 8601 format
* `$event_end_time` : End time of the event in ISO 8601 format, or "No End Time" if the event has no end time
* `$event_location` : Location of the event, or "No Location Specified" if not set in event
2025-06-19 02:00:09 -06:00
Providing any words prefixed with $ not included in the list above will result in an error.
Default:
```
Hello $attendee_name,
You have been added as an attendee to the following calendar event.
$event_title
$event_start_time - $event_end_time
$event_location
This is an automated message. Please do not reply.
```
2025-07-19 23:12:54 -06:00
##### deleted_or_removed_from_event_template
2025-06-19 02:00:09 -06:00
2025-07-03 14:37:16 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Template to use for deleted/removed event email body sent to an attendee when the event is deleted or they are removed from the event.
2025-06-19 02:00:09 -06:00
The following placeholders will be replaced:
2025-09-09 22:21:32 +02:00
* `$organizer_name` : Name of the organizer, or "Unknown Organizer" if not set in event
* `$from_email` : Email address the email is sent from
* `$attendee_name` : Name of the attendee (email recipient), or "everyone" if mass email enabled.
* `$event_name` : Name/summary of the event, or "No Title" if not set in event
* `$event_start_time` : Start time of the event in ISO 8601 format
* `$event_end_time` : End time of the event in ISO 8601 format, or "No End Time" if the event has no end time
* `$event_location` : Location of the event, or "No Location Specified" if not set in event
2025-06-19 02:00:09 -06:00
Providing any words prefixed with $ not included in the list above will result in an error.
2025-09-09 22:21:32 +02:00
Default:
2025-06-19 02:00:09 -06:00
```
Hello $attendee_name,
2025-07-19 23:12:54 -06:00
The following event has been deleted.
2025-06-19 02:00:09 -06:00
$event_title
$event_start_time - $event_end_time
$event_location
This is an automated message. Please do not reply.
2025-07-19 23:12:54 -06:00
```
2025-09-09 22:21:32 +02:00
##### updated_event_template
2025-07-19 23:12:54 -06:00
_(>= 3.5.5)_
2025-09-09 22:21:32 +02:00
Template to use for updated event email body sent to an attendee when non-attendee-related details of the event are updated.
2025-07-19 23:12:54 -06:00
Existing attendees will NOT be notified of a modified event if the only changes are adding/removing other attendees.
The following placeholders will be replaced:
2025-09-09 22:21:32 +02:00
* `$organizer_name` : Name of the organizer, or "Unknown Organizer" if not set in event
* `$from_email` : Email address the email is sent from
* `$attendee_name` : Name of the attendee (email recipient), or "everyone" if mass email enabled.
* `$event_name` : Name/summary of the event, or "No Title" if not set in event
* `$event_start_time` : Start time of the event in ISO 8601 format
* `$event_end_time` : End time of the event in ISO 8601 format, or "No End Time" if the event has no end time
* `$event_location` : Location of the event, or "No Location Specified" if not set in event
2025-07-19 23:12:54 -06:00
Providing any words prefixed with $ not included in the list above will result in an error.
2025-09-09 22:21:32 +02:00
Default:
2025-07-19 23:12:54 -06:00
```
Hello $attendee_name,
The following event has been updated.
$event_title
$event_start_time - $event_end_time
$event_location
This is an automated message. Please do not reply.
2025-06-19 02:00:09 -06:00
```
2025-09-09 22:21:32 +02:00
#### [reporting]
2025-03-15 14:35:30 +01:00
2024-08-16 14:57:30 -06:00
##### max_freebusy_occurrence
2025-03-15 14:35:30 +01:00
_(>= 3.2.3)_
2024-08-16 14:57:30 -06:00
When returning a free-busy report, a list of busy time occurrences are
generated based on a given time frame. Large time frames could
generate a lot of occurrences based on the time frame supplied. This
setting limits the lookup to prevent potential denial of service
attacks on large time frames. If the limit is reached, an HTTP error
is thrown instead of returning the results.
Default: 10000
2020-04-18 13:23:50 +02:00
## Supported Clients
Radicale has been tested with:
2021-12-14 00:25:31 +01:00
* [Android ](https://android.com/ ) with
2025-01-03 07:19:01 +01:00
[DAVx⁵ ](https://www.davx5.com/ ) (formerly DAVdroid),
* [OneCalendar ](https://www.onecalendar.nl/ )
2021-12-14 00:25:31 +01:00
* [GNOME Calendar ](https://wiki.gnome.org/Apps/Calendar ),
[Contacts ](https://wiki.gnome.org/Apps/Contacts ) and
[Evolution ](https://wiki.gnome.org/Apps/Evolution )
2025-09-09 22:21:32 +02:00
* [KDE PIM Applications ](https://kontact.kde.org/ ),
[KDE Merkuro ](https://apps.kde.org/de/merkuro/ )
2025-07-30 19:19:13 +02:00
* [Mozilla Thunderbird ](https://www.mozilla.org/thunderbird/ ) ([Thunderbird/Radicale ](https://github.com/Kozea/Radicale/wiki/Client-Thunderbird )) with
2021-12-14 00:25:31 +01:00
[CardBook ](https://addons.mozilla.org/thunderbird/addon/cardbook/ ) and
[Lightning ](https://www.mozilla.org/projects/calendar/ )
2025-07-30 19:19:13 +02:00
* [InfCloud ](https://www.inf-it.com/open-source/clients/infcloud/ ) ([InfCloud/Radicale ](https://github.com/Kozea/Radicale/wiki/Client-InfCloud )),
2025-07-30 17:05:02 +02:00
[CalDavZAP ](https://www.inf-it.com/open-source/clients/caldavzap/ ),
[CardDavMATE ](https://www.inf-it.com/open-source/clients/carddavmate/ ) and
[Open Calendar ](https://github.com/algoo/open-calendar/ )
2025-07-30 19:19:13 +02:00
* [pimsync ](https://pimsync.whynothugo.nl/ ) ([pimsync/Radicale ](https://github.com/Kozea/Radicale/wiki/Client-pimsync ))
2020-04-18 13:23:50 +02:00
Many clients do not support the creation of new calendars and address books.
You can use Radicale's web interface
2021-12-14 00:25:31 +01:00
(e.g. < http: / / localhost:5232 > ) to create and manage address books and calendars.
2020-04-18 13:23:50 +02:00
2025-09-09 22:21:32 +02:00
In some clients, it is sufficient to simply enter the URL of the Radicale server
2022-01-07 23:54:34 +01:00
(e.g. `http://localhost:5232` ) and your username. In others, you have to
2025-09-09 22:21:32 +02:00
enter the URL of the collection directly (e.g. `http://localhost:5232/user/calendar` ).
2020-04-18 13:23:50 +02:00
2024-11-17 14:25:55 +01:00
Some clients (notably macOS's Calendar.app) may silently refuse to include
account credentials over unsecured HTTP, leading to unexpected authentication
failures. In these cases, you want to make sure the Radicale server is
[accessible over HTTPS ](#ssl ).
2021-12-14 00:25:31 +01:00
#### DAVx⁵
2020-04-18 13:23:50 +02:00
Enter the URL of the Radicale server (e.g. `http://localhost:5232` ) and your
2022-01-07 23:54:34 +01:00
username. DAVx⁵ will show all existing calendars and address books and you
2025-09-09 22:21:32 +02:00
can create new ones.
2020-04-18 13:23:50 +02:00
2025-01-03 07:19:01 +01:00
#### OneCalendar
When adding account, select CalDAV account type, then enter user name, password and the
Radicale server (e.g. `https://yourdomain:5232` ). OneCalendar will show all
existing calendars and (FIXME: address books), you need to select which ones
you want to see. OneCalendar supports many other server types too.
2024-05-02 11:08:46 +08:00
#### GNOME Calendar, Contacts
2020-04-18 13:23:50 +02:00
2024-05-03 10:36:51 +08:00
GNOME 46 added CalDAV and CardDAV support to _GNOME Online Accounts_ .
2020-04-18 13:23:50 +02:00
2025-09-09 22:21:32 +02:00
Open GNOME Settings, navigate to _Online Accounts_ > _Connect an Account_ > _Calendar, Contacts and Files_ .
Enter the URL (e.g. `https://example.com/radicale` ) and your credentials then click _Sign In_ .
In the pop-up dialog, turn off _Files_ . After adding Radicale in _GNOME Online Accounts_ ,
it should be available in GNOME Contacts and GNOME Calendar.
2020-04-18 13:23:50 +02:00
2024-05-02 11:14:10 +08:00
#### Evolution
2020-04-18 13:23:50 +02:00
In **Evolution** add a new calendar and address book respectively with WebDAV.
Enter the URL of the Radicale server (e.g. `http://localhost:5232` ) and your
2022-01-07 23:54:34 +01:00
username. Clicking on the search button will list the existing calendars and
2020-04-18 13:23:50 +02:00
address books.
2025-09-09 22:21:32 +02:00
Adding CalDAV and CardDAV accounts in Evolution will automatically make them
available in GNOME Contacts and GNOME Calendar.
#### KDE PIM Applications
In **Kontact** add a _DAV Groupware resource_ to Akonadi under
_Settings > Configure Kontact > Calendar > General > Calendars_,
select the protocol (CalDAV or CardDAV), add the URL to the Radicale collections
and enter the credentials. After synchronization of the calendar resp.
addressbook items, you can manage them in Kontact.
2024-05-02 11:14:10 +08:00
2021-12-14 00:25:31 +01:00
#### Thunderbird
2022-01-07 23:51:21 +01:00
Add a new calendar on the network. Enter your username and the URL of the
Radicale server (e.g. `http://localhost:5232` ). After asking for your password,
it will list the existing calendars.
2020-04-18 13:23:50 +02:00
2022-01-07 23:51:21 +01:00
##### Adress books with CardBook add-on
2020-04-18 13:23:50 +02:00
2022-01-07 23:51:21 +01:00
Add a new address book on the network with CardDAV. Enter the URL of the
Radicale server (e.g. `http://localhost:5232` ) and your username and password.
It will list your existing address books.
2020-04-18 13:23:50 +02:00
2021-12-14 00:25:31 +01:00
#### InfCloud, CalDavZAP and CardDavMATE
2020-04-18 13:23:50 +02:00
2025-03-06 08:32:27 +01:00
You can integrate InfCloud into Radicale's web interface with by simply
download latest package from [InfCloud ](https://www.inf-it.com/open-source/clients/infcloud/ )
and extract content to new folder `infcloud` in `radicale/web/internal_data/` .
No further adjustments are required as content is adjusted on the fly (tested with 0.13.1).
See also [Wiki/Client InfCloud ](https://github.com/Kozea/Radicale/wiki/Client-InfCloud ).
2020-04-18 13:23:50 +02:00
2021-12-14 00:25:31 +01:00
#### Command line
2020-04-18 13:23:50 +02:00
This is not the recommended way of creating and managing your calendars and
address books. Use Radicale's web interface or a client with support for it
(e.g. **DAVx⁵** ).
To create a new calendar run something like:
```bash
$ curl -u user -X MKCOL 'http://localhost:5232/user/calendar' --data \
'<?xml version="1.0" encoding="UTF-8" ?>
< create xmlns = "DAV:" xmlns:C = "urn:ietf:params:xml:ns:caldav" xmlns:I = "http://apple.com/ns/ical/" >
< set >
< prop >
< resourcetype >
< collection / >
< C:calendar / >
< / resourcetype >
< C:supported-calendar-component-set >
< C:comp name = "VEVENT" / >
< C:comp name = "VJOURNAL" / >
< C:comp name = "VTODO" / >
< / C:supported-calendar-component-set >
< displayname > Calendar< / displayname >
< C:calendar-description > Example calendar< / C:calendar-description >
< I:calendar-color > #ff0000ff </ I:calendar-color >
< / prop >
< / set >
< / create > '
```
To create a new address book run something like:
```bash
$ curl -u user -X MKCOL 'http://localhost:5232/user/addressbook' --data \
'<?xml version="1.0" encoding="UTF-8" ?>
< create xmlns = "DAV:" xmlns:CR = "urn:ietf:params:xml:ns:carddav" >
< set >
< prop >
< resourcetype >
< collection / >
< CR:addressbook / >
< / resourcetype >
< displayname > Address book< / displayname >
< CR:addressbook-description > Example address book< / CR:addressbook-description >
< / prop >
< / set >
< / create > '
```
The collection `/USERNAME` will be created automatically, when the user
authenticates to Radicale for the first time. Clients with automatic discovery
of collections will only show calendars and address books that are direct
children of the path `/USERNAME/` .
Delete the collections by running something like:
```bash
2021-12-14 00:25:31 +01:00
curl -u user -X DELETE 'http://localhost:5232/user/calendar'
2020-04-18 13:23:50 +02:00
```
2024-06-18 18:44:47 +02:00
Note: requires config/option `permit_delete_collection = True`
2025-09-09 22:21:32 +02:00
### Authorization and Rights
2020-02-27 02:53:22 +01:00
2020-04-18 13:23:50 +02:00
This section describes the format of the rights file for the `from_file`
2020-02-27 02:53:22 +01:00
authentication backend. The configuration option `file` in the `rights`
section must point to the rights file.
2025-09-09 22:21:32 +02:00
The recommended rights method is `owner_only` . If access is granted
to calendars and address books outside the home directory of users
(that's `/USERNAME/` ), clients will not detect these collections automatically,
and will not show them to the users.
2020-02-27 02:53:22 +01:00
This is only useful if you access calendars and address books directly via URL.
An example rights file:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```ini
2020-04-18 13:23:50 +02:00
# Allow reading root collection for authenticated users
[root]
user: .+
collection:
2024-12-23 07:07:43 +01:00
permissions: R
2020-04-18 13:23:50 +02:00
2022-01-07 23:54:34 +01:00
# Allow reading and writing principal collection (same as username)
2020-04-18 13:23:50 +02:00
[principal]
user: .+
2020-04-22 19:20:24 +02:00
collection: {user}
2020-04-18 13:23:50 +02:00
permissions: RW
# Allow reading and writing calendars and address books that are direct
# children of the principal collection
[calendars]
user: .+
2020-04-22 19:20:24 +02:00
collection: {user}/[^/]+
2020-04-18 13:23:50 +02:00
permissions: rw
2020-02-27 02:53:22 +01:00
```
The titles of the sections are ignored (but must be unique). The keys `user`
and `collection` contain regular expressions, that are matched against the
2022-01-07 23:54:34 +01:00
username and the path of the collection. Permissions from the first
2020-02-27 02:53:22 +01:00
matching section are used. If no section matches, access gets denied.
2022-01-07 23:54:34 +01:00
The username is empty for anonymous users. Therefore, the regex `.+` only
2020-02-27 02:53:22 +01:00
matches authenticated users and `.*` matches everyone (including anonymous
users).
The path of the collection is separated by `/` and has no leading or trailing
`/` . Therefore, the path of the root collection is empty.
2020-04-22 19:20:24 +02:00
In the `collection` regex you can use `{user}` and get groups from the `user`
regex with `{0}` , `{1}` , etc.
2020-05-22 21:45:01 +02:00
In consequence of the parameter substitution you have to write `{{` and `}}`
2020-04-22 19:20:24 +02:00
if you want to use regular curly braces in the `user` and `collection` regexes.
2020-02-27 02:53:22 +01:00
2020-04-18 13:23:50 +02:00
The following `permissions` are recognized:
2021-12-14 00:25:31 +01:00
* **R:** read collections (excluding address books and calendars)
* **r:** read address book and calendar collections
* **i:** subset of **r** that only allows direct access via HTTP method GET
(CalDAV/CardDAV is susceptible to expensive search requests)
* **W:** write collections (excluding address books and calendars)
* **w:** write address book and calendar collections
2025-09-09 22:21:32 +02:00
* **D:** permit delete of collection in case `permit_delete_collection=False` _(>= 3.3.0)_
* **d:** forbid delete of collection in case `permit_delete_collection=True` _(>= 3.3.0)_
* **O:** permit overwrite of collection in case `permit_overwrite_collection=False`
* **o:** forbid overwrite of collection in case `permit_overwrite_collection=True`
2020-04-18 13:23:50 +02:00
2021-12-14 00:25:31 +01:00
### Storage
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
This document describes the layout and format of the file system storage,
the `multifilesystem` backend.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
It is safe to access and manipulate the data by hand or with scripts.
Scripts can be invoked manually, periodically (e.g. using
2020-02-27 02:53:22 +01:00
[cron ](https://manpages.debian.org/unstable/cron/cron.8.en.html )) or after each
change to the storage with the configuration option `hook` in the `storage`
2025-09-09 22:21:32 +02:00
section (e.g. [Versioning collections with Git ](#versioning-collections-with-git )).
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Layout
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
The file system comprises the following files and folders:
2021-12-14 00:25:31 +01:00
* `.Radicale.lock` : The lock file for locking the storage.
* `collection-root` : This folder contains all collections and items.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Each collection is represented by a folder. This folder may contain the file
2020-02-27 02:53:22 +01:00
`.Radicale.props` with all WebDAV properties of the collection encoded
as [JSON ](https://en.wikipedia.org/wiki/JSON ).
2025-09-09 22:21:32 +02:00
Each item in a calendar or address book collection is represented by
a file containing the item's iCalendar resp. vCard data.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
All files and folders, whose names start with a dot but not with `.Radicale.`
2020-02-27 02:53:22 +01:00
(internal files) are ignored.
2025-09-09 22:21:32 +02:00
Syntax errors in any of the files will cause all requests accessing
the faulty data to fail. The logging output should contain the names of the
2020-02-27 02:53:22 +01:00
culprits.
2020-05-22 21:45:01 +02:00
Caches and sync-tokens are stored in the `.Radicale.cache` folder inside of
collections.
2020-02-27 02:53:22 +01:00
This folder may be created or modified, while the storage is locked for shared
access.
In theory, it should be safe to delete the folder. Caches will be recreated
2025-09-09 22:21:32 +02:00
automatically and clients will be told that their sync-token is not valid
2020-02-27 02:53:22 +01:00
anymore.
You may encounter files or folders that start with `.Radicale.tmp-` .
Radicale uses them for atomic creation and deletion of files and folders.
2025-09-09 22:21:32 +02:00
They should be deleted after requests are finished but it is possible that
2020-02-27 02:53:22 +01:00
they are left behind when Radicale or the computer crashes.
2025-09-09 22:21:32 +02:00
You can safely delete them.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Locking
2020-02-27 02:53:22 +01:00
When the data is accessed by hand or by an externally invoked script,
the storage must be locked. The storage can be locked for exclusive or
shared access. It prevents Radicale from reading or writing the file system.
The storage is locked with exclusive access while the `hook` runs.
2021-12-14 00:25:31 +01:00
##### Linux shell scripts
2020-02-27 02:53:22 +01:00
Use the
[flock ](https://manpages.debian.org/unstable/util-linux/flock.1.en.html )
2025-09-09 22:21:32 +02:00
utility to acquire exclusive or shared locks for the commands you want to run
on Radicale's data.
2020-02-27 02:53:22 +01:00
```bash
2025-09-09 22:21:32 +02:00
# Exclusive lock for COMMAND
2020-02-27 02:53:22 +01:00
$ flock --exclusive /path/to/storage/.Radicale.lock COMMAND
2025-09-09 22:21:32 +02:00
# Shared lock for COMMAND
2020-02-27 02:53:22 +01:00
$ flock --shared /path/to/storage/.Radicale.lock COMMAND
```
2021-12-14 00:25:31 +01:00
##### Linux and MacOS
2020-02-27 02:53:22 +01:00
Use the
[flock ](https://manpages.debian.org/unstable/manpages-dev/flock.2.en.html )
syscall. Python provides it in the
[fcntl ](https://docs.python.org/3/library/fcntl.html#fcntl.flock ) module.
2021-12-14 00:25:31 +01:00
##### Windows
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
Use
[LockFile ](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202%28v=vs.85%29.aspx )
for exclusive access or
[LockFileEx ](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203%28v=vs.85%29.aspx )
which also supports shared access. Setting `nNumberOfBytesToLockLow` to `1`
and `nNumberOfBytesToLockHigh` to `0` works.
2021-12-14 00:25:31 +01:00
#### Manually creating collections
2020-04-18 13:23:50 +02:00
2025-09-09 22:21:32 +02:00
To create a new collection, you need to create the corresponding folder in the
2020-04-18 13:23:50 +02:00
file system storage (e.g. `collection-root/user/calendar` ).
2025-09-09 22:21:32 +02:00
To indicate to Radicale and clients that the collection is a calendar, you have to
2020-04-18 13:23:50 +02:00
create the file ``.Radicale.props` ` with the following content in the folder:
```json
{"tag": "VCALENDAR"}
```
2025-09-09 22:21:32 +02:00
The calendar is now available at the URL path (e.g. ``/user/calendar` `).
For address books ``.Radicale.props` ` must contain:
2020-04-18 13:23:50 +02:00
```json
{"tag": "VADDRESSBOOK"}
```
Calendar and address book collections must not have any child collections.
Clients with automatic discovery of collections will only show calendars and
2020-05-22 21:45:01 +02:00
address books that are direct children of the path `/USERNAME/` .
2020-04-18 13:23:50 +02:00
Delete collections by deleting the corresponding folders.
2024-11-24 17:10:07 +01:00
### Logging overview
2020-02-27 02:53:22 +01:00
Radicale logs to `stderr` . The verbosity of the log output can be controlled
2020-04-11 16:14:41 +02:00
with `--debug` command line argument or the `level` configuration option in
2024-11-24 17:10:07 +01:00
the [logging ](#logging ) section.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
### Architecture
2020-02-27 02:53:22 +01:00
2020-05-22 21:45:01 +02:00
Radicale is a small piece of software, but understanding it is not as
2020-04-18 13:23:50 +02:00
easy as it seems. But don't worry, reading this short section is enough to
2020-02-27 02:53:22 +01:00
understand what a CalDAV/CardDAV server is, and how Radicale's code is
organized.
2021-12-14 00:25:31 +01:00
#### Protocol overview
2020-02-27 02:53:22 +01:00
Here is a simple overview of the global architecture for reaching a calendar or
an address book through network:
2021-12-14 00:25:31 +01:00
| Part | Layer | Protocol or Format |
|----------|--------------------------|------------------------------------|
| Server | Calendar/Contact Storage | iCal/vCard |
| '' | Calendar/Contact Server | CalDAV/CardDAV Server |
| Transfer | Network | CalDAV/CardDAV (HTTP + TLS) |
| Client | Calendar/Contact Client | CalDAV/CardDAV Client |
| '' | GUI | Terminal, GTK, Web interface, etc. |
2020-02-27 02:53:22 +01:00
Radicale is **only the server part** of this architecture.
2025-09-09 22:21:32 +02:00
Please note:
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* CalDAV and CardDAV are extension protocols of WebDAV,
* WebDAV is an extension of the HTTP protocol.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
Radicale being a CalDAV/CardDAV server, can also be seen as a special WebDAV
2020-02-27 02:53:22 +01:00
and HTTP server.
Radicale is **not the client part** of this architecture. It means that
Radicale never draws calendars, address books, events and contacts on the
screen. It only stores them and give the possibility to share them online with
other people.
If you want to see or edit your events and your contacts, you have to use
another software called a client, that can be a "normal" applications with
icons and buttons, a terminal or another web application.
2021-12-14 00:25:31 +01:00
#### Code Architecture
2020-02-27 02:53:22 +01:00
2020-04-11 16:14:41 +02:00
The ``radicale` ` package offers the following modules.
2025-09-09 22:21:32 +02:00
* `__init__`
: Contains the entry point for WSGI.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `__main__`
: Provides the entry point for the ``radicale` ` executable and
2020-04-11 16:14:41 +02:00
includes the command line parser. It loads configuration files from
the default (or specified) paths and starts the internal server.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `app`
: This is the core part of Radicale, with the code for the CalDAV/CardDAV
2020-04-11 16:14:41 +02:00
server. The code managing the different HTTP requests according to the
CalDAV/CardDAV specification can be found here.
2025-09-09 22:21:32 +02:00
* `auth`
: Used for authenticating users based on username and password, mapping
2020-04-11 16:14:41 +02:00
usernames to internal users and optionally retrieving credentials from
the environment.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `config`
: Contains the code for managing configuration and loading settings from files.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `ìtem`
: Internal representation of address book and calendar entries. Based on
2024-11-24 16:46:19 +01:00
[VObject ](https://github.com/py-vobject/vobject/ ).
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `log`
: The logger for Radicale based on the default Python logging module.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `rights`
: This module is used by Radicale to manage access rights to collections,
2020-04-11 16:14:41 +02:00
address books and calendars.
2025-09-09 22:21:32 +02:00
* `server`
2020-04-11 16:14:41 +02:00
: The integrated HTTP server for standalone use.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `storage`
: This module contains the classes representing collections in Radicale and
2020-04-11 16:14:41 +02:00
the code for storing and loading them in the filesystem.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `web`
: This module contains the web interface.
2020-02-27 02:53:22 +01:00
2025-09-09 22:21:32 +02:00
* `utils`
: Contains general helper functions.
2020-04-11 16:14:41 +02:00
2025-09-09 22:21:32 +02:00
* `httputils`
: Contains helper functions for working with HTTP.
2020-04-11 16:14:41 +02:00
2025-09-09 22:21:32 +02:00
* `pathutils`
: Helper functions for working with paths and the filesystem.
2020-04-11 16:14:41 +02:00
2025-09-09 22:21:32 +02:00
* `xmlutils`
: Helper functions for working with the XML part of CalDAV/CardDAV requests
2020-04-11 16:14:41 +02:00
and responses. It's based on the ElementTree XML API.
2021-12-14 00:25:31 +01:00
### Plugins
2020-02-27 02:53:22 +01:00
Radicale can be extended by plugins for authentication, rights management and
storage. Plugins are **python** modules.
2025-09-09 22:21:32 +02:00
#### Getting started with plugin development
2020-02-27 02:53:22 +01:00
To get started we walk through the creation of a simple authentication
2020-04-11 16:14:41 +02:00
plugin, that accepts login attempts with a static password.
2020-02-27 02:53:22 +01:00
The easiest way to develop and install **python** modules is
[Distutils ](https://docs.python.org/3/distutils/setupscript.html ).
For a minimal setup create the file `setup.py` with the following content
in an empty folder:
```python
#!/usr/bin/env python3
from distutils.core import setup
2020-04-18 13:23:50 +02:00
setup(name="radicale_static_password_auth",
packages=["radicale_static_password_auth"])
2020-02-27 02:53:22 +01:00
```
2020-04-11 16:14:41 +02:00
In the same folder create the sub-folder `radicale_static_password_auth` .
The folder must have the same name as specified in `packages` above.
2020-02-27 02:53:22 +01:00
2020-04-11 16:14:41 +02:00
Create the file `__init__.py` in the `radicale_static_password_auth` folder
with the following content:
2020-02-27 02:53:22 +01:00
```python
from radicale.auth import BaseAuth
2020-04-11 16:14:41 +02:00
from radicale.log import logger
PLUGIN_CONFIG_SCHEMA = {"auth": {
"password": {"value": "", "type": str}}}
2020-02-27 02:53:22 +01:00
class Auth(BaseAuth):
2020-04-11 16:14:41 +02:00
def __init__ (self, configuration):
super().__init__(configuration.copy(PLUGIN_CONFIG_SCHEMA))
2020-02-27 02:53:22 +01:00
2025-02-06 21:56:03 -05:00
def _login(self, login, password):
2020-04-11 16:14:41 +02:00
# Get password from configuration option
static_password = self.configuration.get("auth", "password")
2020-02-27 02:53:22 +01:00
# Check authentication
2020-04-11 16:14:41 +02:00
logger.info("Login attempt by %r with password %r",
2020-05-03 21:00:47 +02:00
login, password)
2020-04-11 16:14:41 +02:00
if password == static_password:
2020-05-03 21:00:47 +02:00
return login
2020-04-11 16:14:41 +02:00
return ""
2020-02-27 02:53:22 +01:00
```
Install the python module by running the following command in the same folder
as `setup.py` :
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```bash
2020-05-03 21:00:47 +02:00
python3 -m pip install .
2020-02-27 02:53:22 +01:00
```
To make use this great creation in Radicale, set the configuration option
2020-04-11 16:14:41 +02:00
`type` in the `auth` section to `radicale_static_password_auth` :
2020-02-27 02:53:22 +01:00
```ini
[auth]
2020-04-11 16:14:41 +02:00
type = radicale_static_password_auth
password = secret
2020-02-27 02:53:22 +01:00
```
You can uninstall the module with:
2020-04-18 13:23:50 +02:00
2020-02-27 02:53:22 +01:00
```bash
2020-04-11 16:14:41 +02:00
python3 -m pip uninstall radicale_static_password_auth
2020-02-27 02:53:22 +01:00
```
2021-12-14 00:25:31 +01:00
#### Authentication plugins
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
This plugin type is used to check login credentials.
The module must contain a class `Auth` that extends
2020-04-11 16:14:41 +02:00
`radicale.auth.BaseAuth` . Take a look at the file `radicale/auth/__init__.py`
in Radicale's source code for more information.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Rights management plugins
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
This plugin type is used to check if a user has access to a path.
The module must contain a class `Rights` that extends
2020-04-11 16:14:41 +02:00
`radicale.rights.BaseRights` . Take a look at the file
`radicale/rights/__init__.py` in Radicale's source code for more information.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Web plugins
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
This plugin type is used to provide the web interface for Radicale.
The module must contain a class `Web` that extends
2020-04-11 16:14:41 +02:00
`radicale.web.BaseWeb` . Take a look at the file `radicale/web/__init__.py` in
2020-02-27 02:53:22 +01:00
Radicale's source code for more information.
2021-12-14 00:25:31 +01:00
#### Storage plugins
2020-02-27 13:50:30 +01:00
2020-02-27 02:53:22 +01:00
This plugin is used to store collections and items.
2020-04-11 16:14:41 +02:00
The module must contain a class `Storage` that extends
`radicale.storage.BaseStorage` . Take a look at the file
`radicale/storage/__init__.py` in Radicale's source code for more information.
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
## Contribute
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Report Bugs
2020-02-27 02:53:22 +01:00
Found a bug? Want a new feature? Report a new issue on the
[Radicale bug-tracker ](https://github.com/Kozea/Radicale/issues ).
2021-12-14 00:25:31 +01:00
#### Hack
2020-02-27 02:53:22 +01:00
Interested in hacking? Feel free to clone the
2020-04-11 16:14:41 +02:00
[git repository on GitHub ](https://github.com/Kozea/Radicale ) if you want to
2020-02-27 02:53:22 +01:00
add new features, fix bugs or update the documentation.
2021-12-14 00:25:31 +01:00
#### Documentation
2020-02-27 02:53:22 +01:00
To change or complement the documentation create a pull request to
2020-03-01 21:33:26 +01:00
[DOCUMENTATION.md ](https://github.com/Kozea/Radicale/blob/master/DOCUMENTATION.md ).
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
## Download
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### PyPI
2020-02-27 02:53:22 +01:00
Radicale is [available on PyPI ](https://pypi.python.org/pypi/Radicale/ ). To
install, just type as superuser:
2021-12-14 00:25:31 +01:00
```bash
python3 -m pip install --upgrade radicale
```
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Git Repository
2020-02-27 02:53:22 +01:00
If you want the development version of Radicale, take a look at the
[git repository on GitHub ](https://github.com/Kozea/Radicale/ ), or install it
directly with:
2021-12-14 00:25:31 +01:00
```bash
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
```
2020-02-27 02:53:22 +01:00
You can also download the content of the repository as an
[archive ](https://github.com/Kozea/Radicale/tarball/master ).
2021-12-14 00:25:31 +01:00
#### Source Packages
2020-02-27 02:53:22 +01:00
2020-04-11 16:14:41 +02:00
You can find the source packages of all releases on
[GitHub ](https://github.com/Kozea/Radicale/releases ).
2020-02-27 02:53:22 +01:00
2025-07-19 23:38:50 +05:30
#### Docker
Radicale is available as a [Docker image ](https://github.com/Kozea/Radicale/pkgs/container/radicale ) for platforms `linux/amd64` and `linux/arm64` . To install the latest version, run:
```bash
docker pull ghcr.io/kozea/radicale:latest
```
An example `docker-compose.yml` and detailed instructions will soon be updated.
2021-12-14 00:25:31 +01:00
#### Linux Distribution Packages
2020-02-27 02:53:22 +01:00
Radicale has been packaged for:
2021-12-14 00:25:31 +01:00
* [ArchLinux ](https://www.archlinux.org/packages/community/any/radicale/ ) by
David Runge
2025-04-13 07:04:38 +02:00
* [Debian ](https://packages.debian.org/radicale ) by Jonas Smedegaard
2021-12-14 00:25:31 +01:00
* [Gentoo ](https://packages.gentoo.org/packages/www-apps/radicale )
by René Neumann, Maxim Koltsov and Manuel Rüger
2024-06-06 06:05:56 +02:00
* [Fedora/EnterpriseLinux ](https://src.fedoraproject.org/rpms/radicale ) by Jorti
2021-12-14 00:25:31 +01:00
and Peter Bieringer
* [Mageia ](http://madb.mageia.org/package/show/application/0/name/radicale )
by Jani Välimaa
* [OpenBSD ](http://openports.se/productivity/radicale ) by Sergey Bronnikov,
Stuart Henderson and Ian Darwin
* [openSUSE ](http://software.opensuse.org/package/Radicale?search_term=radicale )
by Ákos Szőts and Rueckert
* [PyPM ](http://code.activestate.com/pypm/radicale/ )
* [Slackware ](http://schoepfer.info/slackware.xhtml#packages-network ) by
Johannes Schöpfer
* [Trisquel ](http://packages.trisquel.info/search?searchon=names&keywords=radicale )
* [Ubuntu ](http://packages.ubuntu.com/radicale ) by the MOTU and Jonas
Smedegaard
2020-02-27 02:53:22 +01:00
Radicale is also
2025-07-19 23:38:50 +05:30
[available on Cloudron ](https://cloudron.io/button.html?app=org.radicale.cloudronapp2 ).
2020-02-27 02:53:22 +01:00
If you are interested in creating packages for other Linux distributions, read
2020-04-18 13:23:50 +02:00
the ["Contribute" section ](#contribute ).
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
## About
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
#### Main Goals
2020-02-27 02:53:22 +01:00
Radicale is a complete calendar and contact storing and manipulating
solution. It can store multiple calendars and multiple address books.
Calendar and contact manipulation is available from both local and distant
accesses, possibly limited through authentication policies.
It aims to be a lightweight solution, easy to use, easy to install, easy to
configure. As a consequence, it requires few software dependencies and is
2020-05-22 21:45:01 +02:00
preconfigured to work out-of-the-box.
2020-02-27 02:53:22 +01:00
Radicale is written in Python. It runs on most of the UNIX-like platforms
(Linux, \*BSD, macOS) and Windows. It is free and open-source software.
2021-12-14 00:25:31 +01:00
#### What Radicale Will Never Be
2020-02-27 02:53:22 +01:00
Radicale is a server, not a client. No interfaces will be created to work with
2020-05-22 21:45:01 +02:00
the server.
2020-02-27 02:53:22 +01:00
CalDAV and CardDAV are not perfect protocols. We think that their main problem
is their complexity, that is why we decided not to implement the whole standard
but just enough to understand some of its client-side implementations.
2020-05-22 21:45:01 +02:00
CalDAV and CardDAV are the best open standards available, and they are quite
2020-02-27 02:53:22 +01:00
widely used by both clients and servers. We decided to use it, and we will not
use another one.
2021-12-14 00:25:31 +01:00
#### Technical Choices
2020-02-27 02:53:22 +01:00
Important global development choices have been decided before writing
code. They are very useful to understand why the Radicale Project is different
from other CalDAV and CardDAV servers, and why features are included or not in
the code.
2021-12-14 00:25:31 +01:00
##### Oriented to Calendar and Contact User Agents
2020-02-27 02:53:22 +01:00
Calendar and contact servers work with calendar and contact clients, using a
defined protocol. CalDAV and CardDAV are good protocols, covering lots of
features and use cases, but it is quite hard to implement fully.
Some calendar servers have been created to follow the CalDAV and CardDAV RFCs
as much as possible: [Davical ](http://www.davical.org/ ),
[Baïkal ](http://sabre.io/baikal/ ) and
[Darwin Calendar Server ](http://trac.calendarserver.org/ ), for example, are
2020-05-22 21:45:01 +02:00
much more respectful of CalDAV and CardDAV and can be used with many clients.
They are very good choices if you want to develop and test new CalDAV clients,
or if you have a possibly heterogeneous list of user agents.
2020-02-27 02:53:22 +01:00
Even if it tries it best to follow the RFCs, Radicale does not and **will not**
2020-05-22 21:45:01 +02:00
blindly implement the CalDAV and CardDAV standards. It is mainly designed to
2020-02-27 02:53:22 +01:00
support the CalDAV and CardDAV implementations of different clients.
2021-12-14 00:25:31 +01:00
##### Simple
2020-02-27 02:53:22 +01:00
Radicale is designed to be simple to install, simple to configure, simple to
use.
The installation is very easy, particularly with Linux: one dependency, no
superuser rights needed, no configuration required, no database. Installing and
launching the main script out-of-the-box, as a normal user, are often the only
steps to have a simple remote calendar and contact access.
Contrary to other servers that are often complicated, require high privileges
or need a strong configuration, the Radicale Server can (sometimes, if not
often) be launched in a couple of minutes, if you follow the
2021-12-14 22:28:33 +01:00
[tutorial ](#simple-5-minute-setup ).
2020-02-27 02:53:22 +01:00
2021-12-14 00:25:31 +01:00
##### Lazy
2020-02-27 02:53:22 +01:00
The CalDAV RFC defines what must be done, what can be done and what cannot be
2020-05-22 21:45:01 +02:00
done. Many violations of the protocol are totally defined and behaviors are
2020-02-27 02:53:22 +01:00
given in such cases.
Radicale often assumes that the clients are perfect and that protocol
violations do not exist. That is why most of the errors in client requests have
undetermined consequences for the lazy server that can reply good answers, bad
answers, or even no answer.
2021-12-14 00:25:31 +01:00
#### History
2020-02-27 02:53:22 +01:00
Radicale has been started as a (free topic) stupid school project replacing
another (assigned topic) even more stupid school project.
At the beginning, it was just a proof-of-concept. The main goal was to write a
small, dirty and simple CalDAV server working with Lightning, using no external
libraries. That's how we created a piece of code that's (quite) easy to
understand, to use and to hack.
The [first lines ](https://github.com/Kozea/Radicale/commit/b1591aea ) have been
added to the SVN (!) repository as I was drinking (many) beers at the very end
of 2008 (Python 2.6 and 3.0 were just released). It's now packaged for a
growing number of Linux distributions.
And that was fun going from here to there thanks to you!