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.94k stars 272 forks source link

Question about public status.json #450

Closed schloram closed 2 years ago

schloram commented 2 years ago

Hi, me again. I have a question about the status.json and how to access it from the web.

I have these two env variables set:

SERVER_PUBLIC=true
STATUS_HTTP=true

(STATUS_HTTP_PORT is left untouched)

Shouldn't then the status.json file be publicly available via my.valheim-server.com/status.json? Am I missing something or do I have to set something else? Because I can't get this to work. 🤔 I can connect to the server from the Valheim Server list with my.valheim-server.com so the DNS shouldn't be a problem (I guess).

I currently use the systemd service to run the container.

Where can I check if the "status web server" mentioned in this section os up and running?

Any help would be appreciated. Thank you :)

ericljiang commented 2 years ago

You can log into the server host and try to hit the endpoint locally to make sure the status server is running. curl localhost:80/status.json

schloram commented 2 years ago

@ericljiang Thanks for your help.

I tried that already and unfortunately it returns

curl: (7) Failed to connect to localhost port 80: Connection refused

Do I have to include the -p parameter for port 80 in the valheim service as well?

schloram commented 2 years ago

Okay it was just the line -p 80:80/tcp \ inside the systemd service that I was missing. I could have figured that out earlier. 🙈

ericljiang commented 2 years ago

Ah yes I forgot about that too