Remote Nakama Server

Hi,
I just finished my first real-time multiplayer game. So far I was testing running nakama server locally (and everything worked/works), but now, I’ve to test a connection to a remote server.

I’ve a Virtual Machine and I’ve running cockroach & nakama, like I did locally.
The problem is, when I change the local IP to my remote IP in my game-client, I get a connection error:

NClientParameters parameters;
parameters.serverKey = "defaultkey";
parameters.host = "40.122.xx.xxx"; //virtual machine public ip
parameters.port = DEFAULT_PORT;
m_client = NCocosHelper::createDefaultClient(parameters);

It’s running in a Windows Server and I already tested turning off the Firewall.
What could be happening?

Thanks

Hey @tranthor, could you share the error message that you receive when you try to connect?

Hi @lugehorsam
Sure.

This is the error:

@tranthor I’d check the network settings on the software you are using to administer the VM. You are using a public IP but it is possible that your VM is only accessible over a private network.

@lugehorsam
Doing a port scan I’m sure that the port 7349 is open. Maybe Nakama uses other ports as default?

Fixed :wink:
I forgot that Nakama uses other ports too.
7348, 7349, 7350 and 7351.

Thanks guys.

1 Like