I’ve just discovered Seafile, what a great product, thank you!
I am having a little trouble with what I’d like to achieve and I wonder if I’m missing something.
I am using Seafile on my LAN, all works great. I want to also access Seafile from outside my house. For this I have setup Cloudflare Tunnels, this all works as expected.
Only problem is that if access Seafile via a URL I need to change FILE_SERVER_ROOT so that it matches the URL or uploads don’t work. Once I have changed that, my local network at home then uploads files via the internet rather than locally over the LAN (this impacts on speed significantly).
My question is, how do I set Seafile so I can access it via a LAN in my home network and then using a URL (for example on my phone) when I am remote?
You can either set the local IP of your server in your router as a DNS entry, or edit your hosts file on your computer.
So if your instance runs on seafile.xedarius.com, you would either add a DNS entry that maps seafile.xedarius.com to the IP address of your server, or you add a line to your hosts file (under /etc/hosts)
If anyone is interested in making this work this is what I did.
Cloudflare tunels manages external access to my Seafile server. Both the URL and FILE URL point to a https domain. (https://drive.example.com). At this point external access to the Seafile server is good to go.
The next part is making is so that when I’m on my wifi I don’t go via Cloudflares infastructure and I’m able to take advantage of LAN speeds.
On my LAN I have a pihole running with a custom DNS entry for the same domain used above which points to the server where NGIX proxy manager lives. I need proxy manager as DNS does not allow port redirection and Seafile is running on a custom port (9080).
In NGIX proxy manager I proxy drive.example.com from port 443 to 8090. I need to use https as the external access to Seafile is set to a http URL. To solve this I asked NGINX proxy manager to generate a custom certificate from LetsEncrypt, which isn’t a perfect solution but it does make everything work.
Now I have LAN speed in the house and secure access outside of the house. Bit of leg work invovled but it works well.
hello, i am having a hard time setting up more or less the same thing.
could you by any chances share your nginx proxy manager settings (the proxy and ssl), the cloudflare tunnels and eventually your seafile setup / docker file ?
i know it is a lot but it is getting on my nerves
Thx in advance