CALDav Calendar Server using Radicale
November 04, 2018 08:03AM
In my first debian installation on dockstar I used OwnCloud for some private calendars.
The other features of owncloud are so slow in Dockstar, that they are not used at all by my family...

As I needed fast replacement to keep our family calendars running, I decided to look for something more "light" than OwnCloud.

I decided to try to run radicale on my linux PC as a fast replacement.

Now I moved the radicale installation from my linux PC to the (just revived) dockstar, after installing python3 based radicale there via PIP.

Radicale in the default installation is not using a database, but a lot of *.ics files in a directory tree behind a root "collections" folder to keep all the data of the calendars...

Moving the data of the calendars from linux pc to dockstar was not more than copying the "collections" folder tree....

Up and running again ...
Now the hard work will be to get the mobile devices of my family in hand to modify CalDavSync settings ...

I don't know, how the reaction times will be, when the calendars are filled with more data, but up to now, the reaction time is much faster, and (thanks to PIP) it is much easier to make software updates than with OwnCloud ....

Disadvantages
- There are no Browser based calendars, it is only possible to access the calendars via CalDav (e. g. Android CalDavSync App for Android Calendar)
- Thunderbird's Calendar Plugin is actually rejected and blocked by TB version 60, so my favorite calendar data entry method is blocked ....



Edited 5 time(s). Last edit at 11/04/2018 08:41AM by Martin aus Dortmund.
Re: CALDav Calendar Server using Radicale
November 05, 2018 06:06AM
i think a HOWTO on this lightweight solution would be good to have in the WIKI
Re: CALDav Calendar Server using Radicale
November 05, 2018 06:57AM
> i think a HOWTO on this lightweight solution would
> be good to have in the WIKI

+1

@Martin,
Please post some details, a HOWTO would be nice! but even a log of installation/setup commands executed would be suffice.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: CALDav Calendar Server using Radicale
November 05, 2018 07:09AM
Martin aus Dortmund Wrote:
-------------------------------------------------------
> Now I moved the radicale installation from my linux PC to the (just revived) dockstar, after installing python3 based radicale there via PIP.
>
If you installed the radicale package using python's pip utility, then the installation is only available locally to the user account, isn't it? A better approach is to use apt-get utility to install the package, i.e. apt-get update; apt-get full-upgrade; apt-get install radicale . This way, all the files from the python-radicale package will be properly installed in the correct path and be accessible for all users.
Martin from Dortmund
Re: CALDav Calendar Server using Radicale
November 05, 2018 08:02AM
I do'nt know, why, but I have used the recipe from https://radicale.org/

- change to superuser

su


- install python3 via apt-get
- install python3-pip via apt-get

$ python3 -m pip install --upgrade radicale
$ python3 -m radicale --config "" --storage-filesystem-folder=~/.var/lib/radicale/collections

(I have changed the --storage-filesytem-folder to an attached USB HDD, and made an explicit config.)

- leave superuser

I will provide more details later ...
Re: CALDav Calendar Server using Radicale
November 05, 2018 12:48PM
So, here my way to get running radicale

- Linux is installed on USB stick
- logging and caledar collection moved to the attached USB-HDD

snippet from "/etc/rc.local"

.....
# secure mounting with file system check of mounted partitions

fsck UUID=04aae5de-6bed-4faa-999c-68ba85b591a4
if [ $? -eq 0 ]
then
  mount UUID=04aae5de-6bed-4faa-999c-68ba85b591a4 /mnt/data
  python3 -m radicale --config "/etc/radicale/config" --storage-filesystem-folder=/mnt/data/Martin/Radicale/radicale/collections &
else
  echo file system check failed, 'mnt/data' not mounted
fi
fsck UUID=44d90f04-3a0e-4fac-8993-853b3d60afd3
if [ $? -eq 0 ]
then
  mount UUID=44d90f04-3a0e-4fac-8993-853b3d60afd3 /mnt/unterhaltung
else
  echo file system check failed, 'mnt/unterhaltung' not mounted
fi
fsck UUID=e7f3cfb0-6abf-4591-9d18-2ae7bc92be2e
if [ $? -eq 0 ]
then
  mount UUID=e7f3cfb0-6abf-4591-9d18-2ae7bc92be2e /mnt/backup
else
  echo file system check failed, 'mnt/backup' not mounted
fi

exit 0
root@debian:~#

config is also quite straigthforward, only slight changes to automatically generated config files

