# I need help connecting my game to a deployed server

**URL:** https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029
**Category:** Local Setup
**Tags:** sdk-godot, getting-started
**Created:** [October 17, 2021, 5:23pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029 "2021-10-17T17:23:49Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![HutvagnerMark](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@HutvagnerMark](https://forum.heroiclabs.com/u/HutvagnerMark)
#### Post date: [October 17, 2021, 5:23pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/1 "2021-10-17T17:23:49Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![lugehorsam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/lugehorsam/32/314_2.png) [@lugehorsam](https://forum.heroiclabs.com/u/lugehorsam)
#### Post date: [October 17, 2021, 11:07pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/2 "2021-10-17T23:07:03Z")

</div>

> [@HutvagnerMark](#):
>
> , and it would be a problem that everything works properly on the server until I publish it to google play

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

---

<div class="post-metadata">

### Author: ![HutvagnerMark](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@HutvagnerMark](https://forum.heroiclabs.com/u/HutvagnerMark)
#### Post date: [October 18, 2021, 2:35am UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/3 "2021-10-18T02:35:28Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)
#### Post date: [October 18, 2021, 6:36am UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/4 "2021-10-18T06:36:05Z")

</div>

@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?

---

<div class="post-metadata">

### Author: ![HutvagnerMark](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@HutvagnerMark](https://forum.heroiclabs.com/u/HutvagnerMark)
#### Post date: [October 18, 2021, 8:24am UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/5 "2021-10-18T08:24:19Z")

</div>

> **[GitHub - heroiclabs/fishgame-godot: "Fish Game" for Godot is a 2-4 player...](https://github.com/heroiclabs/fishgame-godot)**
>
> "Fish Game" for Godot is a 2-4 player online multiplayer game created as a demo of Nakama; an open-source scalable game server, using the Godot game engine. - GitHub - heroiclabs/fishgame...

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

 ![Képkivágás](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/1X/870d057a1d9d508c366756eabe111e5cb55d54fe.jpeg)  
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”

---

<div class="post-metadata">

### Author: ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)
#### Post date: [October 18, 2021, 1:09pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/6 "2021-10-18T13:09:22Z")

</div>

@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`?

---

<div class="post-metadata">

### Author: ![HutvagnerMark](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@HutvagnerMark](https://forum.heroiclabs.com/u/HutvagnerMark)
#### Post date: [October 18, 2021, 2:34pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/7 "2021-10-18T14:34:32Z")

</div>

@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](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/](http://192.168.0.27:7350/)”]  
interval: 10s  
timeout: 5s  
retries: 5  
tty: true  
volumes:  
data:

---

<div class="post-metadata">

### Author: ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)
#### Post date: [October 20, 2021, 2:17pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/8 "2021-10-20T14:17:32Z")

</div>

> [@HutvagnerMark](#):
>
> [http://192.168.0.27:7351](http://192.168.0.27:7351)

`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](https://heroiclabs.com/heroic-cloud/) or on a cloud infrastructure provider like AWS or GCP.

---

<div class="post-metadata">

### Author: ![HutvagnerMark](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@HutvagnerMark](https://forum.heroiclabs.com/u/HutvagnerMark)
#### Post date: [October 20, 2021, 3:15pm UTC](https://forum.heroiclabs.com/t/i-need-help-connecting-my-game-to-a-deployed-server/2029/9 "2021-10-20T15:15:37Z")

</div>

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.
