Server is only accessible on host mode or when using container addresses
retained text
SOLVED, see here: https://www.reddit.com/r/docker/s/92gXpeXGTe. This post will self-destruct eventually.
Here is my docker-compose.yaml
name: tactics
services:
server:
container_name: server
build:
dockerfile: server.Dockerfile
ports:
- "8000:8000"
networks:
- backend
networks:
backend:
driver: bridge
and my server.Dockerfile
debian:bookworm-slim
ENV HOME=/root
ENV PATH="$PATH:$HOME/bin"
WORKDIR $HOME/bin
COPY Server.x86_64 Server.x86_64 ./
ENTRYPOINT ["/root/bin/Server.x86_64", "--headless", "--verbose"]
I create the Godot Server on a port, and create a Godot Client that connects to the same port.
If I use an address that refers directly to the container (the one shown by this [https://stackoverflow.com/a/20686101](https://stackoverflow.com/a/20686101)) the connection is successful.
Or if I rewrite the compose to use host network mode, the connection is successful.
If I use any other address (0.0.0.0,, localhost, my public IP, my private IP), it times out.
Some suggestions have been to bind to [0.0.0.0](http://0.0.0.0), but I am not sure the effects of that or how it would be done in compose.
I am on an Ubuntu machine. I suppose I could also deploy to some cheap server farm. Any help is appreciated, including "don't worry about it and just use host / direct container address, here's why".
EDIT: btw I seemingly enabled br\_netfilter as it was disabled, as suggested here: [https://stackoverflow.com/a/60897412](https://stackoverflow.com/a/60897412). Might be relevant. Didn't help though.document fetched 2026-11-14 00:42 · canonical https://reddit.com/r/docker/comments/1xvkcoq/server_is_only_accessible_on_host_mode_or_when