Skip to main content
Version: 5.x

Environment and Service Config

This page covers the general-purpose files in config/node/default: _index.yaml (environment.*), admin/, logging.yaml, socketio.yaml, probe-server.yaml, sidecar.yaml, and tests.yaml.

Service abbreviations used below: Director Frontend (game clients connect here), Director Backend, Realm Frontend, Realm Backend, Ticketing, Sidecar (runs next to each game server), and Dev Initiator (runs everything in one process locally).

environment​

Defined in default/_index.yaml.

KeyDefaultTypeRead byWhat it does
environment.developmenttrueboolDirector Frontend, Director Backend, Realm BackendMarks the environment as a development environment. It (1) allows director.development.auto-verify-email and (2) allows the fake player authentication used by the dev-debug game server provider (rejected when this is false). The staging and production environments set it to false.
environment.mock-apifalseboolDirector Frontend, Realm FrontendReturns canned mock-* responses for login, registration, OAuth, realms, characters, and servers so the Unreal plugin's automated tests can run without real logic. Never enable this outside of tests.
environment.clean-db-on-dev-initiator-starttrueboolDev InitiatorWhen the database provider is sqlite, deletes the Director and Realm database files every time the Dev Initiator starts, so every start begins with no accounts, characters, or proxies. Set it to false to keep your local data between runs. Has no effect in Kubernetes.
environment.test.enabledfalseboolall servicesOnly suppresses the "Fully connected to Redis." log line. Used by the test environment.
environment.test.standardfalsebooltest harnessMakes Redwood's automated tests run the packaged Dev Initiator binary. Internal.
environment.check-for-default-secrets.enabledfalseboolyarn deployWhen true, yarn deploy refuses to deploy if any key in keys still has its placeholder value from default. The check only runs during yarn deploy and yarn check-secrets <env> (which always runs it), never at service start or in the Dev Initiator. staging and production enable it.
environment.check-for-default-secrets.keys23 keysstring[]yarn deployThe keys to check. Keys whose default is "" or null are skipped automatically, as are keys for features you aren't using (e.g. Cloudflare keys when deployment.dns.provider isn't cloudflare). Keys containing .redwoodBase. are checked for every realm or cluster. This is a list, so overriding it replaces the built-in list.
note

In 5.x the default-secrets check skips the Steam, JWT, Discord, and Twitch keys even when those providers are enabled (it reads the provider list from the default environment). Double check those secrets yourself before deploying.

admin​

Defined in default/admin/_index.yaml.

KeyDefaultTypeSecretWhat it does
admin.default-user.username"admin"stringThe default admin account. On every Director Backend start, it's created if missing (with the Admin role and a local username/password login), and its password is re-hashed if it changed. If text chat is enabled, it's also registered as an XMPP admin. The CLI logs in as this user for admin commands.
admin.default-user.password"admin"stringyesThe default admin's password. Change it for anything deployed; it's in the default-secrets check list.

logging​

Defined in default/logging.yaml. Read by every service.

KeyDefaultTypeWhat it does
logging.level"info"stringMinimum level printed to stdout. Levels from lowest to highest: trace, debug, info, warn, error, fatal. Redwood also has a custom log level above fatal that always prints (used for things like the version banner). silent disables stdout logging.
logging.prettify.enabledtrueboolPretty-print logs with pino-pretty. When false, stdout gets one JSON object per line, which is better for production log collectors and faster.
logging.prettify.colorizetrueboolpino-pretty option.
logging.prettify.colorizeObjectstrueboolpino-pretty option.
logging.prettify.crlftrueboolpino-pretty option (use CRLF line endings).
logging.prettify.levelFirstfalseboolpino-pretty option.
logging.prettify.messageFormatfalsebool or stringpino-pretty option.
logging.prettify.translateTime"HH:MM:ss.l"stringpino-pretty option (timestamp format).
logging.prettify.ignore["hostname"]string[]Fields to hide; joined with commas for pino-pretty.
logging.prettify.include[]string[]Fields to show; empty means pino-pretty's default.
logging.prettify.hideObjectfalseboolpino-pretty option.
logging.prettify.singleLinefalseboolpino-pretty option.
logging.log-file.enabledfalseboolAlso write JSON logs to a file.
logging.log-file.level"trace"stringMinimum level written to the file.
logging.log-file.path"logs/redwood-backend.log"stringFile path, absolute or relative to the process working directory (usually the RedwoodBackend folder). On start, an existing file is renamed to <name>-yyyy.MM.dd-HH.mm.ss<ext>.
logging.log-file.max-archived-files10intHow many renamed log files to keep; -1 keeps all of them.

