Seafile 7 only listens to 127.0.0.1

Newly installed Seafile on Ubuntu 18.04

I can access seahub from localhost, but I cannot access it over LAN by entering the server’s IP address.

I did some investigating and it seems that something is not configured right, but I do not know where.

This is what I see:

`sudo lsof -i -P -n |grep 8000

python2.7 5823 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
python2.7 5829 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
python2.7 5830 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
python2.7 5831 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
python2.7 5832 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
python2.7 5833 7u IPv4 83452 0t0 TCP 127.0.0.1:8000 (LISTEN)
`
Python 2.7 runtime binds only to localhost, not to 0.0.0.0 so there is no access to seahub from outside. How can I tell seahub to listen to 0.0.0.0:8000?

V.

Correct me if im wrong but seahub cant talk with TLS so you probabbly want a reverse proxy anyway.

This is on a LAN. Yes I can set up a reverse proxy, but I am hoping to make it work as is. However reverse proxy may solve this issue as nginx is already running and reachable via LAN.

This seems random Cisco. Why did you post it? I keep looking and not finding anything relevant, did I miss something?

I’m facing the same issue. If anyone knows a solution without a reverse proxy, I’d be happy to hear

OK I solved it by remembering something from very early Seafile versions. When you install it it does not create its own directory but installs its directories in whichever location you ran the installation script and that you have ownership of.

So, find conf directory (mine was in the user home directory) and in there find gunicorn.conf file and make sure this line reads like so:

# default localhost:8000
bind = "0.0.0.0:8000"

Restart seafile and seahub.

If you are going to move the seafile directories into their own location, make sure you edit the pids path in the gunicorn.conf to point to wherever you placed them.

V.

1 Like

It’s quite clear that he showed you how to adapt the config file to bind to 0.0.0.0.

That’s not random. Starting from release 7, the seahub is binded to localhost, which is the securest approach. This is called hardening the baseline.

2 Likes