Skip to content

t1k:nakama:config

FieldValue
Modulebase
Version1.11.11
Effortlow
Tools—

Keywords: config, config.yml, config.yml.tmpl, configuration, environment, runtime.env, yaml

/t1k:nakama:config

Nakama uses config.yml for server configuration. The project uses a template (config.yml.tmpl) with environment variable substitution. Runtime env vars are passed to Go plugin code via runtime.RUNTIME_CTX_ENV.

runtime:
env:
- GAMEPLAY_GRPC_ADDR=gameplay:9550
- GAMEPLAY_API_KEY=${GAMEPLAY_API_KEY}
- MOCK_GAMEPLAY_ENDPOINTS=${MOCK_GAMEPLAY_ENDPOINTS:-false}
- FIREBASE_AUTH_ENABLED=${FIREBASE_AUTH_ENABLED:-false}
- ORION_CONTRACTS_DIR=/nakama/contracts
env, _ := ctx.Value(runtime.RUNTIME_CTX_ENV).(map[string]string)
addr := env["GAMEPLAY_GRPC_ADDR"]
VariablePurposeDefault
MOCK_GAMEPLAY_ENDPOINTSEnable mock modefalse
GAMEPLAY_GRPC_ADDRGameplay gRPC addressgameplay:9550
GAMEPLAY_API_KEYService auth key(required)
FIREBASE_AUTH_ENABLEDEnable Firebase authfalse
FIREBASE_PROJECT_IDFirebase project ID(required if Firebase)
ORION_CONTRACTS_DIRContract files path/nakama/contracts
ORION_MOCK_DATA_DIRMock data override(derived from contracts)
docker-compose.postgres.yml
services:
nakama:
build: .
environment:
- MOCK_GAMEPLAY_ENDPOINTS=true
volumes:
- ./modules:/nakama/data/modules
depends_on:
- postgres
  • All required env vars documented and set
  • config.yml.tmpl updated when adding new env vars
  • Docker volumes mount .so file and contract dirs correctly
  • Sensitive vars (API keys) not hardcoded — use env vars or secrets
  • Default values provided where sensible (:-default syntax)