1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Generate documentation

This commit is contained in:
Github Actions 2020-04-18 11:44:46 +00:00
parent 9586722387
commit 10e8cbe723

View file

@ -125,47 +125,39 @@
<li class="level4"><a href="#getting-started//installation">Installation</a></li> <li class="level4"><a href="#getting-started//installation">Installation</a></li>
<li class="level4"><a href="#getting-started//whats-new">What's New?</a></li> <li class="level4"><a href="#getting-started//whats-new">What's New?</a></li>
</ul></li> </ul></li>
<li class="level2"><a href="#tutorials">Tutorials</a>
<ul>
<li class="level3"><a href="#tutorials/simple-5-minute-setup">Simple 5-minute setup</a>
<ul>
<li class="level4"><a href="#tutorials/simple-5-minute-setup/linux--bsd">Linux / *BSD</a></li>
<li class="level4"><a href="#tutorials/simple-5-minute-setup/windows">Windows</a></li>
</ul></li>
<li class="level3"><a href="#tutorials/basic-configuration">Basic Configuration</a>
<ul>
<li class="level4"><a href="#tutorials/basic-configuration/authentication">Authentication</a></li>
<li class="level4"><a href="#tutorials/basic-configuration/addresses">Addresses</a></li>
<li class="level4"><a href="#tutorials/basic-configuration/storage">Storage</a></li>
<li class="level4"><a href="#tutorials/basic-configuration/limits">Limits</a></li>
</ul></li>
<li class="level3"><a href="#tutorials/running-as-a-service">Running as a service</a>
<ul>
<li class="level4"><a href="#tutorials/running-as-a-service/linux-with-systemd-system-wide">Linux with systemd system-wide</a></li>
<li class="level4"><a href="#tutorials/running-as-a-service/linux-with-systemd-as-a-user">Linux with systemd as a user</a></li>
<li class="level4"><a href="#tutorials/running-as-a-service/windows-with-nssm---the-non-sucking-service-manager">Windows with "NSSM - the Non-Sucking Service Manager"</a></li>
</ul></li>
<li class="level3"><a href="#tutorials/reverse-proxy">Reverse Proxy</a>
<ul>
<li class="level4"><a href="#tutorials/reverse-proxy/manage-user-accounts-with-the-reverse-proxy">Manage user accounts with the reverse proxy</a></li>
<li class="level4"><a href="#tutorials/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy">Secure connection between Radicale and the reverse proxy</a></li>
</ul></li>
<li class="level3"><a href="#tutorials/wsgi-server">WSGI Server</a>
<ul>
<li class="level4"><a href="#tutorials/wsgi-server/manage-user-accounts-with-the-wsgi-server">Manage user accounts with the WSGI server</a></li>
</ul></li>
<li class="level3"><a href="#tutorials/versioning-with-git">Versioning with Git</a></li>
</ul></li>
<li class="level2"><a href="#documentation">Documentation</a> <li class="level2"><a href="#documentation">Documentation</a>
<ul> <ul>
<li class="level4"><a href="#documentation//install-and-set-up">Install and Set Up</a></li>
<li class="level4"><a href="#documentation//use">Use</a></li>
<li class="level4"><a href="#documentation//configure">Configure</a></li>
<li class="level4"><a href="#documentation//hack">Hack</a></li>
<li class="level3"><a href="#documentation/tutorial">Tutorial</a>
<ul>
<li class="level4"><a href="#documentation/tutorial/linux--bsd">Linux / *BSD</a></li>
<li class="level4"><a href="#documentation/tutorial/windows">Windows</a></li>
<li class="level4"><a href="#documentation/tutorial/macos">MacOS</a></li>
</ul></li>
<li class="level3"><a href="#documentation/basic-setup">Basic Setup</a>
<ul>
<li class="level4"><a href="#documentation/basic-setup/configuration">Configuration</a></li>
<li class="level4"><a href="#documentation/basic-setup/authentication">Authentication</a></li>
<li class="level4"><a href="#documentation/basic-setup/addresses">Addresses</a></li>
<li class="level4"><a href="#documentation/basic-setup/storage">Storage</a></li>
<li class="level4"><a href="#documentation/basic-setup/limits">Limits</a></li>
<li class="level4"><a href="#documentation/basic-setup/running-as-a-service">Running as a service</a></li>
<li class="level4"><a href="#documentation/basic-setup/macos-with-launchd">MacOS with launchd</a></li>
<li class="level4"><a href="#documentation/basic-setup/windows-with-nssm---the-non-sucking-service-manager">Windows with "NSSM - the Non-Sucking Service Manager"</a></li>
</ul></li>
<li class="level3"><a href="#documentation/reverse-proxy">Reverse Proxy</a>
<ul>
<li class="level4"><a href="#documentation/reverse-proxy/manage-user-accounts-with-the-reverse-proxy">Manage user accounts with the reverse proxy</a></li>
<li class="level4"><a href="#documentation/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy">Secure connection between Radicale and the reverse proxy</a></li>
</ul></li>
<li class="level3"><a href="#documentation/wsgi">WSGI</a>
<ul>
<li class="level4"><a href="#documentation/wsgi/manage-user-accounts-with-the-wsgi-server">Manage user accounts with the WSGI server</a></li>
</ul></li>
<li class="level3"><a href="#documentation/versioning">Versioning</a></li>
<li class="level3"><a href="#documentation/clients">Clients</a>
<ul>
<li class="level4"><a href="#documentation/clients/davx⁵">DAVx⁵</a></li>
<li class="level4"><a href="#documentation/clients/gnome-calendar-contacts-and-evolution">GNOME Calendar, Contacts and Evolution</a></li>
<li class="level4"><a href="#documentation/clients/thunderbird">Thunderbird</a></li>
<li class="level4"><a href="#documentation/clients/infcloud-caldavzap-and-carddavmate">InfCloud, CalDavZAP and CardDavMATE</a></li>
<li class="level4"><a href="#documentation/clients/manual-creation-of-calendars-and-address-books">Manual creation of calendars and address books</a></li>
</ul></li>
<li class="level3"><a href="#documentation/configuration">Configuration</a> <li class="level3"><a href="#documentation/configuration">Configuration</a>
<ul> <ul>
<li class="level4"><a href="#documentation/configuration/server">server</a></li> <li class="level4"><a href="#documentation/configuration/server">server</a></li>
@ -177,16 +169,25 @@
<li class="level4"><a href="#documentation/configuration/logging">logging</a></li> <li class="level4"><a href="#documentation/configuration/logging">logging</a></li>
<li class="level4"><a href="#documentation/configuration/headers">headers</a></li> <li class="level4"><a href="#documentation/configuration/headers">headers</a></li>
</ul></li> </ul></li>
<li class="level3"><a href="#documentation/supported-clients">Supported Clients</a>
<ul>
<li class="level4"><a href="#documentation/supported-clients/davx⁵">DAVx⁵</a></li>
<li class="level4"><a href="#documentation/supported-clients/gnome-calendar-contacts-and-evolution">GNOME Calendar, Contacts and Evolution</a></li>
<li class="level4"><a href="#documentation/supported-clients/thunderbird">Thunderbird</a></li>
<li class="level4"><a href="#documentation/supported-clients/infcloud-caldavzap-and-carddavmate">InfCloud, CalDavZAP and CardDavMATE</a></li>
<li class="level4"><a href="#documentation/supported-clients/command-line">Command line</a></li>
</ul></li>
<li class="level3"><a href="#documentation/authentication-and-rights">Authentication and Rights</a></li> <li class="level3"><a href="#documentation/authentication-and-rights">Authentication and Rights</a></li>
<li class="level3"><a href="#documentation/storage">Storage</a> <li class="level3"><a href="#documentation/storage">Storage</a>
<ul> <ul>
<li class="level4"><a href="#documentation/storage/layout">Layout</a></li> <li class="level4"><a href="#documentation/storage/layout">Layout</a></li>
<li class="level4"><a href="#documentation/storage/locking">Locking</a></li> <li class="level4"><a href="#documentation/storage/locking">Locking</a></li>
<li class="level4"><a href="#documentation/storage/manually-creating-collections">Manually creating collections</a></li>
</ul></li> </ul></li>
<li class="level3"><a href="#documentation/logging">Logging</a></li> <li class="level3"><a href="#documentation/logging">Logging</a></li>
<li class="level3"><a href="#documentation/architecture">Architecture</a> <li class="level3"><a href="#documentation/architecture">Architecture</a>
<ul> <ul>
<li class="level4"><a href="#documentation/architecture/general-architecture">General Architecture</a></li> <li class="level4"><a href="#documentation/architecture/protocol-overview">Protocol overview</a></li>
<li class="level4"><a href="#documentation/architecture/code-architecture">Code Architecture</a></li> <li class="level4"><a href="#documentation/architecture/code-architecture">Code Architecture</a></li>
</ul></li> </ul></li>
<li class="level3"><a href="#documentation/plugins">Plugins</a> <li class="level3"><a href="#documentation/plugins">Plugins</a>
@ -229,14 +230,14 @@
<h4>About Radicale <a class="headerlink" href="#getting-started//about-radicale">&para;</a></h4> <h4>About Radicale <a class="headerlink" href="#getting-started//about-radicale">&para;</a></h4>
<p>Radicale is a small but powerful CalDAV (calendars, todo-lists) and CardDAV (contacts) server, that:</p> <p>Radicale is a small but powerful CalDAV (calendars, todo-lists) and CardDAV (contacts) server, that:</p>
<ul> <ul>
<li>Shares calendars through CalDAV, WebDAV and HTTP.</li> <li>Shares calendars and contact lists through CalDAV, CardDAV and HTTP.</li>
<li>Shares contacts through CardDAV, WebDAV and HTTP.</li>
<li>Supports events, todos, journal entries and business cards.</li> <li>Supports events, todos, journal entries and business cards.</li>
<li>Works out-of-the-box, no installation nor configuration required.</li> <li>Works out-of-the-box, no complicated setup or configuration required.</li>
<li>Can warn users on concurrent editing.</li>
<li>Can limit access by authentication.</li> <li>Can limit access by authentication.</li>
<li>Can secure connections.</li> <li>Can secure connections with TLS.</li>
<li>Works with many CalDAV and CardDAV clients.</li> <li>Works with many <a href="#documentation/supported-clients">CalDAV and CardDAV clients</a>.</li>
<li>Stores all data on the file system in a simple folder structure.</li>
<li>Can be extended with plugins.</li>
<li>Is GPLv3-licensed free software.</li> <li>Is GPLv3-licensed free software.</li>
</ul> </ul>
</section> </section>
@ -245,60 +246,24 @@
<p>Radicale is really easy to install and works out-of-the-box.</p> <p>Radicale is really easy to install and works out-of-the-box.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1"></a>$ <span class="ex">python3</span> -m pip install --upgrade radicale</span> <div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1"></a>$ <span class="ex">python3</span> -m pip install --upgrade radicale</span>
<span id="cb1-2"><a href="#cb1-2"></a>$ <span class="ex">python3</span> -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections</span></code></pre></div> <span id="cb1-2"><a href="#cb1-2"></a>$ <span class="ex">python3</span> -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections</span></code></pre></div>
<p>When your server is launched, you can check that everything's OK by going to <a href="http://localhost:5232/">http://localhost:5232/</a> with your browser! You can login with any username and password.</p> <p>When the server is launched, open <a href="http://localhost:5232/">http://localhost:5232/</a> in your browser! You can login with any username and password.</p>
<p>Want more? Why don't you check our wonderful <a href="#documentation">documentation</a>?</p> <p>Want more? Check the <a href="#tutorials">tutorials</a> and the <a href="#documentation">documentation</a>.</p>
</section> </section>
<section class="level4" id="getting-started//whats-new"> <section class="level4" id="getting-started//whats-new">
<h4>What's New? <a class="headerlink" href="#getting-started//whats-new">&para;</a></h4> <h4>What's New? <a class="headerlink" href="#getting-started//whats-new">&para;</a></h4>
<p><a href="https://github.com/Kozea/Radicale/blob/master/NEWS.md">Read the latest news</a></p> <p>Read the <a href="https://github.com/Kozea/Radicale/blob/master/NEWS.md">changelog on GitHub.</a></p>
</section> </section>
</section> </section>
<section class="level2" id="documentation"> <section class="level2" id="tutorials">
<h2>Documentation <a class="headerlink" href="#documentation">&para;</a></h2> <h2>Tutorials <a class="headerlink" href="#tutorials">&para;</a></h2>
<section class="level4" id="documentation//install-and-set-up"> <section class="level3" id="tutorials/simple-5-minute-setup">
<h4>Install and Set Up <a class="headerlink" href="#documentation//install-and-set-up">&para;</a></h4> <h3>Simple 5-minute setup <a class="headerlink" href="#tutorials/simple-5-minute-setup">&para;</a></h3>
<p>You're new to Radicale and you want to know how to use it? Welcome aboard!</p> <p>You want to try Radicale but only have 5 minutes free in your calendar? Let's go right now and play a little bit with Radicale!</p>
<ul> <p>When everything works, you can get a <a href="#documentation/supported-clients">client</a> and start creating calendars and address books. The server <strong>only</strong> binds to localhost (is <strong>not</strong> reachable over the network) and you can log in with any user name and password. If Radicale fits your needs, it may be time for <a href="#tutorials/basic-configuration">some basic configuration</a>.</p>
<li><a href="#about">What is Radicale?</a></li>
<li><a href="#documentation/tutorial">A really simple 5-minute tutorial.</a></li>
<li><a href="#documentation/basic-setup">A simple but solid setup.</a></li>
<li><a href="#documentation/reverse-proxy">Run behind a reverse proxy.</a></li>
<li><a href="#documentation/wsgi">Run with a WSGI server.</a></li>
<li><a href="#documentation/versioning">Track all changes to calendars and address books with Git.</a></li>
</ul>
</section>
<section class="level4" id="documentation//use">
<h4>Use <a class="headerlink" href="#documentation//use">&para;</a></h4>
<ul>
<li><a href="#documentation/clients">Which clients are supported?</a></li>
</ul>
</section>
<section class="level4" id="documentation//configure">
<h4>Configure <a class="headerlink" href="#documentation//configure">&para;</a></h4>
<p>Now that you have Radicale running, let's see what we can configure to make it fit your needs.</p>
<ul>
<li><a href="#documentation/configuration">What can I configure?</a></li>
<li><a href="#documentation/authentication-and-rights">Authentication &amp; Rights.</a></li>
<li><a href="#documentation/storage">Storage.</a></li>
</ul>
</section>
<section class="level4" id="documentation//hack">
<h4>Hack <a class="headerlink" href="#documentation//hack">&para;</a></h4>
<p>Using is fun, but hacking is soooooooo coooooool. Radicale is a really small and simple piece of code, it may be the perfect project to start hacking!</p>
<ul>
<li><a href="#documentation/architecture">How does Radicale work?</a></li>
<li><a href="#documentation/plugins">Plugins.</a></li>
<li><a href="#contribute">Adding or fixing documentation.</a></li>
</ul>
</section>
<section class="level3" id="documentation/tutorial">
<h3>Tutorial <a class="headerlink" href="#documentation/tutorial">&para;</a></h3>
<p>You want to try Radicale but only have 5 minutes free in your calendar? Let's go right now! You won't have the best installation ever, but it will be enough to play a little bit with Radicale.</p>
<p>When everything works, you can get a <a href="#documentation/clients">client</a> and start creating calendars and address books. The server <strong>only</strong> binds to localhost (is <strong>not</strong> reachable over the network) and you can log in with any user name and password. If Radicale fits your needs, it may be time for <a href="#documentation/basic-setup">some basic configuration</a>.</p>
<p>Follow one of the chapters below depending on your operating system.</p> <p>Follow one of the chapters below depending on your operating system.</p>
<section class="level4" id="documentation/tutorial/linux--bsd"> <section class="level4" id="tutorials/simple-5-minute-setup/linux--bsd">
<h4>Linux / *BSD <a class="headerlink" href="#documentation/tutorial/linux--bsd">&para;</a></h4> <h4>Linux / *BSD <a class="headerlink" href="#tutorials/simple-5-minute-setup/linux--bsd">&para;</a></h4>
<p>First of all, make sure that <strong>python</strong> 3.3 or later (<strong>python</strong> &ge; 3.6 is recommended) and <strong>pip</strong> are installed. On most distributions it should be enough to install the package <code>python3-pip</code>.</p> <p>First of all, make sure that <strong>python</strong> 3.5 or later (<strong>python</strong> &ge; 3.6 is recommended) and <strong>pip</strong> are installed. On most distributions it should be enough to install the package <code>python3-pip</code>.</p>
<p>Then open a console and type:</p> <p>Then open a console and type:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1"></a><span class="co"># Run the following command as root or</span></span> <div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1"></a><span class="co"># Run the following command as root or</span></span>
<span id="cb2-2"><a href="#cb2-2"></a><span class="co"># add the --user argument to only install for the current user</span></span> <span id="cb2-2"><a href="#cb2-2"></a><span class="co"># add the --user argument to only install for the current user</span></span>
@ -306,34 +271,27 @@
<span id="cb2-4"><a href="#cb2-4"></a>$ <span class="ex">python3</span> -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections</span></code></pre></div> <span id="cb2-4"><a href="#cb2-4"></a>$ <span class="ex">python3</span> -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections</span></code></pre></div>
<p>Victory! Open <a href="http://localhost:5232/">http://localhost:5232/</a> in your browser! You can login with any username and password.</p> <p>Victory! Open <a href="http://localhost:5232/">http://localhost:5232/</a> in your browser! You can login with any username and password.</p>
</section> </section>
<section class="level4" id="documentation/tutorial/windows"> <section class="level4" id="tutorials/simple-5-minute-setup/windows">
<h4>Windows <a class="headerlink" href="#documentation/tutorial/windows">&para;</a></h4> <h4>Windows <a class="headerlink" href="#tutorials/simple-5-minute-setup/windows">&para;</a></h4>
<p>The first step is to install Python. Go to <a href="https://python.org">python.org</a> 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!</p> <p>The first step is to install Python. Go to <a href="https://python.org">python.org</a> 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!</p>
<p>Launch a command prompt and type:</p> <p>Launch a command prompt and type:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode powershell"><code class="sourceCode powershell"><span id="cb3-1"><a href="#cb3-1"></a>C:\Users\User&gt; python -m pip install --upgrade radicale</span> <div class="sourceCode" id="cb3"><pre class="sourceCode powershell"><code class="sourceCode powershell"><span id="cb3-1"><a href="#cb3-1"></a>C:\Users\User&gt; python -m pip install --upgrade radicale</span>
<span id="cb3-2"><a href="#cb3-2"></a>C:\Users\User&gt; python -m radicale --storage-filesystem-folder=~/radicale/collections</span></code></pre></div> <span id="cb3-2"><a href="#cb3-2"></a>C:\Users\User&gt; python -m radicale --storage-filesystem-folder=~/radicale/collections</span></code></pre></div>
<p>Victory! Open <a href="http://localhost:5232/">http://localhost:5232/</a> in your browser! You can login with any username and password.</p> <p>Victory! Open <a href="http://localhost:5232/">http://localhost:5232/</a> in your browser! You can login with any username and password.</p>
</section> </section>
<section class="level4" id="documentation/tutorial/macos">
<h4>MacOS <a class="headerlink" href="#documentation/tutorial/macos">&para;</a></h4>
<p><em>To be written.</em></p>
</section> </section>
</section> <section class="level3" id="tutorials/basic-configuration">
<section class="level3" id="documentation/basic-setup"> <h3>Basic Configuration <a class="headerlink" href="#tutorials/basic-configuration">&para;</a></h3>
<h3>Basic Setup <a class="headerlink" href="#documentation/basic-setup">&para;</a></h3> <p>Installation instructions can be found in the <a href="#tutorials/simple-5-minute-setup">simple 5-minute setup</a> tutorial.</p>
<p>Installation instructions can be found on the <a href="#documentation/tutorial">Tutorial</a> page.</p>
<section class="level4" id="documentation/basic-setup/configuration">
<h4>Configuration <a class="headerlink" href="#documentation/basic-setup/configuration">&para;</a></h4>
<p>Radicale tries to load configuration files from <code>/etc/radicale/config</code> and <code>~/.config/radicale/config</code>. Custom paths can be specified with the <code>--config /path/to/config</code> command line argument or the <code>RADICALE_CONFIG</code> environment variable. Multiple configuration files can be separated by <code>:</code> (resp. <code>;</code> on Windows). Paths that start with <code>?</code> are optional.</p> <p>Radicale tries to load configuration files from <code>/etc/radicale/config</code> and <code>~/.config/radicale/config</code>. Custom paths can be specified with the <code>--config /path/to/config</code> command line argument or the <code>RADICALE_CONFIG</code> environment variable. Multiple configuration files can be separated by <code>:</code> (resp. <code>;</code> on Windows). Paths that start with <code>?</code> are optional.</p>
<p>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.)</p> <p>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.)</p>
<p>All configuration options are described in detail on the <a href="#documentation/configuration">Configuration</a> page.</p> <p>All configuration options are described in detail in the <a href="#documentation/configuration">Configuration</a> section.</p>
</section> <section class="level4" id="tutorials/basic-configuration/authentication">
<section class="level4" id="documentation/basic-setup/authentication"> <h4>Authentication <a class="headerlink" href="#tutorials/basic-configuration/authentication">&para;</a></h4>
<h4>Authentication <a class="headerlink" href="#documentation/basic-setup/authentication">&para;</a></h4>
<p>In its default configuration Radicale doesn't check user names or passwords. If the server is reachable over a network, you should change this.</p> <p>In its default configuration Radicale doesn't check user names or passwords. If the server is reachable over a network, you should change this.</p>
<p>First a <code>users</code> file with all user names and passwords must be created. It can be stored in the same directory as the configuration file.</p> <p>First a <code>users</code> file with all user names and passwords must be created. It can be stored in the same directory as the configuration file.</p>
<section class="level5" id="documentation/basic-setup/authentication/the-secure-way"> <section class="level5" id="tutorials/basic-configuration/authentication/the-secure-way">
<h5>The secure way <a class="headerlink" href="#documentation/basic-setup/authentication/the-secure-way">&para;</a></h5> <h5>The secure way <a class="headerlink" href="#tutorials/basic-configuration/authentication/the-secure-way">&para;</a></h5>
<p>The <code>users</code> file can be created and managed with <a href="https://httpd.apache.org/docs/current/programs/htpasswd.html">htpasswd</a>:</p> <p>The <code>users</code> file can be created and managed with <a href="https://httpd.apache.org/docs/current/programs/htpasswd.html">htpasswd</a>:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1"></a><span class="co"># Create a new htpasswd file with the user "user1"</span></span> <div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1"></a><span class="co"># Create a new htpasswd file with the user "user1"</span></span>
<span id="cb4-2"><a href="#cb4-2"></a>$ <span class="ex">htpasswd</span> -c /path/to/users user1</span> <span id="cb4-2"><a href="#cb4-2"></a>$ <span class="ex">htpasswd</span> -c /path/to/users user1</span>
@ -350,8 +308,8 @@
<span id="cb5-4"><a href="#cb5-4"></a><span class="co"># encryption method used in the htpasswd file</span></span> <span id="cb5-4"><a href="#cb5-4"></a><span class="co"># encryption method used in the htpasswd file</span></span>
<span id="cb5-5"><a href="#cb5-5"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span></code></pre></div> <span id="cb5-5"><a href="#cb5-5"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span></code></pre></div>
</section> </section>
<section class="level5" id="documentation/basic-setup/authentication/the-simple-but-insecure-way"> <section class="level5" id="tutorials/basic-configuration/authentication/the-simple-but-insecure-way">
<h5>The simple but insecure way <a class="headerlink" href="#documentation/basic-setup/authentication/the-simple-but-insecure-way">&para;</a></h5> <h5>The simple but insecure way <a class="headerlink" href="#tutorials/basic-configuration/authentication/the-simple-but-insecure-way">&para;</a></h5>
<p>Create the <code>users</code> file by hand with lines containing the user name and password separated by <code>:</code>. Example:</p> <p>Create the <code>users</code> file by hand with lines containing the user name and password separated by <code>:</code>. Example:</p>
<pre class="htpasswd"><code>user1:password1 <pre class="htpasswd"><code>user1:password1
user2:password2 user2:password2
@ -364,21 +322,21 @@ user2:password2
<span id="cb7-5"><a href="#cb7-5"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> plain</span></span></code></pre></div> <span id="cb7-5"><a href="#cb7-5"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> plain</span></span></code></pre></div>
</section> </section>
</section> </section>
<section class="level4" id="documentation/basic-setup/addresses"> <section class="level4" id="tutorials/basic-configuration/addresses">
<h4>Addresses <a class="headerlink" href="#documentation/basic-setup/addresses">&para;</a></h4> <h4>Addresses <a class="headerlink" href="#tutorials/basic-configuration/addresses">&para;</a></h4>
<p>The default configuration binds the server to localhost. It can't be reached from other computers. This can be changed with the following configuration options (IPv4 and IPv6):</p> <p>The default configuration binds the server to localhost. It can't be reached from other computers. This can be changed with the following configuration options (IPv4 and IPv6):</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb8-1"><a href="#cb8-1"></a><span class="kw">[server]</span></span> <div class="sourceCode" id="cb8"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb8-1"><a href="#cb8-1"></a><span class="kw">[server]</span></span>
<span id="cb8-2"><a href="#cb8-2"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> </span><span class="dv">0</span><span class="st">.</span><span class="dv">0</span><span class="st">.</span><span class="fl">0.0</span><span class="st">:</span><span class="dv">5232</span><span class="st">, [::]:</span><span class="dv">5232</span></span></code></pre></div> <span id="cb8-2"><a href="#cb8-2"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> </span><span class="dv">0</span><span class="st">.</span><span class="dv">0</span><span class="st">.</span><span class="fl">0.0</span><span class="st">:</span><span class="dv">5232</span><span class="st">, [::]:</span><span class="dv">5232</span></span></code></pre></div>
</section> </section>
<section class="level4" id="documentation/basic-setup/storage"> <section class="level4" id="tutorials/basic-configuration/storage">
<h4>Storage <a class="headerlink" href="#documentation/basic-setup/storage">&para;</a></h4> <h4>Storage <a class="headerlink" href="#tutorials/basic-configuration/storage">&para;</a></h4>
<p>Data is stored in the folder <code>/var/lib/radicale/collections</code>. The path can be changed with the following configuration:</p> <p>Data is stored in the folder <code>/var/lib/radicale/collections</code>. The path can be changed with the following configuration:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb9-1"><a href="#cb9-1"></a><span class="kw">[storage]</span></span> <div class="sourceCode" id="cb9"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb9-1"><a href="#cb9-1"></a><span class="kw">[storage]</span></span>
<span id="cb9-2"><a href="#cb9-2"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> /path/to/storage</span></span></code></pre></div> <span id="cb9-2"><a href="#cb9-2"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> /path/to/storage</span></span></code></pre></div>
<p><strong>Security:</strong> The storage folder should not be readable by unauthorized users. Otherwise, they can read the calendar data and lock the storage. You can find OS dependent instructions in the <strong>Running as a service</strong> section.</p> <p><strong>Security:</strong> The storage folder should not be readable by unauthorized users. Otherwise, they can read the calendar data and lock the storage. You can find OS dependent instructions in the <strong>Running as a service</strong> section.</p>
</section> </section>
<section class="level4" id="documentation/basic-setup/limits"> <section class="level4" id="tutorials/basic-configuration/limits">
<h4>Limits <a class="headerlink" href="#documentation/basic-setup/limits">&para;</a></h4> <h4>Limits <a class="headerlink" href="#tutorials/basic-configuration/limits">&para;</a></h4>
<p>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.</p> <p>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.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb10-1"><a href="#cb10-1"></a><span class="kw">[server]</span></span> <div class="sourceCode" id="cb10"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb10-1"><a href="#cb10-1"></a><span class="kw">[server]</span></span>
<span id="cb10-2"><a href="#cb10-2"></a><span class="dt">max_connections </span><span class="ot">=</span><span class="st"> </span><span class="dv">20</span></span> <span id="cb10-2"><a href="#cb10-2"></a><span class="dt">max_connections </span><span class="ot">=</span><span class="st"> </span><span class="dv">20</span></span>
@ -391,79 +349,75 @@ user2:password2
<span id="cb10-9"><a href="#cb10-9"></a><span class="co"># Average delay after failed login attempts in seconds</span></span> <span id="cb10-9"><a href="#cb10-9"></a><span class="co"># Average delay after failed login attempts in seconds</span></span>
<span id="cb10-10"><a href="#cb10-10"></a><span class="dt">delay </span><span class="ot">=</span><span class="st"> </span><span class="dv">1</span></span></code></pre></div> <span id="cb10-10"><a href="#cb10-10"></a><span class="dt">delay </span><span class="ot">=</span><span class="st"> </span><span class="dv">1</span></span></code></pre></div>
</section> </section>
<section class="level4" id="documentation/basic-setup/running-as-a-service">
<h4>Running as a service <a class="headerlink" href="#documentation/basic-setup/running-as-a-service">&para;</a></h4>
<p>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.</p>
<section class="level5" id="documentation/basic-setup/running-as-a-service/linux-with-systemd-as-a-user">
<h5>Linux with systemd as a user <a class="headerlink" href="#documentation/basic-setup/running-as-a-service/linux-with-systemd-as-a-user">&para;</a></h5>
<p>Create the file <code>~/.config/systemd/user/radicale.service</code>:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb11-1"><a href="#cb11-1"></a><span class="kw">[Unit]</span></span>
<span id="cb11-2"><a href="#cb11-2"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">A simple CalDAV (calendar) and CardDAV (contact) server</span></span>
<span id="cb11-3"><a href="#cb11-3"></a></span>
<span id="cb11-4"><a href="#cb11-4"></a><span class="kw">[Service]</span></span>
<span id="cb11-5"><a href="#cb11-5"></a><span class="dt">ExecStart</span><span class="ot">=</span><span class="st">/usr/bin/env python3 -m radicale</span></span>
<span id="cb11-6"><a href="#cb11-6"></a><span class="dt">Restart</span><span class="ot">=</span><span class="kw">on</span><span class="st">-failure</span></span>
<span id="cb11-7"><a href="#cb11-7"></a></span>
<span id="cb11-8"><a href="#cb11-8"></a><span class="kw">[Install]</span></span>
<span id="cb11-9"><a href="#cb11-9"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="kw">default</span><span class="st">.target</span></span></code></pre></div>
<p>Radicale will load the configuration file from <code>~/.config/radicale/config</code>. You should set the configuration option <code>filesystem_folder</code> in the <code>storage</code> section to something like <code>~/.var/lib/radicale/collections</code>.</p>
<p>To enable and manage the service run:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1"></a><span class="co"># Enable the service</span></span>
<span id="cb12-2"><a href="#cb12-2"></a>$ <span class="ex">systemctl</span> --user enable radicale</span>
<span id="cb12-3"><a href="#cb12-3"></a><span class="co"># Start the service</span></span>
<span id="cb12-4"><a href="#cb12-4"></a>$ <span class="ex">systemctl</span> --user start radicale</span>
<span id="cb12-5"><a href="#cb12-5"></a><span class="co"># Check the status of the service</span></span>
<span id="cb12-6"><a href="#cb12-6"></a>$ <span class="ex">systemctl</span> --user status radicale</span>
<span id="cb12-7"><a href="#cb12-7"></a><span class="co"># View all log messages</span></span>
<span id="cb12-8"><a href="#cb12-8"></a>$ <span class="ex">journalctl</span> --user --unit radicale.service</span></code></pre></div>
</section> </section>
<section class="level5" id="documentation/basic-setup/running-as-a-service/linux-with-systemd-system-wide"> <section class="level3" id="tutorials/running-as-a-service">
<h5>Linux with systemd system-wide <a class="headerlink" href="#documentation/basic-setup/running-as-a-service/linux-with-systemd-system-wide">&para;</a></h5> <h3>Running as a service <a class="headerlink" href="#tutorials/running-as-a-service">&para;</a></h3>
<p>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.</p>
<section class="level4" id="tutorials/running-as-a-service/linux-with-systemd-system-wide">
<h4>Linux with systemd system-wide <a class="headerlink" href="#tutorials/running-as-a-service/linux-with-systemd-system-wide">&para;</a></h4>
<p>Create the <strong>radicale</strong> user and group for the Radicale service. (Run <code>useradd --system --home-dir / --shell /sbin/nologin radicale</code> as root.) The storage folder must be writable by <strong>radicale</strong>. (Run <code>mkdir -p /var/lib/radicale/collections &amp;&amp; chown -R radicale:radicale /var/lib/radicale/collections</code> as root.)</p> <p>Create the <strong>radicale</strong> user and group for the Radicale service. (Run <code>useradd --system --home-dir / --shell /sbin/nologin radicale</code> as root.) The storage folder must be writable by <strong>radicale</strong>. (Run <code>mkdir -p /var/lib/radicale/collections &amp;&amp; chown -R radicale:radicale /var/lib/radicale/collections</code> as root.)</p>
<p><strong>Security:</strong> The storage should not be readable by others. (Run <code>chmod -R o= /var/lib/radicale/collections</code> as root.)</p> <p><strong>Security:</strong> The storage should not be readable by others. (Run <code>chmod -R o= /var/lib/radicale/collections</code> as root.)</p>
<p>Create the file <code>/etc/systemd/system/radicale.service</code>:</p> <p>Create the file <code>/etc/systemd/system/radicale.service</code>:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb13-1"><a href="#cb13-1"></a><span class="kw">[Unit]</span></span> <div class="sourceCode" id="cb11"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb11-1"><a href="#cb11-1"></a><span class="kw">[Unit]</span></span>
<span id="cb13-2"><a href="#cb13-2"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">A simple CalDAV (calendar) and CardDAV (contact) server</span></span> <span id="cb11-2"><a href="#cb11-2"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">A simple CalDAV (calendar) and CardDAV (contact) server</span></span>
<span id="cb13-3"><a href="#cb13-3"></a><span class="dt">After</span><span class="ot">=</span><span class="st">network.target</span></span> <span id="cb11-3"><a href="#cb11-3"></a><span class="dt">After</span><span class="ot">=</span><span class="st">network.target</span></span>
<span id="cb13-4"><a href="#cb13-4"></a><span class="dt">Requires</span><span class="ot">=</span><span class="st">network.target</span></span> <span id="cb11-4"><a href="#cb11-4"></a><span class="dt">Requires</span><span class="ot">=</span><span class="st">network.target</span></span>
<span id="cb13-5"><a href="#cb13-5"></a></span> <span id="cb11-5"><a href="#cb11-5"></a></span>
<span id="cb13-6"><a href="#cb13-6"></a><span class="kw">[Service]</span></span> <span id="cb11-6"><a href="#cb11-6"></a><span class="kw">[Service]</span></span>
<span id="cb13-7"><a href="#cb13-7"></a><span class="dt">ExecStart</span><span class="ot">=</span><span class="st">/usr/bin/env python3 -m radicale</span></span> <span id="cb11-7"><a href="#cb11-7"></a><span class="dt">ExecStart</span><span class="ot">=</span><span class="st">/usr/bin/env python3 -m radicale</span></span>
<span id="cb13-8"><a href="#cb13-8"></a><span class="dt">Restart</span><span class="ot">=</span><span class="kw">on</span><span class="st">-failure</span></span> <span id="cb11-8"><a href="#cb11-8"></a><span class="dt">Restart</span><span class="ot">=</span><span class="kw">on</span><span class="st">-failure</span></span>
<span id="cb13-9"><a href="#cb13-9"></a><span class="dt">User</span><span class="ot">=</span><span class="st">radicale</span></span> <span id="cb11-9"><a href="#cb11-9"></a><span class="dt">User</span><span class="ot">=</span><span class="st">radicale</span></span>
<span id="cb13-10"><a href="#cb13-10"></a><span class="co"># Deny other users access to the calendar data</span></span> <span id="cb11-10"><a href="#cb11-10"></a><span class="co"># Deny other users access to the calendar data</span></span>
<span id="cb13-11"><a href="#cb13-11"></a><span class="dt">UMask</span><span class="ot">=</span><span class="dv">0027</span></span> <span id="cb11-11"><a href="#cb11-11"></a><span class="dt">UMask</span><span class="ot">=</span><span class="dv">0027</span></span>
<span id="cb13-12"><a href="#cb13-12"></a><span class="co"># Optional security settings</span></span> <span id="cb11-12"><a href="#cb11-12"></a><span class="co"># Optional security settings</span></span>
<span id="cb13-13"><a href="#cb13-13"></a><span class="dt">PrivateTmp</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-13"><a href="#cb11-13"></a><span class="dt">PrivateTmp</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-14"><a href="#cb13-14"></a><span class="dt">ProtectSystem</span><span class="ot">=</span><span class="st">strict</span></span> <span id="cb11-14"><a href="#cb11-14"></a><span class="dt">ProtectSystem</span><span class="ot">=</span><span class="st">strict</span></span>
<span id="cb13-15"><a href="#cb13-15"></a><span class="dt">ProtectHome</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-15"><a href="#cb11-15"></a><span class="dt">ProtectHome</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-16"><a href="#cb13-16"></a><span class="dt">PrivateDevices</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-16"><a href="#cb11-16"></a><span class="dt">PrivateDevices</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-17"><a href="#cb13-17"></a><span class="dt">ProtectKernelTunables</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-17"><a href="#cb11-17"></a><span class="dt">ProtectKernelTunables</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-18"><a href="#cb13-18"></a><span class="dt">ProtectKernelModules</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-18"><a href="#cb11-18"></a><span class="dt">ProtectKernelModules</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-19"><a href="#cb13-19"></a><span class="dt">ProtectControlGroups</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-19"><a href="#cb11-19"></a><span class="dt">ProtectControlGroups</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-20"><a href="#cb13-20"></a><span class="dt">NoNewPrivileges</span><span class="ot">=</span><span class="kw">true</span></span> <span id="cb11-20"><a href="#cb11-20"></a><span class="dt">NoNewPrivileges</span><span class="ot">=</span><span class="kw">true</span></span>
<span id="cb13-21"><a href="#cb13-21"></a><span class="dt">ReadWritePaths</span><span class="ot">=</span><span class="st">/var/lib/radicale/collections</span></span> <span id="cb11-21"><a href="#cb11-21"></a><span class="dt">ReadWritePaths</span><span class="ot">=</span><span class="st">/var/lib/radicale/collections</span></span>
<span id="cb13-22"><a href="#cb13-22"></a></span> <span id="cb11-22"><a href="#cb11-22"></a></span>
<span id="cb13-23"><a href="#cb13-23"></a><span class="kw">[Install]</span></span> <span id="cb11-23"><a href="#cb11-23"></a><span class="kw">[Install]</span></span>
<span id="cb13-24"><a href="#cb13-24"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="st">multi-user.target</span></span></code></pre></div> <span id="cb11-24"><a href="#cb11-24"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="st">multi-user.target</span></span></code></pre></div>
<p>Radicale will load the configuration file from <code>/etc/radicale/config</code>.</p> <p>Radicale will load the configuration file from <code>/etc/radicale/config</code>.</p>
<p>To enable and manage the service run:</p> <p>To enable and manage the service run:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1"></a><span class="co"># Enable the service</span></span>
<span id="cb12-2"><a href="#cb12-2"></a>$ <span class="ex">systemctl</span> enable radicale</span>
<span id="cb12-3"><a href="#cb12-3"></a><span class="co"># Start the service</span></span>
<span id="cb12-4"><a href="#cb12-4"></a>$ <span class="ex">systemctl</span> start radicale</span>
<span id="cb12-5"><a href="#cb12-5"></a><span class="co"># Check the status of the service</span></span>
<span id="cb12-6"><a href="#cb12-6"></a>$ <span class="ex">systemctl</span> status radicale</span>
<span id="cb12-7"><a href="#cb12-7"></a><span class="co"># View all log messages</span></span>
<span id="cb12-8"><a href="#cb12-8"></a>$ <span class="ex">journalctl</span> --unit radicale.service</span></code></pre></div>
</section>
<section class="level4" id="tutorials/running-as-a-service/linux-with-systemd-as-a-user">
<h4>Linux with systemd as a user <a class="headerlink" href="#tutorials/running-as-a-service/linux-with-systemd-as-a-user">&para;</a></h4>
<p>Create the file <code>~/.config/systemd/user/radicale.service</code>:</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb13-1"><a href="#cb13-1"></a><span class="kw">[Unit]</span></span>
<span id="cb13-2"><a href="#cb13-2"></a><span class="dt">Description</span><span class="ot">=</span><span class="st">A simple CalDAV (calendar) and CardDAV (contact) server</span></span>
<span id="cb13-3"><a href="#cb13-3"></a></span>
<span id="cb13-4"><a href="#cb13-4"></a><span class="kw">[Service]</span></span>
<span id="cb13-5"><a href="#cb13-5"></a><span class="dt">ExecStart</span><span class="ot">=</span><span class="st">/usr/bin/env python3 -m radicale</span></span>
<span id="cb13-6"><a href="#cb13-6"></a><span class="dt">Restart</span><span class="ot">=</span><span class="kw">on</span><span class="st">-failure</span></span>
<span id="cb13-7"><a href="#cb13-7"></a></span>
<span id="cb13-8"><a href="#cb13-8"></a><span class="kw">[Install]</span></span>
<span id="cb13-9"><a href="#cb13-9"></a><span class="dt">WantedBy</span><span class="ot">=</span><span class="kw">default</span><span class="st">.target</span></span></code></pre></div>
<p>Radicale will load the configuration file from <code>~/.config/radicale/config</code>. You should set the configuration option <code>filesystem_folder</code> in the <code>storage</code> section to something like <code>~/.var/lib/radicale/collections</code>.</p>
<p>To enable and manage the service run:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1"></a><span class="co"># Enable the service</span></span> <div class="sourceCode" id="cb14"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1"></a><span class="co"># Enable the service</span></span>
<span id="cb14-2"><a href="#cb14-2"></a>$ <span class="ex">systemctl</span> enable radicale</span> <span id="cb14-2"><a href="#cb14-2"></a>$ <span class="ex">systemctl</span> --user enable radicale</span>
<span id="cb14-3"><a href="#cb14-3"></a><span class="co"># Start the service</span></span> <span id="cb14-3"><a href="#cb14-3"></a><span class="co"># Start the service</span></span>
<span id="cb14-4"><a href="#cb14-4"></a>$ <span class="ex">systemctl</span> start radicale</span> <span id="cb14-4"><a href="#cb14-4"></a>$ <span class="ex">systemctl</span> --user start radicale</span>
<span id="cb14-5"><a href="#cb14-5"></a><span class="co"># Check the status of the service</span></span> <span id="cb14-5"><a href="#cb14-5"></a><span class="co"># Check the status of the service</span></span>
<span id="cb14-6"><a href="#cb14-6"></a>$ <span class="ex">systemctl</span> status radicale</span> <span id="cb14-6"><a href="#cb14-6"></a>$ <span class="ex">systemctl</span> --user status radicale</span>
<span id="cb14-7"><a href="#cb14-7"></a><span class="co"># View all log messages</span></span> <span id="cb14-7"><a href="#cb14-7"></a><span class="co"># View all log messages</span></span>
<span id="cb14-8"><a href="#cb14-8"></a>$ <span class="ex">journalctl</span> --unit radicale.service</span></code></pre></div> <span id="cb14-8"><a href="#cb14-8"></a>$ <span class="ex">journalctl</span> --user --unit radicale.service</span></code></pre></div>
</section> </section>
</section> <section class="level4" id="tutorials/running-as-a-service/windows-with-nssm---the-non-sucking-service-manager">
<section class="level4" id="documentation/basic-setup/macos-with-launchd"> <h4>Windows with "NSSM - the Non-Sucking Service Manager" <a class="headerlink" href="#tutorials/running-as-a-service/windows-with-nssm---the-non-sucking-service-manager">&para;</a></h4>
<h4>MacOS with launchd <a class="headerlink" href="#documentation/basic-setup/macos-with-launchd">&para;</a></h4>
<p><em>To be written.</em></p>
</section>
<section class="level4" id="documentation/basic-setup/windows-with-nssm---the-non-sucking-service-manager">
<h4>Windows with "NSSM - the Non-Sucking Service Manager" <a class="headerlink" href="#documentation/basic-setup/windows-with-nssm---the-non-sucking-service-manager">&para;</a></h4>
<p>First install <a href="https://nssm.cc/">NSSM</a> and start <code>nssm install</code> in a command prompt. Apply the following configuration:</p> <p>First install <a href="https://nssm.cc/">NSSM</a> and start <code>nssm install</code> in a command prompt. Apply the following configuration:</p>
<ul> <ul>
<li>Service name: <code>Radicale</code></li> <li>Service name: <code>Radicale</code></li>
@ -482,8 +436,8 @@ user2:password2
<p>The service is configured to start automatically when the computer starts. To start the service manually open <strong>Services</strong> in <strong>Computer Management</strong> and start the <strong>Radicale</strong> service.</p> <p>The service is configured to start automatically when the computer starts. To start the service manually open <strong>Services</strong> in <strong>Computer Management</strong> and start the <strong>Radicale</strong> service.</p>
</section> </section>
</section> </section>
<section class="level3" id="documentation/reverse-proxy"> <section class="level3" id="tutorials/reverse-proxy">
<h3>Reverse Proxy <a class="headerlink" href="#documentation/reverse-proxy">&para;</a></h3> <h3>Reverse Proxy <a class="headerlink" href="#tutorials/reverse-proxy">&para;</a></h3>
<p>When a reverse proxy is used, the path at which Radicale is available must be provided via the <code>X-Script-Name</code> header. The proxy must remove the location from the URL path that is forwarded to Radicale.</p> <p>When a reverse proxy is used, the path at which Radicale is available must be provided via the <code>X-Script-Name</code> header. The proxy must remove the location from the URL path that is forwarded to Radicale.</p>
<p>Example <strong>nginx</strong> configuration:</p> <p>Example <strong>nginx</strong> configuration:</p>
<pre class="nginx"><code>location /radicale/ { # The trailing / is important! <pre class="nginx"><code>location /radicale/ { # The trailing / is important!
@ -503,8 +457,8 @@ user2:password2
<span id="cb16-7"><a href="#cb16-7"></a> RequestHeader<span class="st"> set X-Script-Name /radicale/</span></span> <span id="cb16-7"><a href="#cb16-7"></a> RequestHeader<span class="st"> set X-Script-Name /radicale/</span></span>
<span id="cb16-8"><a href="#cb16-8"></a><span class="fu">&lt;/Location&gt;</span></span></code></pre></div> <span id="cb16-8"><a href="#cb16-8"></a><span class="fu">&lt;/Location&gt;</span></span></code></pre></div>
<p>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.</p> <p>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.</p>
<section class="level4" id="documentation/reverse-proxy/manage-user-accounts-with-the-reverse-proxy"> <section class="level4" id="tutorials/reverse-proxy/manage-user-accounts-with-the-reverse-proxy">
<h4>Manage user accounts with the reverse proxy <a class="headerlink" href="#documentation/reverse-proxy/manage-user-accounts-with-the-reverse-proxy">&para;</a></h4> <h4>Manage user accounts with the reverse proxy <a class="headerlink" href="#tutorials/reverse-proxy/manage-user-accounts-with-the-reverse-proxy">&para;</a></h4>
<p>Set the configuration option <code>type</code> in the <code>auth</code> section to <code>http_x_remote_user</code>. Radicale uses the user name provided in the <code>X-Remote-User</code> HTTP header and disables HTTP authentication.</p> <p>Set the configuration option <code>type</code> in the <code>auth</code> section to <code>http_x_remote_user</code>. Radicale uses the user name provided in the <code>X-Remote-User</code> HTTP header and disables HTTP authentication.</p>
<p>Example <strong>nginx</strong> configuration:</p> <p>Example <strong>nginx</strong> configuration:</p>
<pre class="nginx"><code>location /radicale/ { <pre class="nginx"><code>location /radicale/ {
@ -533,8 +487,8 @@ user2:password2
<span id="cb18-14"><a href="#cb18-14"></a><span class="fu">&lt;/Location&gt;</span></span></code></pre></div> <span id="cb18-14"><a href="#cb18-14"></a><span class="fu">&lt;/Location&gt;</span></span></code></pre></div>
<p><strong>Security:</strong> Untrusted clients should not be able to access the Radicale server directly. Otherwise, they can authenticate as any user.</p> <p><strong>Security:</strong> Untrusted clients should not be able to access the Radicale server directly. Otherwise, they can authenticate as any user.</p>
</section> </section>
<section class="level4" id="documentation/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy"> <section class="level4" id="tutorials/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy">
<h4>Secure connection between Radicale and the reverse proxy <a class="headerlink" href="#documentation/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy">&para;</a></h4> <h4>Secure connection between Radicale and the reverse proxy <a class="headerlink" href="#tutorials/reverse-proxy/secure-connection-between-radicale-and-the-reverse-proxy">&para;</a></h4>
<p>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 information about the certificate, the values don't matter and you can keep the defaults.</p> <p>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 information about the certificate, the values don't matter and you can keep the defaults.</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1"></a>$ <span class="ex">openssl</span> req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -nodes -days 9999</span> <div class="sourceCode" id="cb19"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1"></a>$ <span class="ex">openssl</span> req -x509 -newkey rsa:4096 -keyout server_key.pem -out server_cert.pem -nodes -days 9999</span>
<span id="cb19-2"><a href="#cb19-2"></a>$ <span class="ex">openssl</span> req -x509 -newkey rsa:4096 -keyout client_key.pem -out client_cert.pem -nodes -days 9999</span></code></pre></div> <span id="cb19-2"><a href="#cb19-2"></a>$ <span class="ex">openssl</span> req -x509 -newkey rsa:4096 -keyout client_key.pem -out client_cert.pem -nodes -days 9999</span></code></pre></div>
@ -556,8 +510,8 @@ user2:password2
</code></pre> </code></pre>
</section> </section>
</section> </section>
<section class="level3" id="documentation/wsgi"> <section class="level3" id="tutorials/wsgi-server">
<h3>WSGI <a class="headerlink" href="#documentation/wsgi">&para;</a></h3> <h3>WSGI Server <a class="headerlink" href="#tutorials/wsgi-server">&para;</a></h3>
<p>Radicale is compatible with the WSGI specification.</p> <p>Radicale is compatible with the WSGI specification.</p>
<p>A configuration file can be set with the <code>RADICALE_CONFIG</code> environment variable, otherwise no configuration file is loaded and the default configuration is used.</p> <p>A configuration file can be set with the <code>RADICALE_CONFIG</code> environment variable, otherwise no configuration file is loaded and the default configuration is used.</p>
<p>Be reminded that Radicale's default configuration enforces limits on the maximum upload file size.</p> <p>Be reminded that Radicale's default configuration enforces limits on the maximum upload file size.</p>
@ -571,14 +525,14 @@ user2:password2
<span id="cb22-6"><a href="#cb22-6"></a><span class="dt">env </span><span class="ot">=</span><span class="st"> RADICALE_CONFIG=/etc/radicale/config</span></span></code></pre></div> <span id="cb22-6"><a href="#cb22-6"></a><span class="dt">env </span><span class="ot">=</span><span class="st"> RADICALE_CONFIG=/etc/radicale/config</span></span></code></pre></div>
<p>Example <strong>Gunicorn</strong> configuration:</p> <p>Example <strong>Gunicorn</strong> configuration:</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1"></a><span class="ex">gunicorn</span> --bind <span class="st">'127.0.0.1:5232'</span> --workers 8 --env <span class="st">'RADICALE_CONFIG=/etc/radicale/config'</span> radicale</span></code></pre></div> <div class="sourceCode" id="cb23"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1"></a><span class="ex">gunicorn</span> --bind <span class="st">'127.0.0.1:5232'</span> --workers 8 --env <span class="st">'RADICALE_CONFIG=/etc/radicale/config'</span> radicale</span></code></pre></div>
<section class="level4" id="documentation/wsgi/manage-user-accounts-with-the-wsgi-server"> <section class="level4" id="tutorials/wsgi-server/manage-user-accounts-with-the-wsgi-server">
<h4>Manage user accounts with the WSGI server <a class="headerlink" href="#documentation/wsgi/manage-user-accounts-with-the-wsgi-server">&para;</a></h4> <h4>Manage user accounts with the WSGI server <a class="headerlink" href="#tutorials/wsgi-server/manage-user-accounts-with-the-wsgi-server">&para;</a></h4>
<p>Set the configuration option <code>type</code> in the <code>auth</code> section to <code>remote_user</code>. Radicale uses the user name provided by the WSGI server and disables authentication over HTTP.</p> <p>Set the configuration option <code>type</code> in the <code>auth</code> section to <code>remote_user</code>. Radicale uses the user name provided by the WSGI server and disables authentication over HTTP.</p>
</section> </section>
</section> </section>
<section class="level3" id="documentation/versioning"> <section class="level3" id="tutorials/versioning-with-git">
<h3>Versioning <a class="headerlink" href="#documentation/versioning">&para;</a></h3> <h3>Versioning with Git <a class="headerlink" href="#tutorials/versioning-with-git">&para;</a></h3>
<p>This page describes how to keep track of all changes to calendars and address books with <strong>git</strong> (or any other version control system).</p> <p>This tutorial describes how to keep track of all changes to calendars and address books with <strong>git</strong> (or any other version control system).</p>
<p>The repository must be initialized by running <code>git init</code> in the file system folder. Internal files of Radicale can be excluded by creating the file <code>.gitignore</code> with the following content:</p> <p>The repository must be initialized by running <code>git init</code> in the file system folder. Internal files of Radicale can be excluded by creating the file <code>.gitignore</code> with the following content:</p>
<pre><code>.Radicale.cache <pre><code>.Radicale.cache
.Radicale.lock .Radicale.lock
@ -588,115 +542,27 @@ user2:password2
<div class="sourceCode" id="cb25"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1"></a><span class="fu">git</span> add -A <span class="kw">&amp;&amp;</span> <span class="kw">(</span><span class="fu">git</span> diff --cached --quiet <span class="kw">||</span> <span class="fu">git</span> commit -m <span class="st">"Changes by "</span>%(user<span class="kw">)</span><span class="ex">s</span>)</span></code></pre></div> <div class="sourceCode" id="cb25"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1"></a><span class="fu">git</span> add -A <span class="kw">&amp;&amp;</span> <span class="kw">(</span><span class="fu">git</span> diff --cached --quiet <span class="kw">||</span> <span class="fu">git</span> commit -m <span class="st">"Changes by "</span>%(user<span class="kw">)</span><span class="ex">s</span>)</span></code></pre></div>
<p>The command gets executed after every change to the storage and commits the changes into the <strong>git</strong> repository.</p> <p>The command gets executed after every change to the storage and commits the changes into the <strong>git</strong> repository.</p>
</section> </section>
<section class="level3" id="documentation/clients">
<h3>Clients <a class="headerlink" href="#documentation/clients">&para;</a></h3>
<p>Radicale has been tested with:</p>
<ul>
<li><a href="https://android.com/">Android</a> with <a href="https://www.davx5.com/">DAVx⁵</a> (formerly DAVdroid)</li>
<li><a href="https://wiki.gnome.org/Apps/Calendar">GNOME Calendar</a>, <a href="https://wiki.gnome.org/Apps/Contacts">Contacts</a> and <a href="https://wiki.gnome.org/Apps/Evolution">Evolution</a></li>
<li><a href="https://www.mozilla.org/thunderbird/">Mozilla Thunderbird</a> with <a href="https://addons.mozilla.org/thunderbird/addon/cardbook/">CardBook</a> and <a href="https://www.mozilla.org/projects/calendar/">Lightning</a></li>
<li><a href="https://www.inf-it.com/open-source/clients/infcloud/">InfCloud</a>, <a href="https://www.inf-it.com/open-source/clients/caldavzap/">CalDavZAP</a> and <a href="https://www.inf-it.com/open-source/clients/carddavmate/">CardDavMATE</a></li>
</ul>
<p>Many clients do not support the creation of new calendars and address books. You can use Radicale's web interface (e.g. <a href="http://localhost:5232">http://localhost:5232</a>) to create and manage address books and calendars.</p>
<p>In some clients you can just enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. In others, you have to enter the URL of the collection directly (e.g. <code>http://localhost:5232/user/calendar</code>).</p>
<section class="level4" id="documentation/clients/davx⁵">
<h4>DAVx⁵ <a class="headerlink" href="#documentation/clients/davx⁵">&para;</a></h4>
<p>Enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. DAVx⁵ will show all existing calendars and address books and you can create new.</p>
</section>
<section class="level4" id="documentation/clients/gnome-calendar-contacts-and-evolution">
<h4>GNOME Calendar, Contacts and Evolution <a class="headerlink" href="#documentation/clients/gnome-calendar-contacts-and-evolution">&para;</a></h4>
<p><strong>GNOME Calendar</strong> and <strong>Contacts</strong> do not support adding WebDAV calendars and address books directly, but you can add them in <strong>Evolution</strong>.</p>
<p>In <strong>Evolution</strong> add a new calendar and address book respectively with WebDAV. Enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. Clicking on the search button will list the existing calendars and address books.</p>
</section>
<section class="level4" id="documentation/clients/thunderbird">
<h4>Thunderbird <a class="headerlink" href="#documentation/clients/thunderbird">&para;</a></h4>
<section class="level5" id="documentation/clients/thunderbird/cardbook">
<h5>CardBook <a class="headerlink" href="#documentation/clients/thunderbird/cardbook">&para;</a></h5>
<p>Add a new address book on the network with CardDAV. You have to enter the full URL of the collection (e.g. <code>http://localhost:5232/user/addressbook</code>) and your user name.</p>
</section>
<section class="level5" id="documentation/clients/thunderbird/lightning">
<h5>Lightning <a class="headerlink" href="#documentation/clients/thunderbird/lightning">&para;</a></h5>
<p>Add a new calendar on the network with <code>CalDAV</code>. (Don't use <code>iCalendar (ICS)</code>!) You have to enter the full URL of the collection (e.g. <code>http://localhost:5232/user/calendar</code>). If you want to add calendars from different users on the same server, you can specify the user name in the URL (e.g. <code>http://user@localhost...</code>)</p>
</section>
</section>
<section class="level4" id="documentation/clients/infcloud-caldavzap-and-carddavmate">
<h4>InfCloud, CalDavZAP and CardDavMATE <a class="headerlink" href="#documentation/clients/infcloud-caldavzap-and-carddavmate">&para;</a></h4>
<p>You can integrate InfCloud into Radicale's web interface with <a href="https://github.com/Unrud/RadicaleInfCloud">RadicaleInfCloud</a>. No additional configuration is required.</p>
<p>Set the URL of the Radicale server in <code>config.js</code>. If <strong>InfCloud</strong> is not hosted on the same server and port as Radicale, the browser will deny access to the Radicale server, because of the <a href="https://en.wikipedia.org/wiki/Same-origin_policy">same-origin policy</a>. You have to add additional HTTP header in the <code>headers</code> section of Radicale's configuration. The documentation of <strong>InfCloud</strong> has more details on this.</p>
</section>
<section class="level4" id="documentation/clients/manual-creation-of-calendars-and-address-books">
<h4>Manual creation of calendars and address books <a class="headerlink" href="#documentation/clients/manual-creation-of-calendars-and-address-books">&para;</a></h4>
<p>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. <strong>DAVx⁵</strong>).</p>
<section class="level5" id="documentation/clients/manual-creation-of-calendars-and-address-books/direct-editing-of-the-storage">
<h5>Direct editing of the storage <a class="headerlink" href="#documentation/clients/manual-creation-of-calendars-and-address-books/direct-editing-of-the-storage">&para;</a></h5>
<p>To create a new collection, you have to create the corresponding folder in the file system storage (e.g. <code>collection-root/user/calendar</code>). To tell Radicale and clients that the collection is a calendar, you have to create the file <code>.Radicale.props</code> with the following content in the folder:</p>
<div class="sourceCode" id="cb26"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb26-1"><a href="#cb26-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div>
<p>The calendar is now available at the URL path <code>/user/calendar</code>. For address books the file must contain:</p>
<div class="sourceCode" id="cb27"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb27-1"><a href="#cb27-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div>
<p>Calendar and address book collections must not have any child collections. Clients with automatic discovery of collections will only show calendars and addressbooks that are direct children of the path <code>/USERNAME/</code>.</p>
<p>Delete collections by deleting the corresponding folders.</p>
</section>
<section class="level5" id="documentation/clients/manual-creation-of-calendars-and-address-books/http-requests-with-curl">
<h5>HTTP requests with curl <a class="headerlink" href="#documentation/clients/manual-creation-of-calendars-and-address-books/http-requests-with-curl">&para;</a></h5>
<p>To create a new calendar run something like:</p>
<div class="sourceCode" id="cb28"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1"></a>$ <span class="ex">curl</span> -u user -X MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> --data \</span>
<span id="cb28-2"><a href="#cb28-2"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb28-3"><a href="#cb28-3"></a><span class="st">&lt;create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"&gt;</span></span>
<span id="cb28-4"><a href="#cb28-4"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb28-5"><a href="#cb28-5"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb28-6"><a href="#cb28-6"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb28-7"><a href="#cb28-7"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb28-8"><a href="#cb28-8"></a><span class="st"> &lt;C:calendar /&gt;</span></span>
<span id="cb28-9"><a href="#cb28-9"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb28-10"><a href="#cb28-10"></a><span class="st"> &lt;C:supported-calendar-component-set&gt;</span></span>
<span id="cb28-11"><a href="#cb28-11"></a><span class="st"> &lt;C:comp name="VEVENT" /&gt;</span></span>
<span id="cb28-12"><a href="#cb28-12"></a><span class="st"> &lt;C:comp name="VJOURNAL" /&gt;</span></span>
<span id="cb28-13"><a href="#cb28-13"></a><span class="st"> &lt;C:comp name="VTODO" /&gt;</span></span>
<span id="cb28-14"><a href="#cb28-14"></a><span class="st"> &lt;/C:supported-calendar-component-set&gt;</span></span>
<span id="cb28-15"><a href="#cb28-15"></a><span class="st"> &lt;displayname&gt;Calendar&lt;/displayname&gt;</span></span>
<span id="cb28-16"><a href="#cb28-16"></a><span class="st"> &lt;C:calendar-description&gt;Example calendar&lt;/C:calendar-description&gt;</span></span>
<span id="cb28-17"><a href="#cb28-17"></a><span class="st"> &lt;I:calendar-color&gt;#ff0000ff&lt;/I:calendar-color&gt;</span></span>
<span id="cb28-18"><a href="#cb28-18"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb28-19"><a href="#cb28-19"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb28-20"><a href="#cb28-20"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>To create a new address book run something like:</p>
<div class="sourceCode" id="cb29"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1"></a>$ <span class="ex">curl</span> -u user -X MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> --data \</span>
<span id="cb29-2"><a href="#cb29-2"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb29-3"><a href="#cb29-3"></a><span class="st">&lt;create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"&gt;</span></span>
<span id="cb29-4"><a href="#cb29-4"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb29-5"><a href="#cb29-5"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb29-6"><a href="#cb29-6"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb29-7"><a href="#cb29-7"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb29-8"><a href="#cb29-8"></a><span class="st"> &lt;CR:addressbook /&gt;</span></span>
<span id="cb29-9"><a href="#cb29-9"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb29-10"><a href="#cb29-10"></a><span class="st"> &lt;displayname&gt;Address book&lt;/displayname&gt;</span></span>
<span id="cb29-11"><a href="#cb29-11"></a><span class="st"> &lt;CR:addressbook-description&gt;Example address book&lt;/CR:addressbook-description&gt;</span></span>
<span id="cb29-12"><a href="#cb29-12"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb29-13"><a href="#cb29-13"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb29-14"><a href="#cb29-14"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>The collection <code>/USERNAME</code> 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 <code>/USERNAME/</code>.</p>
<p>Delete the collections by running something like:</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1"></a>$ <span class="ex">curl</span> -u user -X DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div>
</section>
</section>
</section> </section>
<section class="level2" id="documentation">
<h2>Documentation <a class="headerlink" href="#documentation">&para;</a></h2>
<section class="level3" id="documentation/configuration"> <section class="level3" id="documentation/configuration">
<h3>Configuration <a class="headerlink" href="#documentation/configuration">&para;</a></h3> <h3>Configuration <a class="headerlink" href="#documentation/configuration">&para;</a></h3>
<p>Radicale can be configured with a configuration file or with command line arguments.</p> <p>Radicale can be configured with a configuration file or with command line arguments.</p>
<p>An example configuration file looks like:</p> <p>An example configuration file looks like:</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb31-1"><a href="#cb31-1"></a><span class="kw">[server]</span></span> <div class="sourceCode" id="cb26"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb26-1"><a href="#cb26-1"></a><span class="kw">[server]</span></span>
<span id="cb31-2"><a href="#cb31-2"></a><span class="co"># Bind all addresses</span></span> <span id="cb26-2"><a href="#cb26-2"></a><span class="co"># Bind all addresses</span></span>
<span id="cb31-3"><a href="#cb31-3"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> </span><span class="dv">0</span><span class="st">.</span><span class="dv">0</span><span class="st">.</span><span class="fl">0.0</span><span class="st">:</span><span class="dv">5232</span><span class="st">, [::]:</span><span class="dv">5232</span></span> <span id="cb26-3"><a href="#cb26-3"></a><span class="dt">hosts </span><span class="ot">=</span><span class="st"> </span><span class="dv">0</span><span class="st">.</span><span class="dv">0</span><span class="st">.</span><span class="fl">0.0</span><span class="st">:</span><span class="dv">5232</span><span class="st">, [::]:</span><span class="dv">5232</span></span>
<span id="cb31-4"><a href="#cb31-4"></a></span> <span id="cb26-4"><a href="#cb26-4"></a></span>
<span id="cb31-5"><a href="#cb31-5"></a><span class="kw">[auth]</span></span> <span id="cb26-5"><a href="#cb26-5"></a><span class="kw">[auth]</span></span>
<span id="cb31-6"><a href="#cb31-6"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> htpasswd</span></span> <span id="cb26-6"><a href="#cb26-6"></a><span class="dt">type </span><span class="ot">=</span><span class="st"> htpasswd</span></span>
<span id="cb31-7"><a href="#cb31-7"></a><span class="dt">htpasswd_filename </span><span class="ot">=</span><span class="st"> /path/to/users</span></span> <span id="cb26-7"><a href="#cb26-7"></a><span class="dt">htpasswd_filename </span><span class="ot">=</span><span class="st"> ~/.config/radicale/users</span></span>
<span id="cb31-8"><a href="#cb31-8"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span> <span id="cb26-8"><a href="#cb26-8"></a><span class="dt">htpasswd_encryption </span><span class="ot">=</span><span class="st"> md5</span></span>
<span id="cb31-9"><a href="#cb31-9"></a><span class="kw">[storage]</span></span> <span id="cb26-9"><a href="#cb26-9"></a></span>
<span id="cb31-10"><a href="#cb31-10"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> ~/.var/lib/radicale/collections</span></span></code></pre></div> <span id="cb26-10"><a href="#cb26-10"></a><span class="kw">[storage]</span></span>
<span id="cb26-11"><a href="#cb26-11"></a><span class="dt">filesystem_folder </span><span class="ot">=</span><span class="st"> ~/.var/lib/radicale/collections</span></span></code></pre></div>
<p>Radicale tries to load configuration files from <code>/etc/radicale/config</code> and <code>~/.config/radicale/config</code>. Custom paths can be specified with the <code>--config /path/to/config</code> command line argument or the <code>RADICALE_CONFIG</code> environment variable. Multiple configuration files can be separated by <code>:</code> (resp. <code>;</code> on Windows). Paths that start with <code>?</code> are optional.</p> <p>Radicale tries to load configuration files from <code>/etc/radicale/config</code> and <code>~/.config/radicale/config</code>. Custom paths can be specified with the <code>--config /path/to/config</code> command line argument or the <code>RADICALE_CONFIG</code> environment variable. Multiple configuration files can be separated by <code>:</code> (resp. <code>;</code> on Windows). Paths that start with <code>?</code> are optional.</p>
<p>The same example configuration via command line arguments looks like:</p> <p>The same example configuration via command line arguments looks like:</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1"></a><span class="ex">python3</span> -m radicale --server-hosts 0.0.0.0:5232,[::]:5232 --auth-type htpasswd --htpasswd-filename /path/to/htpasswd --htpasswd-encryption md5</span></code></pre></div> <div class="sourceCode" id="cb27"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1"></a><span class="ex">python3</span> -m radicale --server-hosts 0.0.0.0:5232,[::]:5232 --auth-type htpasswd --htpasswd-filename ~/.config/radicale/users --htpasswd-encryption md5</span></code></pre></div>
<p>Add the argument <code>--config ""</code> to stop Radicale from loading the default configuration files. Run <code>python3 -m radicale --help</code> for more information.</p> <p>Add the argument <code>--config ""</code> to stop Radicale from loading the default configuration files. Run <code>python3 -m radicale --help</code> for more information.</p>
<p>In the following, all configuration categories and options are described.</p> <p>In the following, all configuration categories and options are described.</p>
<section class="level4" id="documentation/configuration/server"> <section class="level4" id="documentation/configuration/server">
@ -812,7 +678,7 @@ user2:password2
</section> </section>
<section class="level5" id="documentation/configuration/rights/file"> <section class="level5" id="documentation/configuration/rights/file">
<h5>file <a class="headerlink" href="#documentation/configuration/rights/file">&para;</a></h5> <h5>file <a class="headerlink" href="#documentation/configuration/rights/file">&para;</a></h5>
<p>File for the rights backend <code>from_file</code>. See the <a href="#documentation/authentication-and-rights">Rights</a> page.</p> <p>File for the rights backend <code>from_file</code>. See the <a href="#documentation/authentication-and-rights">Rights</a> section.</p>
</section> </section>
</section> </section>
<section class="level4" id="documentation/configuration/storage"> <section class="level4" id="documentation/configuration/storage">
@ -836,7 +702,7 @@ user2:password2
</section> </section>
<section class="level5" id="documentation/configuration/storage/hook"> <section class="level5" id="documentation/configuration/storage/hook">
<h5>hook <a class="headerlink" href="#documentation/configuration/storage/hook">&para;</a></h5> <h5>hook <a class="headerlink" href="#documentation/configuration/storage/hook">&para;</a></h5>
<p>Command that is run after changes to storage. Take a look at the <a href="#documentation/versioning">Versioning</a> page for an example.</p> <p>Command that is run after changes to storage. Take a look at the <a href="#tutorials/versioning-with-git">Versioning with Git</a> tutorial for an example.</p>
<p>Default:</p> <p>Default:</p>
</section> </section>
</section> </section>
@ -869,46 +735,128 @@ user2:password2
<h4>headers <a class="headerlink" href="#documentation/configuration/headers">&para;</a></h4> <h4>headers <a class="headerlink" href="#documentation/configuration/headers">&para;</a></h4>
<p>In this section additional HTTP headers that are sent to clients can be specified.</p> <p>In this section additional HTTP headers that are sent to clients can be specified.</p>
<p>An example to relax the same-origin policy:</p> <p>An example to relax the same-origin policy:</p>
<div class="sourceCode" id="cb34"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb34-1"><a href="#cb34-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div> <div class="sourceCode" id="cb29"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb29-1"><a href="#cb29-1"></a><span class="dt">Access-Control-Allow-Origin </span><span class="ot">=</span><span class="st"> *</span></span></code></pre></div>
</section>
</section>
<section class="level3" id="documentation/supported-clients">
<h3>Supported Clients <a class="headerlink" href="#documentation/supported-clients">&para;</a></h3>
<p>Radicale has been tested with:</p>
<ul>
<li><a href="https://android.com/">Android</a> with <a href="https://www.davx5.com/">DAVx⁵</a> (formerly DAVdroid)</li>
<li><a href="https://wiki.gnome.org/Apps/Calendar">GNOME Calendar</a>, <a href="https://wiki.gnome.org/Apps/Contacts">Contacts</a> and <a href="https://wiki.gnome.org/Apps/Evolution">Evolution</a></li>
<li><a href="https://www.mozilla.org/thunderbird/">Mozilla Thunderbird</a> with <a href="https://addons.mozilla.org/thunderbird/addon/cardbook/">CardBook</a> and <a href="https://www.mozilla.org/projects/calendar/">Lightning</a></li>
<li><a href="https://www.inf-it.com/open-source/clients/infcloud/">InfCloud</a>, <a href="https://www.inf-it.com/open-source/clients/caldavzap/">CalDavZAP</a> and <a href="https://www.inf-it.com/open-source/clients/carddavmate/">CardDavMATE</a></li>
</ul>
<p>Many clients do not support the creation of new calendars and address books. You can use Radicale's web interface (e.g. <a href="http://localhost:5232">http://localhost:5232</a>) to create and manage address books and calendars.</p>
<p>In some clients you can just enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. In others, you have to enter the URL of the collection directly (e.g. <code>http://localhost:5232/user/calendar</code>).</p>
<section class="level4" id="documentation/supported-clients/davx⁵">
<h4>DAVx⁵ <a class="headerlink" href="#documentation/supported-clients/davx⁵">&para;</a></h4>
<p>Enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. DAVx⁵ will show all existing calendars and address books and you can create new.</p>
</section>
<section class="level4" id="documentation/supported-clients/gnome-calendar-contacts-and-evolution">
<h4>GNOME Calendar, Contacts and Evolution <a class="headerlink" href="#documentation/supported-clients/gnome-calendar-contacts-and-evolution">&para;</a></h4>
<p><strong>GNOME Calendar</strong> and <strong>Contacts</strong> do not support adding WebDAV calendars and address books directly, but you can add them in <strong>Evolution</strong>.</p>
<p>In <strong>Evolution</strong> add a new calendar and address book respectively with WebDAV. Enter the URL of the Radicale server (e.g. <code>http://localhost:5232</code>) and your user name. Clicking on the search button will list the existing calendars and address books.</p>
</section>
<section class="level4" id="documentation/supported-clients/thunderbird">
<h4>Thunderbird <a class="headerlink" href="#documentation/supported-clients/thunderbird">&para;</a></h4>
<section class="level5" id="documentation/supported-clients/thunderbird/cardbook">
<h5>CardBook <a class="headerlink" href="#documentation/supported-clients/thunderbird/cardbook">&para;</a></h5>
<p>Add a new address book on the network with CardDAV. You have to enter the full URL of the collection (e.g. <code>http://localhost:5232/user/addressbook</code>) and your user name.</p>
</section>
<section class="level5" id="documentation/supported-clients/thunderbird/lightning">
<h5>Lightning <a class="headerlink" href="#documentation/supported-clients/thunderbird/lightning">&para;</a></h5>
<p>Add a new calendar on the network with <code>CalDAV</code>. (Don't use <code>iCalendar (ICS)</code>!) You have to enter the full URL of the collection (e.g. <code>http://localhost:5232/user/calendar</code>). If you want to add calendars from different users on the same server, you can specify the user name in the URL (e.g. <code>http://user@localhost...</code>)</p>
</section>
</section>
<section class="level4" id="documentation/supported-clients/infcloud-caldavzap-and-carddavmate">
<h4>InfCloud, CalDavZAP and CardDavMATE <a class="headerlink" href="#documentation/supported-clients/infcloud-caldavzap-and-carddavmate">&para;</a></h4>
<p>You can integrate InfCloud into Radicale's web interface with <a href="https://github.com/Unrud/RadicaleInfCloud">RadicaleInfCloud</a>. No additional configuration is required.</p>
<p>Set the URL of the Radicale server in <code>config.js</code>. If <strong>InfCloud</strong> is not hosted on the same server and port as Radicale, the browser will deny access to the Radicale server, because of the <a href="https://en.wikipedia.org/wiki/Same-origin_policy">same-origin policy</a>. You have to add additional HTTP header in the <code>headers</code> section of Radicale's configuration. The documentation of <strong>InfCloud</strong> has more details on this.</p>
</section>
<section class="level4" id="documentation/supported-clients/command-line">
<h4>Command line <a class="headerlink" href="#documentation/supported-clients/command-line">&para;</a></h4>
<p>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. <strong>DAVx⁵</strong>).</p>
<p>To create a new calendar run something like:</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1"></a>$ <span class="ex">curl</span> -u user -X MKCOL <span class="st">'http://localhost:5232/user/calendar'</span> --data \</span>
<span id="cb30-2"><a href="#cb30-2"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb30-3"><a href="#cb30-3"></a><span class="st">&lt;create xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/"&gt;</span></span>
<span id="cb30-4"><a href="#cb30-4"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb30-5"><a href="#cb30-5"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb30-6"><a href="#cb30-6"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb30-7"><a href="#cb30-7"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb30-8"><a href="#cb30-8"></a><span class="st"> &lt;C:calendar /&gt;</span></span>
<span id="cb30-9"><a href="#cb30-9"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb30-10"><a href="#cb30-10"></a><span class="st"> &lt;C:supported-calendar-component-set&gt;</span></span>
<span id="cb30-11"><a href="#cb30-11"></a><span class="st"> &lt;C:comp name="VEVENT" /&gt;</span></span>
<span id="cb30-12"><a href="#cb30-12"></a><span class="st"> &lt;C:comp name="VJOURNAL" /&gt;</span></span>
<span id="cb30-13"><a href="#cb30-13"></a><span class="st"> &lt;C:comp name="VTODO" /&gt;</span></span>
<span id="cb30-14"><a href="#cb30-14"></a><span class="st"> &lt;/C:supported-calendar-component-set&gt;</span></span>
<span id="cb30-15"><a href="#cb30-15"></a><span class="st"> &lt;displayname&gt;Calendar&lt;/displayname&gt;</span></span>
<span id="cb30-16"><a href="#cb30-16"></a><span class="st"> &lt;C:calendar-description&gt;Example calendar&lt;/C:calendar-description&gt;</span></span>
<span id="cb30-17"><a href="#cb30-17"></a><span class="st"> &lt;I:calendar-color&gt;#ff0000ff&lt;/I:calendar-color&gt;</span></span>
<span id="cb30-18"><a href="#cb30-18"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb30-19"><a href="#cb30-19"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb30-20"><a href="#cb30-20"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>To create a new address book run something like:</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1"></a>$ <span class="ex">curl</span> -u user -X MKCOL <span class="st">'http://localhost:5232/user/addressbook'</span> --data \</span>
<span id="cb31-2"><a href="#cb31-2"></a><span class="st">'&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span></span>
<span id="cb31-3"><a href="#cb31-3"></a><span class="st">&lt;create xmlns="DAV:" xmlns:CR="urn:ietf:params:xml:ns:carddav"&gt;</span></span>
<span id="cb31-4"><a href="#cb31-4"></a><span class="st"> &lt;set&gt;</span></span>
<span id="cb31-5"><a href="#cb31-5"></a><span class="st"> &lt;prop&gt;</span></span>
<span id="cb31-6"><a href="#cb31-6"></a><span class="st"> &lt;resourcetype&gt;</span></span>
<span id="cb31-7"><a href="#cb31-7"></a><span class="st"> &lt;collection /&gt;</span></span>
<span id="cb31-8"><a href="#cb31-8"></a><span class="st"> &lt;CR:addressbook /&gt;</span></span>
<span id="cb31-9"><a href="#cb31-9"></a><span class="st"> &lt;/resourcetype&gt;</span></span>
<span id="cb31-10"><a href="#cb31-10"></a><span class="st"> &lt;displayname&gt;Address book&lt;/displayname&gt;</span></span>
<span id="cb31-11"><a href="#cb31-11"></a><span class="st"> &lt;CR:addressbook-description&gt;Example address book&lt;/CR:addressbook-description&gt;</span></span>
<span id="cb31-12"><a href="#cb31-12"></a><span class="st"> &lt;/prop&gt;</span></span>
<span id="cb31-13"><a href="#cb31-13"></a><span class="st"> &lt;/set&gt;</span></span>
<span id="cb31-14"><a href="#cb31-14"></a><span class="st">&lt;/create&gt;'</span></span></code></pre></div>
<p>The collection <code>/USERNAME</code> 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 <code>/USERNAME/</code>.</p>
<p>Delete the collections by running something like:</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1"></a>$ <span class="ex">curl</span> -u user -X DELETE <span class="st">'http://localhost:5232/user/calendar'</span></span></code></pre></div>
</section> </section>
</section> </section>
<section class="level3" id="documentation/authentication-and-rights"> <section class="level3" id="documentation/authentication-and-rights">
<h3>Authentication and Rights <a class="headerlink" href="#documentation/authentication-and-rights">&para;</a></h3> <h3>Authentication and Rights <a class="headerlink" href="#documentation/authentication-and-rights">&para;</a></h3>
<p>This page describes the format of the rights file for the <code>from_file</code> authentication backend. The configuration option <code>file</code> in the <code>rights</code> section must point to the rights file.</p> <p>This section describes the format of the rights file for the <code>from_file</code> authentication backend. The configuration option <code>file</code> in the <code>rights</code> section must point to the rights file.</p>
<p>The recommended rights method is <code>owner_only</code>. If access to calendars and address books outside of the home directory of users (that's <code>/USERNAME/</code>) is granted, clients won't detect these collections and will not show them to the user. This is only useful if you access calendars and address books directly via URL.</p> <p>The recommended rights method is <code>owner_only</code>. If access to calendars and address books outside of the home directory of users (that's <code>/USERNAME/</code>) is granted, clients won't detect these collections and will not show them to the user. This is only useful if you access calendars and address books directly via URL.</p>
<p>An example rights file:</p> <p>An example rights file:</p>
<div class="sourceCode" id="cb35"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb35-1"><a href="#cb35-1"></a><span class="co"># The user "admin" can read and write any collection.</span></span> <div class="sourceCode" id="cb33"><pre class="sourceCode ini"><code class="sourceCode ini"><span id="cb33-1"><a href="#cb33-1"></a><span class="co"># Allow reading root collection for authenticated users</span></span>
<span id="cb35-2"><a href="#cb35-2"></a><span class="kw">[admin]</span></span> <span id="cb33-2"><a href="#cb33-2"></a><span class="kw">[root]</span></span>
<span id="cb35-3"><a href="#cb35-3"></a><span class="dt">user </span><span class="ot">=</span><span class="st"> admin</span></span> <span id="cb33-3"><a href="#cb33-3"></a><span class="dt">user: .+</span></span>
<span id="cb35-4"><a href="#cb35-4"></a><span class="dt">collection </span><span class="ot">=</span><span class="st"> .*</span></span> <span id="cb33-4"><a href="#cb33-4"></a><span class="dt">collection:</span></span>
<span id="cb35-5"><a href="#cb35-5"></a><span class="dt">permission </span><span class="ot">=</span><span class="st"> rw</span></span> <span id="cb33-5"><a href="#cb33-5"></a><span class="dt">permissions: R</span></span>
<span id="cb35-6"><a href="#cb35-6"></a></span> <span id="cb33-6"><a href="#cb33-6"></a></span>
<span id="cb35-7"><a href="#cb35-7"></a><span class="co"># Block access for the user "user" to everything.</span></span> <span id="cb33-7"><a href="#cb33-7"></a><span class="co"># Allow reading and writing principal collection (same as user name)</span></span>
<span id="cb35-8"><a href="#cb35-8"></a><span class="kw">[block]</span></span> <span id="cb33-8"><a href="#cb33-8"></a><span class="kw">[principal]</span></span>
<span id="cb35-9"><a href="#cb35-9"></a><span class="dt">user </span><span class="ot">=</span><span class="st"> user</span></span> <span id="cb33-9"><a href="#cb33-9"></a><span class="dt">user: .+</span></span>
<span id="cb35-10"><a href="#cb35-10"></a><span class="dt">collection </span><span class="ot">=</span><span class="st"> .*</span></span> <span id="cb33-10"><a href="#cb33-10"></a><span class="dt">collection: %(login)s</span></span>
<span id="cb35-11"><a href="#cb35-11"></a><span class="dt">permission </span><span class="ot">=</span></span> <span id="cb33-11"><a href="#cb33-11"></a><span class="dt">permissions: RW</span></span>
<span id="cb35-12"><a href="#cb35-12"></a></span> <span id="cb33-12"><a href="#cb33-12"></a></span>
<span id="cb35-13"><a href="#cb35-13"></a><span class="co"># Authenticated users can read and write their own collections.</span></span> <span id="cb33-13"><a href="#cb33-13"></a><span class="co"># Allow reading and writing calendars and address books that are direct</span></span>
<span id="cb35-14"><a href="#cb35-14"></a><span class="kw">[owner-write]</span></span> <span id="cb33-14"><a href="#cb33-14"></a><span class="co"># children of the principal collection</span></span>
<span id="cb35-15"><a href="#cb35-15"></a><span class="dt">user </span><span class="ot">=</span><span class="st"> .+</span></span> <span id="cb33-15"><a href="#cb33-15"></a><span class="kw">[calendars]</span></span>
<span id="cb35-16"><a href="#cb35-16"></a><span class="dt">collection </span><span class="ot">=</span><span class="st"> %(login)s(/.*)?</span></span> <span id="cb33-16"><a href="#cb33-16"></a><span class="dt">user: .+</span></span>
<span id="cb35-17"><a href="#cb35-17"></a><span class="dt">permission </span><span class="ot">=</span><span class="st"> rw</span></span> <span id="cb33-17"><a href="#cb33-17"></a><span class="dt">collection: %(login)s/</span><span class="kw">[^/]</span><span class="dt">+</span></span>
<span id="cb35-18"><a href="#cb35-18"></a></span> <span id="cb33-18"><a href="#cb33-18"></a><span class="dt">permissions: rw</span></span></code></pre></div>
<span id="cb35-19"><a href="#cb35-19"></a><span class="co"># Everyone can read the root collection</span></span>
<span id="cb35-20"><a href="#cb35-20"></a><span class="kw">[read]</span></span>
<span id="cb35-21"><a href="#cb35-21"></a><span class="dt">user </span><span class="ot">=</span><span class="st"> .*</span></span>
<span id="cb35-22"><a href="#cb35-22"></a><span class="dt">collection </span><span class="ot">=</span></span>
<span id="cb35-23"><a href="#cb35-23"></a><span class="dt">permission </span><span class="ot">=</span><span class="st"> r</span></span></code></pre></div>
<p>The titles of the sections are ignored (but must be unique). The keys <code>user</code> and <code>collection</code> contain regular expressions, that are matched against the user name and the path of the collection. Permissions from the first matching section are used. If no section matches, access gets denied.</p> <p>The titles of the sections are ignored (but must be unique). The keys <code>user</code> and <code>collection</code> contain regular expressions, that are matched against the user name and the path of the collection. Permissions from the first matching section are used. If no section matches, access gets denied.</p>
<p>The user name is empty for anonymous users. Therefore, the regex <code>.+</code> only matches authenticated users and <code>.*</code> matches everyone (including anonymous users).</p> <p>The user name is empty for anonymous users. Therefore, the regex <code>.+</code> only matches authenticated users and <code>.*</code> matches everyone (including anonymous users).</p>
<p>The path of the collection is separated by <code>/</code> and has no leading or trailing <code>/</code>. Therefore, the path of the root collection is empty.</p> <p>The path of the collection is separated by <code>/</code> and has no leading or trailing <code>/</code>. Therefore, the path of the root collection is empty.</p>
<p><code>%(login)s</code> gets replaced by the user name and <code>%(path)s</code> by the path of the collection. You can also get groups from the <code>user</code> regex in the <code>collection</code> regex with <code>{1}</code>, <code>{2}</code>, etc.</p> <p><code>%(login)s</code> gets replaced by the user name and <code>%(path)s</code> by the path of the collection. You can also use groups from the <code>user</code> regex in the <code>collection</code> regex with <code>{1}</code>, <code>{2}</code>, etc.</p>
<p>The following <code>permissions</code> are recognized:</p>
<ul>
<li><strong>R</strong>: read a collection (excluding address book or calendar collections)</li>
<li><strong>r</strong>: read an address book or calendar collection</li>
<li><strong>W</strong>: write a collection (excluding address book or calendar collections)</li>
<li><strong>w</strong>: write an address book or calendar collection</li>
</ul>
</section> </section>
<section class="level3" id="documentation/storage"> <section class="level3" id="documentation/storage">
<h3>Storage <a class="headerlink" href="#documentation/storage">&para;</a></h3> <h3>Storage <a class="headerlink" href="#documentation/storage">&para;</a></h3>
<p>This document describes the layout and format of the file system storage (<code>multifilesystem</code> backend).</p> <p>This document describes the layout and format of the file system storage (<code>multifilesystem</code> backend).</p>
<p>It's safe to access and manipulate the data by hand or with scripts. Scripts can be invoked manually, periodically (e.g. with <a href="https://manpages.debian.org/unstable/cron/cron.8.en.html">cron</a>) or after each change to the storage with the configuration option <code>hook</code> in the <code>storage</code> section (e.g. <a href="#documentation/versioning">Git Versioning</a>).</p> <p>It's safe to access and manipulate the data by hand or with scripts. Scripts can be invoked manually, periodically (e.g. with <a href="https://manpages.debian.org/unstable/cron/cron.8.en.html">cron</a>) or after each change to the storage with the configuration option <code>hook</code> in the <code>storage</code> section (e.g. <a href="#tutorials/versioning-with-git">Versioning with Git</a>).</p>
<section class="level4" id="documentation/storage/layout"> <section class="level4" id="documentation/storage/layout">
<h4>Layout <a class="headerlink" href="#documentation/storage/layout">&para;</a></h4> <h4>Layout <a class="headerlink" href="#documentation/storage/layout">&para;</a></h4>
<p>The file system contains the following files and folders:</p> <p>The file system contains the following files and folders:</p>
@ -929,10 +877,10 @@ user2:password2
<section class="level5" id="documentation/storage/locking/linux-shell-scripts"> <section class="level5" id="documentation/storage/locking/linux-shell-scripts">
<h5>Linux shell scripts <a class="headerlink" href="#documentation/storage/locking/linux-shell-scripts">&para;</a></h5> <h5>Linux shell scripts <a class="headerlink" href="#documentation/storage/locking/linux-shell-scripts">&para;</a></h5>
<p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a> utility.</p> <p>Use the <a href="https://manpages.debian.org/unstable/util-linux/flock.1.en.html">flock</a> utility.</p>
<div class="sourceCode" id="cb36"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb36-1"><a href="#cb36-1"></a><span class="co"># Exclusive</span></span> <div class="sourceCode" id="cb34"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1"></a><span class="co"># Exclusive</span></span>
<span id="cb36-2"><a href="#cb36-2"></a>$ <span class="ex">flock</span> --exclusive /path/to/storage/.Radicale.lock COMMAND</span> <span id="cb34-2"><a href="#cb34-2"></a>$ <span class="ex">flock</span> --exclusive /path/to/storage/.Radicale.lock COMMAND</span>
<span id="cb36-3"><a href="#cb36-3"></a><span class="co"># Shared</span></span> <span id="cb34-3"><a href="#cb34-3"></a><span class="co"># Shared</span></span>
<span id="cb36-4"><a href="#cb36-4"></a>$ <span class="ex">flock</span> --shared /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div> <span id="cb34-4"><a href="#cb34-4"></a>$ <span class="ex">flock</span> --shared /path/to/storage/.Radicale.lock COMMAND</span></code></pre></div>
</section> </section>
<section class="level5" id="documentation/storage/locking/linux-and-macos"> <section class="level5" id="documentation/storage/locking/linux-and-macos">
<h5>Linux and MacOS <a class="headerlink" href="#documentation/storage/locking/linux-and-macos">&para;</a></h5> <h5>Linux and MacOS <a class="headerlink" href="#documentation/storage/locking/linux-and-macos">&para;</a></h5>
@ -943,6 +891,15 @@ user2:password2
<p>Use <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202%28v=vs.85%29.aspx">LockFile</a> for exclusive access or <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203%28v=vs.85%29.aspx">LockFileEx</a> which also supports shared access. Setting <code>nNumberOfBytesToLockLow</code> to <code>1</code> and <code>nNumberOfBytesToLockHigh</code> to <code>0</code> works.</p> <p>Use <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365202%28v=vs.85%29.aspx">LockFile</a> for exclusive access or <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203%28v=vs.85%29.aspx">LockFileEx</a> which also supports shared access. Setting <code>nNumberOfBytesToLockLow</code> to <code>1</code> and <code>nNumberOfBytesToLockHigh</code> to <code>0</code> works.</p>
</section> </section>
</section> </section>
<section class="level4" id="documentation/storage/manually-creating-collections">
<h4>Manually creating collections <a class="headerlink" href="#documentation/storage/manually-creating-collections">&para;</a></h4>
<p>To create a new collection, you have to create the corresponding folder in the file system storage (e.g. <code>collection-root/user/calendar</code>). To tell Radicale and clients that the collection is a calendar, you have to create the file <code>.Radicale.props</code> with the following content in the folder:</p>
<div class="sourceCode" id="cb35"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb35-1"><a href="#cb35-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VCALENDAR"</span><span class="fu">}</span></span></code></pre></div>
<p>The calendar is now available at the URL path <code>/user/calendar</code>. For address books the file must contain:</p>
<div class="sourceCode" id="cb36"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb36-1"><a href="#cb36-1"></a><span class="fu">{</span><span class="dt">"tag"</span><span class="fu">:</span> <span class="st">"VADDRESSBOOK"</span><span class="fu">}</span></span></code></pre></div>
<p>Calendar and address book collections must not have any child collections. Clients with automatic discovery of collections will only show calendars and addressbooks that are direct children of the path <code>/USERNAME/</code>.</p>
<p>Delete collections by deleting the corresponding folders.</p>
</section>
</section> </section>
<section class="level3" id="documentation/logging"> <section class="level3" id="documentation/logging">
<h3>Logging <a class="headerlink" href="#documentation/logging">&para;</a></h3> <h3>Logging <a class="headerlink" href="#documentation/logging">&para;</a></h3>
@ -950,9 +907,9 @@ user2:password2
</section> </section>
<section class="level3" id="documentation/architecture"> <section class="level3" id="documentation/architecture">
<h3>Architecture <a class="headerlink" href="#documentation/architecture">&para;</a></h3> <h3>Architecture <a class="headerlink" href="#documentation/architecture">&para;</a></h3>
<p>Radicale is a really small piece of software, but understanding it is not as easy as it seems. But don't worry, reading this short page is enough to understand what a CalDAV/CardDAV server is, and how Radicale's code is organized.</p> <p>Radicale is a really small piece of software, but understanding it is not as easy as it seems. But don't worry, reading this short section is enough to understand what a CalDAV/CardDAV server is, and how Radicale's code is organized.</p>
<section class="level4" id="documentation/architecture/general-architecture"> <section class="level4" id="documentation/architecture/protocol-overview">
<h4>General Architecture <a class="headerlink" href="#documentation/architecture/general-architecture">&para;</a></h4> <h4>Protocol overview <a class="headerlink" href="#documentation/architecture/protocol-overview">&para;</a></h4>
<p>Here is a simple overview of the global architecture for reaching a calendar or an address book through network:</p> <p>Here is a simple overview of the global architecture for reaching a calendar or an address book through network:</p>
<div class="tableContainer"><table> <div class="tableContainer"><table>
<thead> <thead>
@ -1029,7 +986,8 @@ user2:password2
<span id="cb37-2"><a href="#cb37-2"></a></span> <span id="cb37-2"><a href="#cb37-2"></a></span>
<span id="cb37-3"><a href="#cb37-3"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span> <span id="cb37-3"><a href="#cb37-3"></a><span class="im">from</span> distutils.core <span class="im">import</span> setup</span>
<span id="cb37-4"><a href="#cb37-4"></a></span> <span id="cb37-4"><a href="#cb37-4"></a></span>
<span id="cb37-5"><a href="#cb37-5"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>, packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div> <span id="cb37-5"><a href="#cb37-5"></a>setup(name<span class="op">=</span><span class="st">"radicale_static_password_auth"</span>,</span>
<span id="cb37-6"><a href="#cb37-6"></a> packages<span class="op">=</span>[<span class="st">"radicale_static_password_auth"</span>])</span></code></pre></div>
<p>In the same folder create the sub-folder <code>radicale_static_password_auth</code>. The folder must have the same name as specified in <code>packages</code> above.</p> <p>In the same folder create the sub-folder <code>radicale_static_password_auth</code>. The folder must have the same name as specified in <code>packages</code> above.</p>
<p>Create the file <code>__init__.py</code> in the <code>radicale_static_password_auth</code> folder with the following content:</p> <p>Create the file <code>__init__.py</code> in the <code>radicale_static_password_auth</code> folder with the following content:</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb38-1"><a href="#cb38-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span> <div class="sourceCode" id="cb38"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb38-1"><a href="#cb38-1"></a><span class="im">from</span> radicale.auth <span class="im">import</span> BaseAuth</span>
@ -1134,7 +1092,7 @@ user2:password2
<li><a href="http://packages.ubuntu.com/radicale">Ubuntu</a> by the MOTU and Jonas Smedegaard</li> <li><a href="http://packages.ubuntu.com/radicale">Ubuntu</a> by the MOTU and Jonas Smedegaard</li>
</ul> </ul>
<p>Radicale is also <a href="https://cloudron.io/button.html?app=org.radicale.cloudronapp">available on Cloudron</a> and has a Dockerfile.</p> <p>Radicale is also <a href="https://cloudron.io/button.html?app=org.radicale.cloudronapp">available on Cloudron</a> and has a Dockerfile.</p>
<p>If you are interested in creating packages for other Linux distributions, read the <a href="#contribute">"Contribute" page</a>.</p> <p>If you are interested in creating packages for other Linux distributions, read the <a href="#contribute">"Contribute" section</a>.</p>
</section> </section>
</section> </section>
<section class="level2" id="about"> <section class="level2" id="about">
@ -1165,7 +1123,7 @@ user2:password2
<h5>Simple <a class="headerlink" href="#about//technical-choices/simple">&para;</a></h5> <h5>Simple <a class="headerlink" href="#about//technical-choices/simple">&para;</a></h5>
<p>Radicale is designed to be simple to install, simple to configure, simple to use.</p> <p>Radicale is designed to be simple to install, simple to configure, simple to use.</p>
<p>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.</p> <p>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.</p>
<p>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 <a href="#documentation/tutorial">tutorial</a>.</p> <p>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 <a href="#tutorials/simple-5-minute-setup">tutorial</a>.</p>
</section> </section>
<section class="level5" id="about//technical-choices/lazy"> <section class="level5" id="about//technical-choices/lazy">
<h5>Lazy <a class="headerlink" href="#about//technical-choices/lazy">&para;</a></h5> <h5>Lazy <a class="headerlink" href="#about//technical-choices/lazy">&para;</a></h5>