Connecting from another computer

Hello guys,

I’m new to networking and I just watched nakama tutorials in the youtube channel. I got to run the docker-compose.yml but I’m confused on which ip add and port I should put in

var _client := Nakama.create_client(KEY, “”, 7350, “http”)

when I want to connect from another computer?

Hey @Knight, you’ll want to expose the Nakama server port to your LAN using the network settings on your machine as well as pass in the IP address assigned to your computer. How you do this depends on your machine – here’s an example thread for someone wanting to do this on a Mac:

Hi @lugehorsam, Thanks for the response :smile:

Correct me if I’m wrong, looking at the example thread provided, this seems to only apply if the computers are using the same wifi? What should I do so that players can connect globally? :persevere: Apologies for the newb question…

You’d have to expose the machine hosting Nakama to the internet in some way. How you do this is up to you but typically involves ensuring port forwarding on your router is set up correctly, and sharing your public IP address (if you have a static IP) or setting up a dynamic DNS solution.

Note that this is not a production-ready set up so you should only do this for minimal development or testing.