# -*- mode: conf -*-
# vim:ft=cfg

# Config file for Radicale - A simple calendar server
#
# Place it into /etc/radicale/config (global)
# or ~/.config/radicale/config (user)
#
# The commented out values are the defaults.


[server]
# CalDAV server hostnames separated by a comma
# IPv4 syntax: address:port
# IPv6 syntax: [address]:port
# IPv6 adresses are configured to only allow IPv6 connections
hosts = 0.0.0.0:5232
# Daemon flag
# daemon = False
# File storing the PID in daemon mode
# pid = /etc/radicale/pid
# SSL flag, enable HTTPS protocol
#ssl = False
# SSL certificate path
#certificate = /etc/apache2/ssl/server.crt
# SSL private key
#key = /etc/apache2/ssl/server.key
# Reverse DNS to resolve client address in logs
#dns_lookup = True
# Root URL of Radicale (starting and ending with a slash)
#base_prefix = /
# Message displayed in the client when a password is needed
#realm = Radicale - Password Required lol


[encoding]
# Encoding for responding requests
#request = utf-8
# Encoding for storing local collections
#stock = utf-8


[auth]
# Authentication method
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http
type = None

# Usernames used for public collections, separated by a comma
#public_users = public
# Usernames used for private collections, separated by a comma
#private_users = private

# Htpasswd filename
# htpasswd_filename = /etc/radicale/users
# Htpasswd encryption method
# Value: plain | sha1 | crypt
# htpasswd_encryption = plain

# LDAP server URL, with protocol and port
#ldap_url = ldap://localhost:389/
# LDAP base path
#ldap_base = ou=users,dc=example,dc=com
# LDAP login attribute
#ldap_attribute = uid
# LDAP filter string
# placed as X in a query of the form (&(...)X)
# example: (objectCategory=Person)(objectClass=User)(memberOf=cn=calenderusers,ou=users,dc=example,dc=org)
# leave empty if no additional filter is needed
#ldap_filter =
# LDAP dn for initial login, used if LDAP server does not allow anonymous searches
# Leave empty if searches are anonymous
#ldap_binddn =
# LDAP password for initial login, used with ldap_binddn
#ldap_password =
# LDAP scope of the search
#ldap_scope = OneLevel

# IMAP Configuration
#imap_hostname = localhost
#imap_port = 143
#imap_ssl = False

# PAM group user should be member of
#pam_group_membership =

# Path to the Courier Authdaemon socket
#courier_socket =

# HTTP authentication request URL endpoint
#http_url =
# POST parameter to use for username
#http_user_parameter =
# POST parameter to use for password
#http_password_parameter =


[rights]
# Rights management method
# Value: None | owner_only | owner_write | from_file
#type = None

# File for rights management from_file
#file = ~/.config/radicale/rights


[storage]
# Storage backend
# Value: filesystem | database
#type = filesystem

# Folder for storing local collections, created if not present
filesystem_folder = /var/lib/radicale/collections

# Database URL for SQLAlchemy
# dialect+driver://user:password@host/dbname[?key=value..]
# For example: sqlite:///var/db/radicale.db, postgresql://user:password@localhost/radicale
# See http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#sqlalchemy.create_engine
#database_url =


[logging]
# Logging configuration file
# If no config is given, simple information is printed on the standard output
# For more information about the syntax of the configuration file, see:
# http://docs.python.org/library/logging.config.html
config = /etc/radicale/logging
# Set the default logging level to debug
#debug = False
# Store all environment variables (including those set in the shell)
#full_environment = False


# Additional HTTP headers
#[headers]
#Access-Control-Allow-Origin = *


/etc/radicale/logging

# -*- mode: conf -*-
# vim:ft=cfg

# Logging config file for Radicale - A simple calendar server
#
# The default path for this file is /etc/radicale/logging
# This can be changed in the configuration file
#
# Other handlers are available. For more information, see:
# http://docs.python.org/library/logging.config.html


# Loggers, handlers and formatters keys

[loggers]
# Loggers names, main configuration slots
keys = root

[handlers]
# Logging handlers, defining logging output methods
keys = console,file

[formatters]
# Logging formatters
keys = simple,full


# Loggers

[logger_root]
# Root logger
level = DEBUG
handlers = file
# Enable the following instead if you also want console logging
#handlers = console,file


# Handlers

[handler_console]
# Console handler
class = StreamHandler
level = DEBUG
args = (sys.stdout,)
formatter = simple

