I’ve recently been using VoodooPad as a note taking and organization tool. I’m enjoying using it and find that the combination of Wiki-like organization, editing and linking of content combined with the responsiveness of a desktop application works very well for me.
As a user of both desktop and laptop computers, I quickly ran into the need to synchronize my two VoodooPad instances. Since VP stores all your notes in a single file (actually an OS X package) my first thought was to drop it in my DropBox folder and be done with it. This could work fine but you’ve got to be extremely careful to not change your document in multiple places—the DropBox mechanism has no idea how to synchronize changes within the documents.
Fortunately VP has built in support for synchronizing with a WebDAV server. VP’s developer directs folks to MobileMe as a readily available WebDAV server, but I don’t have an account there and don’t have much interest in subscribing. That left me with the option of setting up my own WebDAV server. The documentation points users to a great article by Manas Tungare which describes how to set up WebDAV on Mac OS X for use with another program, OmniFocus.
This article gave me everything I needed to quickly get a WebDAV server set up on my system. What follows here is my remix of Manas’ article, with a few tweaks that better accommodate my preferences and VPs capabilities, especially in the security arena.
Setting up WebDAV on Mac OS X for use with VoodooPad
Step 1: Enable Web Sharing in OS X
WebDAV is a protocol for storing documents to a Web server, so we’ll need to get one of those set up. Fortunately Mac OS X has the Apache Web Server built-in. Just go to System Preferences > Sharing and check the box labeled Web Sharing.

