Sabre/dav: open-source CardDAV, CalDAV and WebDAV server
sabre.io
sabre.io
I found sabre to be perfect. Its barebones as you need it to be. I use DAVx5 on android and add it as an account then changed my calendar/contact's default to that. So now my PC can push notifications to my phone and vise versa using thunderbird.
I enjoyed it so much that I use it to sync data to/from my phone 247. I have my music folder symlinked to sabre and using FolderSync it tries to copy the music anytime I'm connected to wifi. So, if I download a song I know that all my music will be auto copied to my phone.
Same goes for my camera. All my photos are auto copied over to my server. This is huge because my server is setup to run auto backups. It's basically icloud but entirely in my control.
Maybe there's a modern version of my setup, but this has been so great and ultra lightweight and works anywhere.
Really nice to have a tiny bit of legacy, the new open source projects I've been working on have never really quite picked up in the same way.
Oh, you said wifi and I read "home wifi", So I guess the WebDAV is exposed to the Internet and the phone can upload from any (wifi) connection in the world? That's more clever than my setup!
I have it behind an apache service which is password protected and only accepts https. As well, it uses fail2ban. If you ever ran a web server, you'll know your server will get bot scans 247. These only occur on the root domain and direct IP, so I disabled all root/direct IP access and moved it to a subdomain. I've never had issues.
I use samba as well, but that's only because this server works as my NAS as well. I setup a dedicated DAV folder on the NAS directory and give it extreme user restrictions, just incase. It's just a nice central server to keep all my devices in sync.
I've toyed with tailscale and ZeroTierOne - both should work fine with Bonjour/zeroconf if you need it - and handle routing (using lan when devices are on same net, routing over the internet when not).
There's also Nebula from slack (but I've not tried it).
Would love to see tailscale work with kernel wireguard clients (for better performance) - AFAIK today you'll have to pick one: easy setup with smart routing (ZeroTierOne / nebula / tailscale) - or - best in class performance with kernel space wireguard.
I removed that service since it was kind of clunky and always had connection issues. Perhaps I should try it again.
For clients, I use Evolution on Linux and DAVx5 [1] on Android.
I wrote a FreeIPA integration plugin [2] to do authentication and group memberships using my local IPA domain.
I worked on a company that had multiple issues with mounted folders using smb across a wide variety of desktop clients (that was around 2012).
Customers would name their files with weird characters, would use OS X folder colors and expect them to stick, etc. We needed to support all of that.
One day we tested replacing smb with webdav mounts powered by a thin layer based off sabre/dav. It just worked out of the box. All of our issues were gone. It's client support is the best I've seen.
It also allowed us to create virtual files, setup caching and a lot of other goodies that seemed impossible with smb.
I don't remember exactly how we implemented permissions, but I remember that at some point (after extending sabre/dav pretty hard) we did all kinds of customer configuration (including ACL) based on virtual files. Admin would just change a virtual file with roles and we would receive it on our implementation as a method call.
Unfortunately, Android not supporting CardDAV made it a half-way solution, so it wasn't as seamless as you'd like. It was super fun to build using sabre, but it was limited by the CardDAV decisions. You can't make a read-only CardDAV server that easily, for eg - the client will optimistically make local changes, and assume that server is just temporarily down when it returns a non-2xx code.
I might still polish it and release it, since it was a super-cool tool, if only for iOS users.
I'm currently running sabre/dav with PHP 8.0 with no issues, and previously ran it with PHP 7.4.
For CardDAV/CalDAV I'd be interested in a comparison to Radicale...
Love to hear some experiences with it.
(and of course: JMAP Calendars/Contacts/Files(eventually) will replace all that, we hope!)
I run it standalone, because I wanted a CalDAV system that could integrate with my local FreeIPA domain via LDAP. The only other project that met this requirement was davical [1], but it seemed much less active.
I ended up writing my own FreeIPA/LDAP authentication and principal backends [2] for sabre/dav. I believe they have a PDO backend built in, if you want to store your users in a database.
Basically, you composer install sabre/dav and wire all the components together in server.php. You'll also want to redirect the /.well-known/{caldav,carddav} URLs with a rewrite rule in your webserver. Most of this is described in their documentation [3].
If you're looking for turn-key solution with an administration GUI, you probably want Baikal [4], which is based on sabre/dav.
[2] https://github.com/sacredheartsc/sabredav-freeipa
Did you look at cyrusimap? Surely it supports auth via ldap?
Sabre is also the name of a company that offers airlines and travel websites a backend to book tickets https://en.wikipedia.org/wiki/Sabre_(travel_reservation_syst...