Radicale: Difference between revisions

From NixOS Wiki
imported>Mic92
nicer indentation
imported>Jicksaw
Update examples to use 'settings' instead of the deprecated 'config'
Line 5: Line 5:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.radicale = {
services.radicale = {
    enable = true;
  enable = true;
    config = ''
  settings.server.hosts = [ "0.0.0.0:5232" ];
      [server]
      # Bind all interfaces on port 5232
      hosts = 0.0.0.0:5232
    '';
};
};
</syntaxhighlight>
</syntaxhighlight>


The <code>config</code> is standard Radicale configuration, see https://radicale.org/configuration/
The <code>settings</code> is standard Radicale configuration, see https://radicale.org/configuration/


== Authentication ==
== Authentication ==
Line 22: Line 18:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.radicale = {
services.radicale = {
    enable = true;
  enable = true;
    config = ''
  settings = {
      [server]
    server.hosts = [ "0.0.0.0:5232" ];
      hosts = 0.0.0.0:5232
    auth = {
 
       type = "htpasswd";
      [auth]
       htpasswd_filename = "/path/to/htpasswd/file/radicale_users";
       type = htpasswd
       htpasswd_filename = /path/to/htpasswd/file/radicale_users
       # hash function used for passwords. May be `plain` if you don't want to hash the passwords
       # hash function used for passwords. May be `plain` if you don't want to hash the passwords
       htpasswd_encryption = bcrypt
       htpasswd_encryption = "bcrypt";
     '';
     };
  };
};
};
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:20, 7 September 2021

Radicale is a Free and Open-Source CalDAV (calendars, todo-lists) and CardDAV (contacts) Server. For more information about Radicale itself, see https://radicale.org/

This basic configuration will run the server. Note that you might want to allow the port (5232 in this case) on you firewall

services.radicale = {
  enable = true;
  settings.server.hosts = [ "0.0.0.0:5232" ];
};

The settings is standard Radicale configuration, see https://radicale.org/configuration/

Authentication

The default authentication mode is None which just allows all usernames and passwords. Other option is to use an Apache htpasswd file for authentication.

services.radicale = {
  enable = true;
  settings = {
    server.hosts = [ "0.0.0.0:5232" ];
    auth = {
      type = "htpasswd";
      htpasswd_filename = "/path/to/htpasswd/file/radicale_users";
      # hash function used for passwords. May be `plain` if you don't want to hash the passwords
      htpasswd_encryption = "bcrypt";
    };
  };
};

See also