Can I run seahub on port 80?

Hey Seafile Community!

I just installed a fresh new Seafile Community Edition 6.3.2 on a fresh new Ubuntu 14.04.5. With default settings, everything runs fine and I can access Seahub on http://xxx.xx.xx.xx:8000.

There is nothing else running on this server, so setting an individual port of 8000 is not necessary for me. Instead I want Seahub to respond to just http://xxx.xx.xx.xx. For this seahub must respond on port 80, am I right?

I followed the instructions to run seahub on another port (see https://manual.seafile.com/deploy/using_mysql.html#run-seahub-on-another-port) and set:

SERVICE_URL = http://xxx.xx.xx.xx:80 in conf/ccnet.conf and
bind = "0.0.0.0:80" in conf/gunicorn.conf

When I start seahub without parameters (./seahub.sh start) it still tells me “Starting seahub at port 8000 …”. I don’t know why the changed port is not used. When I start seahub with the explicit port parameter (./seahub.sh start 80), it correctly says “Starting seahub at port 8000 …”

But: In both cases there is no response to :80 or :8000. It does work when I change the port to 8001 or 8002 though. But that is not what I want.

Of course it would be possible to set up an Apache and have it redirect to the other port. But that is overkill. I don’t need another web server, seahub can run on its own.

Any ideas? Thanks for reading so far!

You can use a webserver as a reverse proxy. So you can use port 80 without changing the port in the seafile config. With a reverse proxy you can deliver different website via the same port

1 Like

I would recommend you install seafile with docker which would manage everything (dependency, https, nginx, upgrading) for you.

Using port 80 ist not recommended. You should use encrypted transfer via port 443 (https) instead. This can be archieved easily by using a Let’s Encrypt certificate and nginx as a reverse proxy. Take a look at the server manual to see how it works: https://manual.seafile.com/deploy/https_with_nginx.html

1 Like

Thanks everybody!

I thought I could go without installing a web server just for reverse proxy’ing to seahub. But now I just do so. I went with the web server I know best, Apache. I‘m sure using Docker would be even better, but I don’t know Docker yet and I don’t want to spend the time learning it just now.

After some configuring everything works as intended. Hooray! Thanks again!

Hello,
It seems to me still in 6.3
when editing the gunicorn.conf file

with for example:

default localhost: 8000

bind = “0.0.0.0:8001”

Well this should work but the service always starts on port 8000
A little bug …