lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.89k stars 269 forks source link

Server not accessible by IP or URL #646

Open LuxKeiwoker opened 8 months ago

LuxKeiwoker commented 8 months ago

I'm running this docker container on a Synology DS920+ and so far it works great! However I'm having troubles to connect to the server by IP or URL. Neither the local LAN IP (192.168.0.xx) nor the Public IP or my freedns URL work. Joining by the steam join code however, works like a charm. But this is very cumbersome as the join code changes frequently and the server becomes again unavailable.

Portforwarding on my router is set up correctly, and the Synology NAS is also accessible by URL.

Any ideas?

sunxiaoyi111 commented 8 months ago

Hello buddy, does your device have a stable and unchanging public IP? If so, you can try checking the log to see if you have received a link request and to see the reason for the connection rejection.

LuxKeiwoker commented 8 months ago

does your device have a stable and unchanging public IP?

Yes and No - I don't have a fixed IP, however it is changing rarely. So connecting via WAN IP address should be working without any issues. I also have my own domain, which is linked to a dynamic DNS service. I can access this way my NAS remotely e.g in a browser. But for whatever reason, Valheim can't establish a connection when entering the domain name, even though the ports 2456 and 2457 are forwarded correctly.

SolidBrave commented 6 months ago

Yes and No - I don't have a fixed IP, however it is changing rarely. So connecting via WAN IP address should be working without any issues. I also have my own domain, which is linked to a dynamic DNS service. I can access this way my NAS remotely e.g in a browser. But for whatever reason, Valheim can't establish a connection when entering the domain name, even though the ports 2456 and 2457 are forwarded correctly.

I kinda have the same issue. I noticed that the valheim server keeps using the previous IP even if I got a new public IP. Players are able to join with that "older" IP adress while my hostname is obviously using the new IP. I am really confused how my pc/server can be reached with a previous IP and the server is able to use it, while I got a different public IP.

While searching for the server I see two entries, one with the previous ip (working) and a second entry with the new ip (not working)

However I can only ping the new IP... My best guess would be it has something todo with crossplay.

Restarting the server fixes the issue