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
	ServerName my.server.name
	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/wsgi.py
	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 >
   <Files wsgi.py>
            Require all granted
        </Files>
        WSGIProcessGroup server-skeleton
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>
	SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
</VirtualHost>

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
./manage.py migrate

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

./manage.py runserver 0.0.0.0:7000

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

./manage.py 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?
YN

Leave a Reply

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