Skip to main content
Configuration

Environment Variables

Connect a backend to a Rivet control plane with environment variables for endpoints, authentication, runner pools, and the local engine.

These variables wire your process to a Rivet control plane. Variables that configure the RivetKit SDK itself, including logging, storage, and the inspector, are listed in Environment Variables in the Actors docs.

Connection

Environment VariableDescription
RIVET_ENDPOINTEndpoint URL to connect to Rivet control plane. Supports URL auth syntax.
RIVET_TOKENAuthentication token for Rivet control plane
RIVET_NAMESPACENamespace to use (default: “default”)

Public Endpoint

These variables configure how clients connect to your actors.

Environment VariableDescription
RIVET_PUBLIC_ENDPOINTPublic endpoint for client connections. Supports URL auth syntax.
RIVET_PUBLIC_TOKENPublic token for client authentication

Runner Configuration

Environment VariableDescription
RIVET_POOLPool name (default: “default”)
RIVET_RUNNER_VERSIONVersion number for the runner. See Versions & Upgrades.
RIVET_RUNNER_KINDType of runner
RIVET_TOTAL_SLOTSTotal actor slots available (default: 100000)

Engine

Environment VariableDescription
RIVET_RUN_ENGINESet to 1 to spawn the control plane process
RIVET_RUN_ENGINE_HOSTHost to bind the spawned local engine process to. Defaults to 127.0.0.1.
RIVET_RUN_ENGINE_PORTPort to bind the spawned local engine process to. Defaults to 6420.
RIVET_RUN_ENGINE_VERSIONVersion of engine to download
RIVET_RUN_SERVICESSet to 1 to run Services with a local Engine, or 0 to disable it. By default, Services follows RivetKit’s local-Engine decision.
RIVET_SERVICES_BINARYPath to a local rivet-services binary.