The prettify.* keys are already written in camelCase because they're passed straight to pino-pretty. To read a JSON log file in a pretty format, run npx pino-pretty < logs/redwood-backend.log (the yarn log command mentioned in the YAML comment doesn't exist in 5.x).

socketio​

Defined in default/socketio.yaml. Read by every service.

KeyDefaultTypeWhat it does
socketio.tls.enabledfalseboolServe every Socket.IO server over HTTPS/WSS using the files below, and use wss:// for internal connections. If TLS is terminated by something in front of the services (like Cloudflare or an ingress), leave this false and set tls: true on the relevant *.connection.external objects instead; those only change the scheme in URLs handed to clients.
socketio.tls.keyFilenullstringPath to the PEM private key, relative to the working directory. Note the camelCase key name.
socketio.tls.certFilenullstringPath to the PEM certificate.

All Redwood servers accept websocket connections only. An HTTP GET / returns the name of the service, which is handy for checking a hostname routes where you expect.

probe-server​

Defined in default/probe-server.yaml. Each service (and the Sidecar) can run a tiny HTTP server for Kubernetes health probes.

KeyDefaultTypeWhat it does
probe-server.enabledfalseboolStart the probe server. The kubernetes environment enables it. Keep it disabled for the Dev Initiator: every service runs in one process, so the second service fails to bind the port. Kubernetes deployments always add probes to their pods, so deploying from an environment that doesn't enable this makes pods fail their startup probe and restart.
probe-server.port9797intPort for the probe endpoints, also used for the probe definitions in the generated Kubernetes Deployments and Agones Fleets.
probe-server.probes.startup.path"/startup"stringStartup probe path. All probe endpoints return 200 once the server is up.
probe-server.probes.liveness.path"/liveness"stringLiveness probe path.
probe-server.probes.readiness.path"/readiness"stringReadiness probe path.
probe-server.probes.<probe>.initial-delay-seconds0intKubernetes probe setting for Redwood microservice pods.
probe-server.probes.<probe>.period-seconds10intKubernetes probe setting.
probe-server.probes.<probe>.timeout-seconds1intKubernetes probe setting.
probe-server.probes.<probe>.success-threshold1intKubernetes probe setting.
probe-server.probes.<probe>.failure-thresholdstartup 30, liveness 3, readiness 90intKubernetes probe setting. With a 10 second period, startup allows 5 minutes and readiness 15 minutes.

The timing settings apply to the Redwood microservice Deployments only. Agones game server pods use Kubernetes' default timings.

sidecar​

Defined in default/sidecar.yaml. The Sidecar runs next to every game server and relays between Unreal and the Realm Backend. Most of its configuration is sent to it by the Realm Backend when it authenticates.

KeyDefaultTypeWhat it does
sidecar.connection.ports.sidecar3020intThe port the Sidecar listens on when the game server isn't told otherwise. Used inside Agones and Edgegap containers and by the dev-debug provider. The Unreal server connects to ws://127.0.0.1:<port> (it reads -SidecarPort= from its command line and falls back to 3020). Not used by the local provider, which picks ports from 7000 to 7099.
sidecar.connection.ports.game7777intThe game server's port for Agones (the Fleet's container port) and the dev-debug provider. Not used by the local provider.
sidecar.connection.host"127.0.0.1"stringOnly used by the stub test game server to reach its Sidecar.
sidecar.agones.health-check.period5number (seconds)Must match the Agones GameServer health check period (Agones' default is 5).
sidecar.agones.health-check.frequency-per-period2numberHow many Agones health pings to send per period. At least 1; decimals are fine.
sidecar.development.allow-resettrueboolUnused in 5.x.
note

Game server Docker images bake in the environment, auth.local.hash, probe-server, logging, socketio, and sidecar values from the config environment used to build the image. Rebuild the game server image after changing them.

tests​

Defined in default/tests.yaml.

KeyDefaultTypeSecretWhat it does
tests.artillery.key""stringyesArtillery Cloud key used by Redwood's internal load tests. You don't need it.