OpenBSD - Rclone

Page content

WebDAV Server

need a little WebDAV Server ? Selfhosting your Password DB ?

pkg

pkg_add rclone
mkdir -p /rclone/webdav

run

rclone serve webdav /your/root/folder --addr YOUR_PUBLIC_IP:PORT \
  --key /etc/ssl/certs/your.private.key \
  --cert /etc/ssl/certs/your.public.cer \
  --user someuser \
  --pass somepass

Browser

browse to https://your_public_ip:port

  • user: someuser
  • pass: somepass

done !

htpasswd

got some Users and wanna put them in the htaccess file ? be carefull as these users all share the same folder !

cd /rclone
touch htpasswd
htpasswd htpasswd tick
htpasswd htpasswd trick
htpasswd htpasswd track
chmod 600 htpasswd

Dashboard

do you like dashboars ? it’s also included, have a look …

rclone rcd --rc-web-gui --rc-addr your.public.hostname:port \
  --rc-key /etc/ssl/certs/your.public.key.key \
  --rc-cert /etc/ssl/certs/your.public.cer

behind nginx

you may have a nginx reverse proxy running with terminates tls and rclone should listen on localhost and http only ? that’s also fine …

update nginx.conf

# add webdav
    location /webdav {
      proxy_set_header  Host $host;
      proxy_set_header  X-Real-IP $remote_addr;
      proxy_pass        http://127.0.0.1:8080/;
    }

restart nginx

nginx -t && rcctl restart nginx

start rclone

rclone serve webdav /rclone/webdav \
  --htpasswd /rclone/htpasswd

Any Comments ?

sha256: 17d9782ff6ad3e334b752abe39ece6bdacb6e0038357477ee16f8f07acc1e1cf