Difference between revisions of "Simple LAN filesharing with WebDAV"

From Run Your Own
Jump to: navigation, search
(Created page with "WebDAV is both an overlooked and quite popular way to access and edit files remotely across a wide range of operating systems. Yes it's web stuff, again, but surprisingly fast...")
 
Line 1: Line 1:
WebDAV is both an overlooked and quite popular way to access and edit files remotely across a wide range of operating systems. Yes it's web stuff, again, but surprisingly fast, lightweight, and that can recover quite well on unstable networks or when the server has to be restarted or has gone for lunch. A reason why it may be overlooked is possibly because it's often associated with sausage factories like own/nextcloud, or standalone implementations that are not particularly exciting. There is however a not very well known way to run a very simple and lightweight WebDAV server with lighttpd.
+
'''WebDAV''' is both an overlooked and quite popular way to access and edit files remotely across a wide range of operating systems. Yes it's web stuff, again, but surprisingly fast, lightweight, and that can recover quite well on unstable networks or when the server has to be restarted, or has gone for lunch. A reason why it may be overlooked is possibly because it's often associated with sausage factories like own/nextcloud, or standalone implementations that are not particularly exciting. What is less known is that many web servers come with their own '''WebDAV''' implementation out of the box. Out of the usual suspects, '''nginx''', '''Apache''', and '''lighttpd''',  the latter has both the most lightweight and most complete implementation. No need for anything else!
 +
 
 +
In these notes we only cover a simple LAN setup, you can build upon it for more complex use case of course.
 +
 
 +
== Server side ==
 +
=== Installation ===
 +
* This is for Debian, but you're smart
 +
sudo apt install lighttpd lighttpd-mod-webdav
 +
 
 +
=== Configuration ===
 +
Basically the configuration are in <code>/etc/lighttpd/conf-available</code> and with symlinks in <code>/etc/lighttpd/conf-enabled</code>. By default a temp config file called <code>99-unconfigured.conf</code> provides a generic landing page. We don't need it and we just have to enable the authentication config.
 +
 
 +
sudo lighttpd-disable-mod unconfigured
 +
sudo lighttpd-enable-mod auth
 +
 
 +
 
 +
 
 +
== Client side ==

Revision as of 18:47, 1 March 2024

WebDAV is both an overlooked and quite popular way to access and edit files remotely across a wide range of operating systems. Yes it's web stuff, again, but surprisingly fast, lightweight, and that can recover quite well on unstable networks or when the server has to be restarted, or has gone for lunch. A reason why it may be overlooked is possibly because it's often associated with sausage factories like own/nextcloud, or standalone implementations that are not particularly exciting. What is less known is that many web servers come with their own WebDAV implementation out of the box. Out of the usual suspects, nginx, Apache, and lighttpd, the latter has both the most lightweight and most complete implementation. No need for anything else!

In these notes we only cover a simple LAN setup, you can build upon it for more complex use case of course.

Server side

Installation

  • This is for Debian, but you're smart
sudo apt install lighttpd lighttpd-mod-webdav

Configuration

Basically the configuration are in /etc/lighttpd/conf-available and with symlinks in /etc/lighttpd/conf-enabled. By default a temp config file called 99-unconfigured.conf provides a generic landing page. We don't need it and we just have to enable the authentication config.

sudo lighttpd-disable-mod unconfigured
sudo lighttpd-enable-mod auth


Client side