Servers
| Command | Description |
|---|---|
gameflow servers list --game-id GAME_ID | List the servers of a game. See Pagination. |
gameflow servers get --game-id GAME_ID --region REGION --server-name NAME | Show a server's state, address, port, player count and resource use. |
gameflow servers launch --game-id GAME_ID --region REGION | Launch a server on demand. |
gameflow servers stop --game-id GAME_ID --region REGION --server-name NAME | Stop a server. |
gameflow servers logs --game-id GAME_ID --region REGION --server-name NAME | Stream a server's logs. |
gameflow servers events --game-id GAME_ID --region REGION --server-name NAME | Show why a server crashed or won't start. |
Launch a server
gameflow servers launch --game-id GAME_ID --region us-east --wait
| Flag | Description |
|---|---|
--wait | Block until the server is Ready, then print its address and port. |
--timeout | How long --wait waits. Defaults to 5m. |
--payload | Session 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 code | Meaning |
|---|---|
0 | The server is Ready. |
7 | --timeout ran out. The server was still launched and may still be starting, so check it with servers get. |
10 | The 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
| Flag | Description |
|---|---|
--wait | Block until the server is really gone. |
--timeout, --poll-interval | How long --wait waits, and how often it checks. |
--dry-run | Show 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:
| Flag | Prints |
|---|---|
--no-follow | The logs written so far. |
--tail 100 | Only the last 100 lines. |
--history | The stored logs of a server that has already stopped. Takes --limit, --start and --end. |