Seafile docker on pi 4 not able to connect

Hi i am following this guide to setting up and running seafile server on my pi 4 using docker

But when i navigate to seafile.example.com i get a server error on my browser.

All this is being tested on my local network between my pi 4 and my windows laptop

The command i used is this

docker run -d --name seafile
-e SEAFILE_SERVER_HOSTNAME=seafile.example.com
-v /opt/seafile-data:/home/media/wd4tb
-p 81:81
seafileltd/seafile:pi

i get a network error: connection refused

edit: some docker logs

jonathan@raspberrypi:/opt/seafile-data $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4267b291dcc9 seafileltd/seafile:pi “/sbin/my_init – /s…” 9 minutes ago Up 9 minutes 0.0.0.0:81->81/tcp seafile

Hi @jonneymendoza,
most likely, it is the wrong option to use seafile.example.com as SEAFILE_SERVER_HOSTNAME.
Just try your local IP for a start.

$ route | grep default | awk '{print $2}'
=> 192.168.178.23  # for example

docker run -d --name seafile
-e SEAFILE_SERVER_HOSTNAME=192.168.178.23
-v /opt/seafile-data:/home/media/wd4tb
-p 81:81
seafileltd/seafile:pi

Afterwards, try to connect to 192.168.178.23:81 in your browser.

1 Like

This solved the issue for me. The issue was the dynamic DNS service I was using, for some reason it didn’t forward all the required ports I guess. Using 127.0.0.1 worked, and then using my public IP address (with ports forwarded in my router) also worked. Note that I also had to add 8000 and 8082 in the forwarded ports in both the router and the docker image, I’m not sure this was necessary but the log does shows that port 8000 is used when starting the docker image, and port 8082 is in seafile.conf

/EDIT: see also if your router maybe has a DNS rebind protection such as fritz box routers, because it seems to be the culprit ultimately causing these issues, there is another post in this forum about it: no-access-to-dynamic-dns-address-from-inside-local-network-but-ping-tracert-works-fine