iad.servers.simpl.gg) and an external port (a number). Your game connects to host:external_port.
Use the port named game. If your build has no port with that name, use the first port.
How your game gets the address depends on how the server was started.
You started the server yourself
When you start a server from the dashboard, the Servers tab shows its address. When you start it with the API (POST /v1/servers), the answer has a network_ports list. You can also read it again later with GET /v1/servers/{instance_id}. Each entry has a name, a host and an external_port.
These calls use your server key, which must never be in your game. So call them from your own backend, and have your backend give the address to your players.
Matchmaking started the server
Your game uses the client key and the lobby it is in:- After the lobby’s host enters the queue, wait for the server.
- When the server is up, Simpl sends a
server_readyevent to every player in the lobby. It hasnetwork_ports, withhostandexternal_port. - Or read the lobby every few seconds with
GET /v1/lobbies/{lobby_id}. When itsserverhasstatusrunning,server.network_portshas the address.
host:external_port of the game port. If that port has TLS on, connect with wss://host:external_port instead. See Browser games (wss://).
See Setting Up Matchmaking for the whole flow.
Before players connect
Your server must be listening on the right port. ReadSIMPL_PORT_GAME when it starts. See Ports and environment.