Skip to main content

Environment variables

What tells a server who it is, and where server-service is. They are environment variables rather than settings so that one configuration can be shared by every server of a type (in a container image, for instance).

Game servers and proxy​

VariableRequiredWhat it is
SERVER_IDYesUnique id of this server, for example gens-1. It owns the player locks and is shown by %GrayCorePaper_server_id%.
SERVER_TYPEYesIts type, for example gens. Servers of the same type are interchangeable for routing. The proxy uses velocity.
RPC_SERVER_SERVICE_ENDPOINTYeshost:port of the gRPC port of server-service.
RPC_SERVER_SERVICE_API_KEYYesThe key server-service expects (its GRPC_API_KEY).
SERVER_IPGame serversThe address the proxy uses to reach this server.
NODE_NAMENoThe machine or node the server runs on, reported to server-service.

A game server refuses to start when one of the required ones is missing, rather than starting half configured.

server-service​

VariableWhat it is
GRPC_API_KEYThe key the game servers and proxies must present.

Development stack​

dev/docker-compose.yml sets all of the above with working defaults. Copy dev/.env.example to dev/.env to change the passwords and keys, see Local development stack.