Skip to main content

Servers

CommandDescription
gameflow servers list --game-id GAME_IDList the servers of a game. See Pagination.
gameflow servers get --game-id GAME_ID --region REGION --server-name NAMEShow a server's state, address, port, player count and resource use.
gameflow servers launch --game-id GAME_ID --region REGIONLaunch a server on demand.
gameflow servers stop --game-id GAME_ID --region REGION --server-name NAMEStop a server.
gameflow servers logs --game-id GAME_ID --region REGION --server-name NAMEStream a server's logs.
gameflow servers events --game-id GAME_ID --region REGION --server-name NAMEShow why a server crashed or won't start.

Launch a server​

gameflow servers launch --game-id GAME_ID --region us-east --wait
FlagDescription
--waitBlock until the server is Ready, then print its address and port.
--timeoutHow long --wait waits. Defaults to 5m.
--payloadSession or player data for the game server, as a JSON string.

Without --wait, the command returns as soon as the server is created, so its state can still be an early one such as PortAllocation.

With --wait, check the exit code:

Exit codeMeaning
0The server is Ready.
7--timeout ran out. The server was still launched and may still be starting, so check it with servers get.
10The server failed: Error, Unhealthy or Shutdown.

Pass data to the game server with --payload:

gameflow servers launch --game-id GAME_ID --region eu-west --payload '{"matchId":"m1"}'

Stop a server​

FlagDescription
--waitBlock until the server is really gone.
--timeout, --poll-intervalHow long --wait waits, and how often it checks.
--dry-runShow which server would be stopped without stopping it.

Read logs​

By default servers logs streams until you stop it. To print what exists and exit instead:

FlagPrints
--no-followThe logs written so far.
--tail 100Only the last 100 lines.
--historyThe stored logs of a server that has already stopped. Takes --limit, --start and --end.