Etesync : Encrypted Caldav and Carddav on Apache debian setup

Etesync enables an encrypted private caldav and carddav server. Its open source and can be self hosted or used directly through them.

Their github page has instructions for nginx but nothing to get django setup with wsgi on apache. To get it all working, download the zip and unpack from github to the www folder.

For apache config I have the following setup,

<VirtualHost *:443>
        Protocols h2 h2c http/1.1
	DocumentRoot /var/www/server-skeleton
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
	DirectoryIndex index.html index.htm index.php index.php4 index.php5
	WSGIScriptAlias / /var/www/server-skeleton/etesync_server/
	WSGIDaemonProcess server-skeleton python-path=/var/www/server-skeleton python-home=/var/www/server-skeleton/ete
	WSGIProcessGroup server-skeleton
	Alias /static /var/www/server-skeleton/static
<Directory /var/www/server-skeleton/etesync_server >
            Require all granted
        WSGIProcessGroup server-skeleton
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
	SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

To get Etesync up and running, creat a virtualenv

virtualenv ete

Activate the environment, install, migrate, collect static

source ete/bin/activate
pip install -r requirements.txt
./ migrate

At this point you can test the development server running the below command and heading to your FQDN and port 7000.

./ runserver

IF you get your test page running, head back to the console and

./ createsuperuser

and create your super user. Head to https://your.server.nam/admin and create a new unprivileged user. Then download the etesync app and start syncing your encrypted contacts and calendar.

I have setup the backend to use MySql rather than the sqlite it ships with, ill update that soon too.

Interesting || Helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *