Skip to main content
Version: 5.x

Realm Config

Realm configuration comes from two places:

  • default/realm/_index.yaml: settings shared by every realm (realm.challenges, realm.sidecar-auth, and realm.deployment).
  • default/realm/instances/: one entry per realm, realm.instances.<key>. Every entry inherits from the redwoodBase.yaml template (see The redwoodBase template), and default.yaml defines the default realm. Each realm runs its own Realm Frontend, Realm Backend, Realm Gateway, and Ticketing services.

For a friendlier walkthrough, see Realm Instance Config and Realms.

tip

To customize the default realm, create realm/instances/default.yaml in your environment with just the keys you want to change. To add a realm, create realm/instances/<new-key>.yaml with at least key, name, and deployed: true. To disable the default realm, set deployed: false in your realm/instances/default.yaml.

Shared Realm Settings (realm.*)​

KeyDefaultTypeWhat it does
realm.challenges.timeout60000int (ms)How long an authentication challenge between the Realm Frontend and Realm Backend stays valid.
realm.challenges.prune-interval60000int (ms)How often expired challenges are cleaned up.
realm.sidecar-auth.rotation-interval-ms300000int (ms)How often the Realm Backend rotates each connected Sidecar's bearer token. The previous token stays valid until the next rotation to cover reconnects.
realm.sidecar-auth.session-expiry-ms900000int (ms)Sliding expiry for a Sidecar's token, refreshed on every rotation. A Sidecar that's silent for longer can't re-authenticate and its game server must be reallocated.
realm.deployment.<service>.image"${docker.image-prefix}-dev"stringKubernetes image for each realm service. <service> is backend, frontend, gateway, ticketing-director, ticketing-worker, or match-function. The standard and staging environments switch these to ${docker.image-prefix}-core-runner (and -match-function for the match function). The image tag comes from the realm's image-tag.
realm.deployment.<service>.command["/bin/bash", "-lc", "yarn postinstall && yarn start --debug <service>"]string[] or nullContainer command. standard/staging use ["/app/app", "<service>"] (e.g. realm-backend, ticketing-worker); null uses the image entrypoint (the match function in standard/staging). The standard environment doesn't override gateway; set it to the core-runner image with ["/app/app", "realm-gateway"] if you deploy with a Standard License.

Realm Instances (realm.instances.<key>.*)​

All keys below are relative to realm.instances.<key>. Defaults come from redwoodBase.yaml.

Basic details​

KeyDefaultTypeWhat it does
key"" (default realm: "default")stringUnique identifier for the realm. Use the same value as the file name. It's used in Redis keys, the default hostnames (realm-<key>.localhost and realm-<key>-backend.localhost), the SQLite file name, and the Kubernetes namespace. Use lowercase letters, numbers, and dashes.
name"" (default realm: "Default")stringDisplay name shown to players in the realm list. Also used by the CLI's --realm option, and in the Kubernetes ingress name, so avoid spaces and special characters if you deploy.
deployedfalse (default realm: true)boolWhether this realm runs at all (in the Dev Initiator and in yarn deploy).
listedtrueboolWhether the realm appears in the Director's realm list (ListRealms). Applied by yarn deploy only; the Dev Initiator lists every realm.
image-tag"latest"stringDocker image tag for this realm's services in Kubernetes.
development.db-file"realm-${../key}-dev.db"stringSQLite database file used when persistence.database.provider is sqlite, relative to the RedwoodBackend folder.

Auth​

KeyDefaultTypeSecretWhat it does
auth.id"00000000-0000-0000-0000-000000000000"stringThe realm's ID, used when the realm authenticates with the Director.
auth.secret"0000…" (43 zeros)stringyes, but see the known issue with yarn deployThe realm's secret for that authentication.

The Dev Initiator replaces the placeholder values with generated ones, so you don't need to set them for local development. For Kubernetes, generate a pair with yarn id (it prints a UUID and a random secret) and set both. yarn deploy registers the realm with the Director using these values.

