SabreDAV is an open-source software package that provides a WebDAV server implementation. Follow these steps to install SabreDAV on OpenBSD.
Before starting, you should have:
$ sudo pkg_add apache-httpd
$ sudo pkg_add php php-apache
$ sudo pkg_add php-curl php-dom php-iconv php-mbstring php-simplexml
$ sudo tar xf https://github.com/sabre-io/SabreDAV/releases/download/3.3.0/sabre-dav-3.3.0.tar.gz -C /var/www/htdocs/
$ sudo chown -R www:www /var/www/htdocs/sabre-dav
$ sudo vi /etc/httpd.conf
Add or uncomment the following line:
LoadModule php7_module modules/libphp7.so
$ sudo pkg_add openssl
$ sudo openssl genrsa -out /etc/ssl/private/server.key 2048
$ sudo openssl req -new -key /etc/ssl/private/server.key -out /etc/ssl/certs/server.csr
$ sudo openssl x509 -req -days 365 -in /etc/ssl/certs/server.csr -signkey /etc/ssl/private/server.key -out /etc/ssl/certs/server.crt
Configure httpd.conf
to use SSL/TLS:
$ sudo vi /etc/httpd.conf
Add or update the following lines:
Listen 443
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot "/var/www/htdocs/sabre-dav"
SSLEngine on
SSLCertificateFile "/etc/ssl/certs/server.crt"
SSLCertificateKeyFile "/etc/ssl/private/server.key"
<Directory "/var/www/htdocs/sabre-dav">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
</IfModule>
$ sudo /etc/rc.d/httpd restart
You can verify the installation by visiting the following URL:
https://<hostname>/sabre-dav/
Replace <hostname>
with the hostname or IP address of your server. If everything is properly configured, you should see the SabreDAV homepage.
In this tutorial, you learned how to install SabreDAV on an OpenBSD system. Happy WebDAV-ing!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!