Local Arean Network WebDAV server - advise request

Hi 👋

tl;dr: Has anyone tried hosting WebDAV sync on a LAN machine? Can I use RPi for this or should I stick with a PC?

Currently I'm enjoying the free SiYuan, which exceeds my expectations for notes taking, projects management, writing, and other uses. I'm "syncing" my notes by hosting the app on my mobile and opening a web browser on a computer.

But I wish to support SiYuan further and I'm considering a premium, but I have a specific use case in mind and I wonder if anyone tried it so far.

I have a Raspberry Pi just laying around, and I wanted to turn it into a dedicated WebDAV server for my SiYuan notes AND assets. This RPi would sit at home without a external access to it, so any synchronisation would happen only when connecting to my local area network. So when I add some notes and add assets on the mobile device, those will synchronize into the server (and then onto other devices) when I go back home and connect to my wifi. Has anyone tried it? Is it possible to achieve with the $64 PRO feature? I also have old laptops in case RPi would not be enough.

Thanks for any answers in advance! 🍻

    Related articles

    Solution
    • glaucon1984 1
      VIP Warrior

      Hi, I have not tried the "local-only" scenario as I want to have synchronization when I'm not at home, but I've tried both WebDAV (using my NextCloud server) and S3 (using Minio), and S3 is WAY BETTER.

      Also, as far as I can see, you can run Minio in a Raspberry Pi:
      https://medium.com/@ayusun/beginners-guide-to-setup-private-cloud-storage-using-raspberry-pi-541ff1ef8f3b

      The basic Minio configuration, once it's up and running and you access the management console:

      1. Create a new bucket and make it public access
      2. Generate a set of Access Keys, save the details
      3. Set Region to something, like "us-east-1" (it doesn't matter, but it has to match the S3 config in SiYuan)

      You will probably have to set the "TLS Verify" option to "Skip" under the S3 configuration as being local-only you won't be able to get certs.

      image.png

      Also, if you cannot do exotic DNS stuff at home (you would need to have a subdomain for the bucket but you are probably reaching the Raspberry Pi by IP), you probably want to use the "Path-style" addressing, also under the S3 configuration:

      image.png

      If you feel adventurous, and your Raspberry Pi can handle it, you could setup containers on it:

      • SWAG to act as a reverse proxy that will route the home Minio traffic to public interntet, and automatically renew certificates so you can enable TLS. You can add stuff in here like blacklisting countries you don't want to reach your home and it has "Fail2Ban" which can detect suspicious activity and ban those IPs.
      • DuckDNS if your public IP is not static to have a free domain on public internet so you can call home from anywhere and sync.
      • Minio as the S3-compatible object storage to sync SiYuan.

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • glaucon1984 1
      VIP Warrior

      Hi, I have not tried the "local-only" scenario as I want to have synchronization when I'm not at home, but I've tried both WebDAV (using my NextCloud server) and S3 (using Minio), and S3 is WAY BETTER.

      Also, as far as I can see, you can run Minio in a Raspberry Pi:
      https://medium.com/@ayusun/beginners-guide-to-setup-private-cloud-storage-using-raspberry-pi-541ff1ef8f3b

      The basic Minio configuration, once it's up and running and you access the management console:

      1. Create a new bucket and make it public access
      2. Generate a set of Access Keys, save the details
      3. Set Region to something, like "us-east-1" (it doesn't matter, but it has to match the S3 config in SiYuan)

      You will probably have to set the "TLS Verify" option to "Skip" under the S3 configuration as being local-only you won't be able to get certs.

      image.png

      Also, if you cannot do exotic DNS stuff at home (you would need to have a subdomain for the bucket but you are probably reaching the Raspberry Pi by IP), you probably want to use the "Path-style" addressing, also under the S3 configuration:

      image.png

      If you feel adventurous, and your Raspberry Pi can handle it, you could setup containers on it:

      • SWAG to act as a reverse proxy that will route the home Minio traffic to public interntet, and automatically renew certificates so you can enable TLS. You can add stuff in here like blacklisting countries you don't want to reach your home and it has "Fail2Ban" which can detect suspicious activity and ban those IPs.
      • DuckDNS if your public IP is not static to have a free domain on public internet so you can call home from anywhere and sync.
      • Minio as the S3-compatible object storage to sync SiYuan.
      1 Operate
      glaucon1984 updated this reply at 2024-09-22 16:39:58
    • sasicbit 1 Up
      PRO

      I did exactly what you did initially to test out this product, by hosting a web version of it on my home server. It was great but the experience on mobile was not perfect.

      A couple of weeks later, I purchased the pro license and I now use SiYuan on all my devices including my mobile devices and got them syncing successfully without issues via a WebDav server. It currently runs on my VPS but I do not see why it won't run smoothly on a local Ra Pi machine. Your setup should work fine, but not having access to sync outside home sounds messy to me. Also the app gets quite noisy when the syncing fails, which I look at as a good thing. Note that syncing doesn't happen instantly on updating any of your notes, but it happens on a "every 30 seconds, and on opening/closing app" basis.

      You can still make your setup work, and you'll be able to update notes and add assets etc as you need. But you need to remember to sync your notes as soon as you get back that access, or else you might run into annoying conflicts.