Kubernetes​

KeyDefaultTypeWhat it does
k8s.id"k8s-default"stringWhich cluster to deploy the realm to. Must match an enabled deployment.kubernetes.instances.<id>. Also used to look up the region name and ping address for Agones realms.
k8s.namespace"realm-${../key}"stringNamespace for all of the realm's resources. If the realm uses Agones, also add this namespace to deployment.dependencies.agones.values.gameservers.namespaces.

Database​

Only used when persistence.database.provider is postgresql. Each realm has its own schema.

KeyDefaultTypeSecretWhat it does
persistence.database.runtime-access.host"127.0.0.1"stringHow realm services reach PostgreSQL. kubernetes: postgresql.persistence.svc.cluster.local.
persistence.database.runtime-access.port5432int
persistence.database.runtime-access.database"redwood"string
persistence.database.runtime-access.schema"realm"stringGive each realm a different schema (or database) if they share a server.
persistence.database.runtime-access.user"redwood"string
persistence.database.runtime-access.password"redwood"stringyes
persistence.database.deployment-access.*host "localhost", port -1, the rest ${../runtime-access.*}password: yesHow yarn deploy reaches the database for migrations. Port -1 means "port-forward to the in-cluster PostgreSQL". See the Director equivalents.

Blob storage​

Blob storage holds files the game server saves with the Blob Storage API.

KeyDefaultTypeSecretWhat it does
persistence.blobs.provider"stub""none", "stub", or "s3"stub stores files on the local disk (development). s3 uses any S3-compatible store. none disables blob storage (requests fail with Blobs are not enabled). kubernetes: s3 (SeaweedFS in the cluster).
persistence.blobs.max-key-bytes255intMaximum blob key length. Keys must also match ^[A-Za-z0-9_\-./]+$.
persistence.blobs.max-blob-bytes10485760 (10 MiB)intMaximum size of a single blob upload.
persistence.blobs.stub.base-dir"./blobs/"stringFolder for stub blobs, absolute or relative to the working directory.
persistence.blobs.s3.bucket"mybucket"stringS3 bucket name.
persistence.blobs.s3.base-dir"/redwood/realm/${../../../key}/blobs/"stringUnused in 5.x; blobs are stored at the bucket root. Use a separate bucket per realm.
persistence.blobs.s3.connection.endpoint"http://seaweedfs-s3.persistence.svc.cluster.local:8333"stringS3 endpoint URL (passed to the AWS SDK S3Client).
persistence.blobs.s3.connection.region"us-east-1"string
persistence.blobs.s3.connection.force-path-styletrueboolUse path-style URLs (required for SeaweedFS and many S3-compatible stores).
persistence.blobs.s3.connection.credentials.access-key-idthe in-cluster SeaweedFS backend keystringyesLeave both credentials empty for unauthenticated (anonymous) requests.
persistence.blobs.s3.connection.credentials.secret-access-keythe in-cluster SeaweedFS backend secretstringyes

Gateway​

KeyDefaultTypeWhat it does
gateway.enabledtrueboolRun this realm's Realm Gateway, which lets the Director reach players and servers in the realm. Leave it on.
gateway.debug-port10111intKubernetes debug Service port (fixed inspector port).

Realm Backend and Frontend​

The Realm Frontend is what game clients connect to after picking a realm. The Realm Backend is what game server Sidecars connect to.

KeyDefaultTypeWhat it does
backend.replicas1intNumber of Realm Backend pods in Kubernetes.
backend.debug-port10102intKubernetes debug Service port.
backend.connection.internal.host"127.0.0.1"stringHost other realm services use. kubernetes: backend.<namespace>.svc.cluster.local.
backend.connection.internal.port3010intPort the Realm Backend listens on.
backend.connection.external.host"realm-${../../../key}-backend.localhost"stringHostname game server Sidecars use to reach the Realm Backend. Must be a hostname, not an IP. With Agones in the same cluster, this can be the internal service name (the kubernetes environment does this, so no ingress or DNS record is created). With Edgegap, it must be publicly reachable; for a local backend, use a tunnel (e.g. ngrok).
backend.connection.external.port3010int
backend.connection.external.tlsfalseboolUse wss:// in the URL given to Sidecars.
frontend.replicas1intNumber of Realm Frontend pods.
frontend.debug-port10103intKubernetes debug Service port.
frontend.connection.internal.host"127.0.0.1"stringkubernetes: frontend.<namespace>.svc.cluster.local.
frontend.connection.internal.port3011intPort the Realm Frontend listens on.
frontend.connection.external.host"realm-${../../../key}.localhost"stringHostname game clients use to connect to this realm. It becomes the realm's URL in the realm list. Must be a hostname, not an IP.
frontend.connection.external.port3011intkubernetes: 80.
frontend.connection.external.tlsfalseboolUse wss:// for the realm's URL in Kubernetes deployments. (The Dev Initiator always registers ws://.)

Game servers​

See Game Server Hosting for an overview of the providers.

Game server provider​

KeyDefaultTypeWhat it does
game-servers.provider"local"stringHow game servers are started. kubernetes: agones. Can be overridden per profile or zone in game.profiles.
ProviderWhat it does
localRuns your project with the Unreal editor executable in -server mode (uncooked content) for every game server. The Sidecar runs inside the backend process. See Local hosting.
agonesAllocates packaged Linux servers from an Agones Fleet in the realm's Kubernetes cluster. See Agones.
edgegapDeploys packaged servers through the Edgegap API. Cross-server sync is disabled for Edgegap; persistence still works. See Edgegap.
dev-debugStarts no process. The Sidecar listens on sidecar.connection.ports.sidecar (3020) and expects you to run the server yourself, e.g. in PIE with Play as Client and Use Backend in PIE enabled, so you can debug server code with the editor. Requires environment.development: true; players are matched to existing characters by index.
stubStarts a fake game server written in TypeScript, inside the backend. Used by Redwood's automated tests; it also speeds up internal timers drastically.

General​

KeyDefaultTypeWhat it does
game-servers.ready-timeout-seconds180intHow long to wait for a game server to start and load its map before giving up with Start server request timed out. Uncooked local servers can be slow; we use 300 in development.
game-servers.repeat-state-interval-seconds5numberThe Sidecar re-sends the game server's state to the Realm Backend at this interval even if it hasn't changed, so a missed update can't leave stale state. 0 disables (not recommended).
game-servers.allow-player-creationtrueboolAllow non-admin players to create their own proxies (e.g. lobbies) with CreateProxy. When false, they get Server creation by players is disabled for this realm.
game-servers.shard-prune-interval5000int (ms)How often the Realm Backend checks for stopped or empty shards.
game-servers.host-overridenullstring or nullReplace the host in the game server address sent to clients. Useful to let other machines on your LAN join servers in a local Kubernetes cluster.
game-servers.local-dir"LinuxServer"stringKubernetes only: the folder under RedwoodBackend/dist/game-servers/ containing your packaged Linux server, used to build the game server Docker image. Not used by the local provider.
game-servers.image-name"${docker.image-prefix}-game-server"stringKubernetes only: game server image name.
game-servers.image-tag"latest"stringKubernetes only: game server image tag.
game-servers.buildtrueboolKubernetes only: build the game server image during yarn deploy/yarn docker.

local provider​

KeyDefaultTypeWhat it does
game-servers.local.unreal.path"../Engine/Binaries/Win64"stringFolder containing the editor executable, absolute or relative to the RedwoodBackend folder. On macOS, point inside the app bundle: .../UnrealEditor.app/Contents/MacOS. Checked when a server is started (Executable not found at path ...). Also used by dev-debug.
game-servers.local.unreal.executable"UnrealEditor.exe"stringExecutable name (UnrealEditor on macOS and Linux).
game-servers.local.project"C:\\Path\\To\\MyGame.uproject"stringPath to your .uproject. You must change this (Project not found at path ...).
game-servers.local.arguments""stringExtra arguments for the server process, e.g. "-log" to open a log window per server. Split on single spaces (no quoting).
game-servers.local.log-to-terminalfalseboolPipe each server's stdout and stderr into the backend's terminal.

The local provider launches: <path>/<executable> <project> -server -port=<game port> -SidecarPort=<sidecar port> -pieviaconsole <arguments>. Both ports are picked from the range 7000 to 7099 (the first server gets Sidecar 7000 and game 7001). No map is passed on the command line; the server boots into your project's Server Default Map and then the Sidecar tells it which map to load.

agones provider​

KeyDefaultTypeWhat it does
game-servers.agones.arguments""stringExtra arguments for the packaged server process. Also used by the edgegap provider.
game-servers.agones.allocation-timeout-seconds60intHow many times (one second apart) to retry allocating a game server from the Fleet before giving up. Allocation fails when the Fleet is at its maximum or no nodes are available; consider a larger bufferSize.
game-servers.agones.fleet.name"game-server-fleet"stringFleet name.
game-servers.agones.fleet.eviction-safe"Never""Always", "OnUpgrade", or "Never"Agones eviction policy for game server pods.
game-servers.agones.fleet.game-server-container-details.resourcesrequests 500Mi/90m, limits 1Gi/500mobjectKubernetes resource requests and limits for the game server container.
game-servers.agones.fleet.autoscaler.policyBuffer with bufferSize: 1, minReplicas: 0, maxReplicas: 10objectAgones FleetAutoscaler policy, passed through as-is.
game-servers.agones.fleet.autoscaler.syncFixedInterval every 1 secondobjectAgones FleetAutoscaler sync settings.
game-servers.agones.fleet.nodeSelectorKey""stringUnused in 5.x.
note

Keys inside these pass-through objects are camelCased by the config system, so write them the way Agones and Kubernetes spell them (e.g. bufferSize, minReplicas).

edgegap provider​

KeyDefaultTypeSecretWhat it does
game-servers.edgegap.credentials.api-token""stringyesYour Edgegap API token.
game-servers.edgegap.application""stringYour Edgegap application name.
game-servers.edgegap.version""stringThe application version slug to deploy.

Parties​

See Parties.

KeyDefaultTypeWhat it does
parties.enabledtrueboolEnable parties. Also makes ticketing party-aware (only the leader can queue, and the whole party transfers together).
parties.max-size4intMaximum party members (Party is full).
parties.max-invites3intMaximum pending invites a player can have.
parties.included-character-fields["characterCreatorData", "metadata"]string[]Character fields included for each member in party updates. Valid: characterCreatorData, metadata, equippedInventory, nonequippedInventory, progress, data, abilitySystem.

Ticketing​

See Ticketing, Queuing, and Matchmaking.

KeyDefaultTypeWhat it does
ticketing.process-interval5000int (ms)How often Ticketing processes queued tickets.
ticketing.replicas1intNumber of Ticketing worker pods in Kubernetes (the ticketing director always runs one).
ticketing.debug-port10107intKubernetes debug Service port.
ticketing.queue.enabledtrueboolEnable queuing (joining a specific proxy, zone transfers).
ticketing.matchmaking.enabledtrueboolEnable matchmaking.
ticketing.matchmaking.provider"simple-match""simple-match" or "open-match"simple-match runs inside Ticketing and is great for development and smaller games. open-match uses Open Match in Kubernetes plus Redwood's match function service. kubernetes: open-match.
ticketing.matchmaking.ticket-stale-time-ms60000int (ms)A matchmaking ticket that hasn't found a match in this time goes stale; the client needs to retry. Uncooked servers can take longer than a minute to start, so we use 120000 in development.
ticketing.matchmaking.max-match-age-ms30000int (ms)Maximum age of a proposed match. Keep it below Open Match's pendingReleaseTimeout (1m by default).
ticketing.matchmaking.max-wait-until-make-shallow-match-ms45000int (ms)How long the oldest ticket waits before a match smaller than max-players-per-shard (but at least min-players-for-matchmaking) is made. Lower it while testing alone.
ticketing.matchmaking.open-match.frontend.endpoint"http://open-match-frontend.open-match.svc.cluster.local:51504"stringOpen Match frontend API.
ticketing.matchmaking.open-match.backend.endpoint"http://open-match-backend.open-match.svc.cluster.local:51505"stringOpen Match backend API.
ticketing.matchmaking.open-match.query.endpoint"http://open-match-query.open-match.svc.cluster.local:51503"stringOpen Match query API.
ticketing.matchmaking.open-match.match-function.host"http://match-function.${../../../../k8s.namespace}.svc.cluster.local"stringWhere Open Match reaches Redwood's match function service.
ticketing.matchmaking.open-match.match-function.port4000intMatch function port.
ticketing.matchmaking.open-match.match-function.name"default"stringWhich match function to run: packages/match-function/src/match-functions/<name>.ts. Add your own file to customize matchmaking.
ticketing.matchmaking.open-match.match-function.replicas1intMatch function pods.
ticketing.matchmaking.open-match.match-function.debug-port10106intKubernetes debug Service port.
ticketing.matchmaking.open-match.match-function.scoring-weights.age1numberHow much the default match function favors older tickets. Equal numbers mean equal preference.
ticketing.matchmaking.open-match.match-function.scoring-weights.ping1numberHow much it favors lower ping.
ticketing.matchmaking.open-match.match-function.scoring-weights.players1numberHow much it favors fuller matches.

Default proxy​

See Default Proxy. A proxy is a persistent "server" entry players can join (see Game Servers).

KeyDefaultTypeWhat it does
start-proxies-on-boot-delay-seconds15numberSeconds after the Realm Backend boots before it starts proxies marked "start on boot" and creates the default proxy.
default-proxy.create-on-first-boot.enabledfalseboolCreate the default proxy automatically if no proxy with create-on-first-boot.name exists yet.
default-proxy.create-on-first-boot.name"Default Proxy"stringName of the auto-created proxy.
default-proxy.profile-id""stringRequired to create a default proxy: the game profile id to use. Otherwise creation fails with Invalid profileId.
default-proxy.map-idnullstring or nullForce a specific map; null picks randomly from each zone's maps.
default-proxy.regionnullstring or nullRegion name to host it in (Local for the local provider, the cluster's region.name for Agones). null picks the first region.
default-proxy.publictrueboolList the proxy for everyone in ListProxies.
default-proxy.passwordnullstring or nullPassword required to join.
default-proxy.proxy-ends-when-collection-endsfalseboolEnd the proxy when its servers stop, instead of keeping it around to restart later.
default-proxy.continuous-playfalseboolPassed to the game server's load details as continuousPlay for your game logic to use.
default-proxy.start-on-bootfalseboolStart the proxy's servers every time the Realm Backend boots.

Characters​

KeyDefaultTypeWhat it does
characters.archival-period-days1numberDays an archived character is kept before it's deleted (checked hourly). 0 deletes characters as soon as they're archived. -1 never deletes them.
characters.players-can-update-character-creator-data"always""always", "initial", or "never"Whether clients can set characterCreatorData. always: on create and with SetCharacterData. initial: only when creating the character. never: not even on create (set it from your game server instead). Disallowed data is dropped with a warning in the log.
warning

With archival-period-days: 0, un-archiving a character in 5.x also deletes it. Use a value of at least 1 if your game lets players restore archived characters.