I need help connecting my game to a deployed server

Hi! I work with nakama in godot, like Fish Game, for example, and it would be a problem that everything works properly on the server until I publish it to google play. Once published, I can’t log in to the server.
Could anyone help what could be the problem? Sorry for my english!

Hey @HutvagnerMark could you share what error you’re getting on the android device when you make your authentication calls?

Hi!Of course! The problem would be that “http request failed” when I log in. In my opinion, it pretends that the server is not switched on.

@HutvagnerMark It would help to know how and where you’ve set up your server, and what your client-side connection configuration looks like. Can you share a bit about this?

I used these documents as a basis. I created the docker-compose.yml file. I attach how I changed the basis.


and I wrote everything down in the exec line. this is my first job like this so I have no idea if it’s good or not.
exec /nakama/nakama --name monkeyparade --database.address root@cockroachdb:26257 --socket.server_key “monkeykey” --session.encryption_key “monkeyencryptionkey” --runtime.http_key “monkeyhttpkey” --console.username “monkeyparade” --console.password “*******” --console.signing_key “monkeysigningkey”

@HutvagnerMark That doesn’t help diagnose the issue I’m afraid. Where is the server running: AWS, GCP, Digital Ocean, or some similar cloud infrastructure provider? Can you reach the server’s /ws endpoint in a browser - something like https://your-server-ip:port/ws?

@zyro I will send the whole docker-compose.yml file to see if that helps.
I can reach the servers in browser like http://192.168.0.27:7351

docker:
version: ‘3’
services:
cockroachdb:
container_name: cockroachdb
image: cockroachdb/cockroach:v19.2.5
command: start --insecure --store=attrs=ssd,path=/var/lib/cockroach/
restart: “no”
volumes:
- data:/var/lib/cockroach
expose:
- “8080”
- “26257”
ports:
- “26257:26257”
- “8080:8080”
nakama:
container_name: monkeyparade
image: heroiclabs/nakama:2.11.1
entrypoint:
- “/bin/sh”
- “-ecx”
- >
/nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
exec /nakama/nakama --name monkeyparade --database.address root@cockroachdb:26257 --socket.server_key “monkeykey” --session.encryption_key “monkeyencryptionkey” --runtime.http_key “monkeyhttpkey” --console.username “monkeyparade” --console.password “*****” --console.signing_key “monkeysigningkey”
restart: “no”
links:
- “cockroachdb:db”
depends_on:
- cockroachdb
volumes:
- ./:/nakama/data
expose:
- “7349”
- “7350”
- “7351”
ports:
- “7349:7349”
- “7350:7350”
- “7351:7351”
healthcheck:
test: [“CMD”, “curl”, “-f”, “http://192.168.0.27:7350/”]
interval: 10s
timeout: 5s
retries: 5
tty: true
volumes:
data:

192.168.0.27 looks like a LAN address, this will not be accessible outside of your local network. This is not a Nakama issue or a config problem so we can’t help you further here - it’s an infrastructure problem.

You should look into a way to host your server where it would be available over the internet, perhaps on our Heroic Cloud or on a cloud infrastructure provider like AWS or GCP.

Thanks then i will look for it then, but anyway then until i pushed it up to google play i tried the game with my friends and they joined another network so it worked.