[handler_file]
# File handler.web/
class = FileHandler
# args = ('/var/log/radicale/radicale.log',)
args = ('/mnt/data/Martin/Radicale/radicale/log/radicale.log',)
level = INFO
formatter = full


# Formatters

[formatter_simple]
# Simple output format
format = %(message)s

[formatter_full]
# Full output format
format = %(asctime)s - %(levelname)s: %(message)s



Some hints

- Importing calendar data seems to be possible by exporting a chunk of ICS-files and put them into the correct collections sub-folder....

As my old dockstar installation crashed, the old calendar data was lost there, but I was able to export the local copys from my smartphone calendar in ICS format ... better than typing in again ...

Collections directory tree (three calendars, one adress book)

root@debian:/mnt/data/Martin/Radicale/radicale/collections/collection-root/martin# ls
.   340e55ca-f909-b3f4-a1df-3323fd75846f  b998cab2-951c-83a4-55a9-ccf705f32013
..  4ec70d0f-36e2-da1b-e9a9-1b0eb015513b  e7a1e379-8123-6c73-7479-dc79efb240a9

my calendar data is the one in the folder "e7a...."

.Radicale.cache
.Radicale.props
04f7e732-1cd6-464f-8bf0-a59092a02166.1531252266680.ics
0e6e034c-0d33-44f0-8264-880136b60f45.1538684959733.ics
1b0708e4-b167-4674-9c7e-5b1128213020.ics
1be649bf-4ea7-4a31-9ea1-1bae1d115eef.ics
3271d9b2-233f-4f9b-95bb-83c1cdb8b0ee.ics
32e59fd0-4212-4e5c-a797-62467bb72c52.ics
4248e864-42b6-42d1-b90f-f35cd2fbef95.ics
4a84e510-cd10-4ef7-a5e1-b20daa7f40c4.ics
51bb2e53-b43b-47bc-bcce-2a757b33be2d.ics
5b169412-552e-4402-a5da-7d645a13b3e8.ics
5d2c361c-9580-4a0c-ad7a-02d1e981bbc2.ics
751143dd-b20b-4c6a-807c-e43a82f93167.ics
758535e4-7528-4ab8-a0d7-d2334f7f126c.ics
7abb8af3-ee24-4f4b-ad9e-4ab1ef2bf366.ics
7d089cf5-e23c-472b-9797-8fe070f65bc1.ics
8e1dc286-0fc0-4a5c-9193-046b1a588e9f.ics
9540aafd-6c75-469d-8663-aba6be3e1e04.1539292848421.ics
9613b717-82c0-46ff-a2b0-cc07a60a98b2.1533535535062.ics
971ac3bd-45a8-4abb-b99b-5f8150e4a694.1531763321217.ics
a124b997-7e05-437e-9901-4f52b8b05e0c.ics
a8388741-124c-440a-b828-a8d6cf7888d0.ics
aa621b3f-5b7d-40b4-91fd-09c60b9d3c73.1539208480664.ics
ab98b0e2-08af-470f-a526-887021ec14b0.1539011712455.ics
b683b077-69d6-400c-9bad-daa65ec04d46.1536387130695.ics
bb25d1c6-7f86-462e-991d-8c1e504744c5.ics
bb64a333-3e0f-40bd-ad1e-efd9842f45c6.ics
c6edc5f1-550a-4235-85a0-5e564d1811b6.ics
c73c77aa-8de0-48a1-bf56-b63c9e297400.1536692732714.ics
d13be798-5243-4935-a300-b486e8b18e29.ics
d66b7636-f80b-4afb-92e9-90800bfa43af.1539011712223.ics
e96ce8ce-3901-40f6-a0af-e41e7a5cd5fe.ics
eaccfa3a-4d63-40dc-8fc9-144c09119b9a.1539144067813.ics
eb9bddcb-6a4c-4d5f-9453-a1f4eff1b89f.1539011712677.ics
f6578820-1b29-47ae-b53e-7b44ec5811b8.ics
roman.ics

the red one is stored manually after exporting it from smartphone ...



Edited 4 time(s). Last edit at 11/05/2018 01:11PM by Martin aus Dortmund.
Re: CALDav Calendar Server using Radicale
November 05, 2018 03:58PM
Updated the Wiki thread


Quote

Home Automation & Tools

X10
CALDav Calendar Server using Radicale

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: