Setting up a private OmniFocus sync server with Nginx

Author: | Posted in Allgemein No comments

OmniFocus is is an outstanding task manager for MacOS and iOS from OmniGroup. It works with the Getting Things Done® methodology and helps you to manage your task list. Keeping your tasks outside of your head, helps you to concentrate on your work and not on your tasks.

To good thing with OmniFocus is, that you can sync your data with your iPhone or iPad. You can use either OmniGroups sync server or you can use your own WebDAV server. OmniFocus supports also push updates through APNS, even if you use your own sync server, which is really nice.

Starting with OmniFocus for Mac 2.9 and OmniFocus for iOS 2.19, the Nginx web server is also supported. It is now finally possible to use Nginx as a WebDAV server for OmniFocus without implementing any weird hacks .

Before you start with the configuration, please make sure your Nginx web server is built with the HTTP_DAV and HTTP_DAV_EXT modules. Verify with the command  “nginx -V” if Nginx is built with these modules.

If the modules are present in your Nginx setup, we can start with the configuration…

As a first step, we have to create a htpasswd file for authentication. As Nginx does not provide a utility for that, we have to use this magic command to create a htpasswd file:

echo -e "your-username:`perl -le 'print crypt("your-password","salt")'`" > htpasswd

Copy the htpasswd to right place and make sure, that not everybody can access the file.

The next step is the configuring Nginx. Start your favorite editor and place the settings bellow within the server context in your nginx.conf file

location /webdav {
        root             /var/webdav/$remote_user;
        dav_methods      PUT DELETE MKCOL COPY MOVE;
        dav_ext_methods  PROPFIND OPTIONS;
        dav_access       user:rw group:rw;
        client_body_temp_path /tmp;
        auth_basic        "Login";
        auth_basic_user_file /usr/local/etc/nginx/htpasswd;
}

Make sure that you have created the directory /var/webdav/user/webdav directory for every user.

That’s it. Reload your web server and you can start now with syncing your OmniFocus data with your own Nginx installation.

Add Your Comment