Counldn't connect to Nakama server error in docker

Hello everyone, I’m trying to run Nakama and nodejs using the Docker container. The Nakama server return response “error” when I authenticated with the device.I checked in the Docker log it says “Counldn’t connect to Nakama server; message: FetchError: request to failed, reason: connect ECONNREFUSED”. It works well when I try it on the browser.

Thank you.

When referencing or localhost in a running container that resolves back to that container, not to the host environment. The solution is to connect to nakama:7350 instead - this references the service name in the docker-compose file and will resolve correctly to the Nakama container.

@zyro Thank you

1 Like