Step 2: Enable WebDAV support in Apache
Edit the file /etc/apache2/httpd.conf, (remember to use sudo to edit it) and locate this line:
LoadModule dav_module libexec/apache2/mod_dav.so
Make sure it is not commented out (there should be no “#” at the beginning of the line.)
Next, locate this line (towards the bottom of the file):
Include /private/etc/apache2/extra/httpd-dav.conf
Again, make sure it is not commented out. It is disabled by default, so you need to remove the “#” from this line.
Finally, because we will use digest authentication here, go back up to the LoadModule section of the file and make sure that auth_digest_module is being loaded. You are looking for the following line, and want to make sure it is not commented out.
LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so
The stock Snow Leopard config file has it enabled, so chances are you won’t need to make any changes.
Step 3: Configure WebDAV
Next, edit the file /etc/apache2/extra/httpd-dav.conf. Add a section in it to create your new WebDAV share. Here’s what the new section should look like. As a security precaution, you should also go ahead and delete the /usr/uploads share that is set by default.
Alias /webdav "/Library/WebServer/WebDAV" Dav On <Directory "/Library/WebServer/WebDAV"> Order Allow,Deny Allow from all AuthType Digest AuthName WebDAV-Realm AuthUserFile "/usr/var/webdav.passwd" </Directory> |
With the first line you’re telling Apache what URL to expose your WebDAV directory on. For example, if you are accessing the server via localhost, the above configuration would make your WebDAV URL equal to:
http://localhost/webdav/
With the Directory block you are actually configuring WebDAV access to the particular file location.
Line 9 is where this code block starts to differ from the configuration used by Manas. Unlike OmniFocus, VoodooPad works just fine with the more secure Digest authentication scheme, thus ensuring that your password isn’t sent over the wire in clear text.
Here we also, on line 13, tell Apache to only allow access by authenticated users. (The Manas configuration allowed read access by unauthenticated guest users.)
Step 4: Create the necessary directories.
sudo mkdir -p /Library/WebServer/WebDAV
sudo mkdir -p /usr/var
Step 5: Create user accounts and passwords
Now we use the htdigest tool to create your password file.
sudo htdigest -c /usr/var/webdav.passwd WebDAV-Realm "[username]"
New password:
Re-type new password:
Adding password for user [username]
Note that the “-c” specifies to create a new file. If you want to add additional users, get rid of the “-c” after the first time you issue htdigest.
Step 6: Setup permissions correctly.
sudo chown -R www:www /Library/WebServer/WebDAV
sudo chown -R www:www /usr/var
sudo chgrp www /usr/var/webdav.passwd
Step 7: Restart Apache gracefully.
sudo apachectl graceful
Step 8: Test WebDav
One convenient way to test your configuration is to attempt to mount your new WebDAV resource via Finder. To do this, open Finder and select Go > Connect to Server (⌘ K). Type your WebDAV URL, or http://localhost/webdav/ if you are on the server locally. Note that the trailing slash (“/”) is important, and you will not be able to connect without it.
You will be prompted by Finder to type in your username and password, and you need to be careful to enter these exactly as specified for the htdigest command.
Upon success, you will have mounted your WebDAV folder within Finder, and you should be able to copy a file to the folder.
Setting up VoodooPad using your new WebDAV server
For my needs, I’m planning to do all of my syncing on my local network. If you want to expose your WebDAV folder on the Internet, however, you will likely need additional configuration, such as setting up a dynamic DNS service, like DynDNS, and setting up your router/firewall to pass http traffic to your server.
Once any networking issues are resolved, configuring VoodooPad to use your new WebDAV server is pretty straightforward. On your primary machine, open the VP document that you want to sync, and then pull up the synchronization dialog from File > Synchronization Setup, enter your WebDAV URL, username and password. Your document is now being synchronized with the WebDAV server.

Since sync in VP is set up on a document by document basis, on your second machine you will need to create and save a new document. (I gave it the same name on both machines.) Then, when you set up sync for the second document, use the “Pair with document” option on the sync dialog to identify the corresponding document on your WebDAV server.
I was a bit worried that it might cause problems to sync the new document with the sample text to the real document in WebDAV but it all worked out just fine.
[...] I found this tutorial that have easy to follow steps to turn your Mac into a WebDAV server. Of course if you do not have [...]
Hey, I followed the steps, and when I get to Step 7, I get this:
line 82: ulimit: open files: cannot modify limit: Invalid argument
Also, when I do sudo apachectl -t, I get the following:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
Syntax error on line 99 of /private/etc/apache2/extra/httpd-ssl.conf:
SSLCertificateFile: file ‘/private/etc/apache2/server.crt’ does not exist or is empty
What have I done wrong?
Thanks,
Nik
Thanks for a very useful guide.
Would it be any more of a problem to run such a webdav on a machine that is not my own laptop (which I shut down when I leave the office)?
Rob
I also had a can’t connect error. Used “sudo apachectl -t” which pointed to an error on line 18 of httpd-dav.conf. That turned out to be Dav On in the wrong place; I had it twice, once before and once after the line. I removed the before one, and now it connects.
Thanks!
Thanks for this very useful guide!
Haven’t been able to get Finder to connect with the Connection failed dialog.
That didn’t work either. Email me if you want the modified code.
It looks like some of the code disappeared. I’ll try this:
Order Allow,Deny Allow from all Dav On AuthType Digest AuthName WebDAV-Realm AuthUserFile "/usr/webdav.passwd" require user laptoppcHi,
I tried your configuration, and was able to connect, but I was also still able to connect without a password in Basic mode.
Here is the configuration I used to only allow Digest mode and block Basic auth mode.
Order Allow,Deny
Allow from all
Dav On
AuthType Digest
AuthName WebDAV-Realm
AuthUserFile “/usr/webdav.passwd”
require user laptoppc
Thanks for this guide, but perhaps this line in Step 5, creating the /usr/var directory:
sudo mkdir -p /usr/var
should precede this line in Step 4, which requires the usr/var directory to exist:
sudo htdigest -c /usr/var/webdav.passwd WebDAV-Realm “[username]“
Thanks. Not sure how that bug survived for so long. I’ve updated the article.
[...] Setup of WebDAV setting up webdav on mac os x for use with voodoopad [...]
[...] Mac so that I could send files to and from it on my iPad with GoodReader. I found an article about setting up WebDAV on OS X, which was almost correct. Here’s my updates with the proper process and correct [...]
[...] Run a WebDAV server on your Mac to sync VoodooPad (for Free) (tags: apple webdav macosx apache) This was written by andy. Posted on Friday, December 11, 2009, at 1:35 am. Filed under Delicious. Bookmark the permalink. Follow comments here with the RSS feed. Post a comment or leave a trackback. [...]