Every running server has an address players connect to: a host (a name like 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:
  1. After the lobby’s host enters the queue, wait for the server.
  2. When the server is up, Simpl sends a server_ready event to every player in the lobby. It has network_ports, with host and external_port.
  3. Or read the lobby every few seconds with GET /v1/lobbies/{lobby_id}. When its server has status running, server.network_ports has the address.
Then connect to 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. Read SIMPL_PORT_GAME when it starts. See Ports and environment.