Downloading files on the Seafile server externally

Hello everyone,

I have just installed a Seafile Server on my Raspberry Pi 3, without any nginx or Apache server yet. Everything on my local network works as expected - accessing it, downloading/uploading files etc.

When I access the server using the public IP, I can see and browse the files, but I am unable to download or upload anything. I can see that it tries to access the server using the local IP that I’ve set in FILE_SERVER_ROOT, but if I change the FILE_SERVER_ROOT option to http://public-IP:port, I still can’t make it work. I have confirmed that I’ve forwarded the necessary ports on the router.

What should I do to remedy this issue? Do I have to install nginx/Apache? Keep in mind that this is a very bare-bones installation, and I am a noob at setting up servers (though proficient in Linux, if that helps). I do have a domain that I can use if that’s what is needed.

Thanks in advance!

EDIT: I tried putting the public-IP:port address as FILE_SERVER_ROOT again, out of sheer desperation, and it automagically worked on an external network! But now I can’t get the downloads working on my internal LAN . I have an AT&T Uverse router, which I am not sure supports NAT loopback or not, which I found is the feature that supports rerouting external IP’s to internal IP’s.

I don’t know about using seafile server on public and private network in one time. So I can recommend you to buy a domain. Or ask some friend with domain to make you a subdomain(seafile.some-domain.com) A DNS Record. Or you can setup your NAT for translate your Public IP to Internal IP (Just forward outgoing request to you Public IP and port to server internal IP and port). It will work but it’s not nice solution

I do have a domain from no-ip. How would I go about using it for this solution?

  1. Create an DNS A Record to your public IP
  2. In your router setup new statis DNS Record for your domain and internal server IP
  3. Setup seafile for your domain just change your public IP to your domain.
1 Like

Make sure to also setup TLS with e.g. letsencrypt to protect your data against eavesdropping (it is for example trivial when someone accesses your Seafile from a public wifi).

I don’t know if I am being a noob, but I can’t see this setting on my router (a Uverse 5268AC). I have already redirected the domain to the public IP.

Thanks for the tip! Will get on this.

If you setup your domain to your public IP, try if it works with domain on your local network. Some “dumb” routers don’t have settings for local static DNS records but their NAT know how to translate your public IP to your Internal IP (don’t ask how, I don’t know :smiley: )

If you don’t have this settings and it’s not working, you have to on all of your computers(which will be use seafile/server) in local network setup DNS record over /etc/hosts file add this line on bottom of file

# your domain             Seafile server local IP address
seafile.yourdomain.com    192.168.1.2

On linux is file in /etc/
On windows C:\Windows\System32\drivers\etc\
Filename is only hosts it hasn’t file extension.

Yeah I was afraid I was going to have to do that. I guess this’ll have to do until I find a better solution haha. Thanks for your help!