Developer Documentation
Our new developer documentation is now available. Please check it out!

List running servers

Lists all servers that are running for your app. You cannot modify servers directly using the CLI, but you can view information about them. To modify servers, you need to change the underlying deployment or configuration.

Usage

odin fleet servers list

Examples

List all servers in a table format:

odin fleet servers list

If you have defined an environment variable in the underlying configuration named SERVER_NAME you can use this command show a table of servers with the SERVER_NAME column:

odin fleet servers list --format="table(id,addr,env['SERVER_NAME'].value)"

Return a list of servers that are either ready and have a specific name, or have a specific ID:

odin fleet servers list --filter="(serverConfig.status = 'ready' AND serverConfig.name = 'Minecraft Production 2') OR id = 211"

Let’s create a CSV list with IP addresses, published game port (defined in the configuration with name Game Port), and the server name (defined in the configuration with name SERVER_NAME):

odin fleet servers list --format="value[separator=';'](addr,ports['Game Port'].publishedPort,env['SERVER_NAME'].value)"

This can be useful for creating a list of servers to use in a script or for monitoring.

Info

If you find this confusing please read the manual page on server configurations. There we go into detail about how to setup environment variables and ports.

Flags

  • --filter:
    An optional flag that filters the list of deployments. The filter expression follows a straightforward structure of <field> <operator> <value>. The field can be any property in the dataset, and operators include basic comparison operators such as =, !=, >, <, >=, and <=. Filters can also be combined using logical operators AND, OR, and negated with NOT. You can access nested fields using dot notation, and strings should be enclosed in quotes. Learn more about filters in our filters documentation.

Global Flags

The following flags can be used with any ODIN CLI command:

  • --api-key=<string>
    The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands.

  • --app-id=<string>
    The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively.

  • --format=<string>
    The output format to use for the command. Supported formats are json, value, flattened and table. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting.

  • --force
    Forces the command to execute without prompting for confirmation. Use with caution.

  • --quiet
    Suppresses all informational output except for errors. Useful for scripting and automation.