Registry Configuration
This page documents the configuration options available when setting up a RivetKit registry. The registry configuration is passed to the setup() function.
Example Configurations
Basic Setup
Connecting to Rivet Engine
Starting Your App
After configuring your registry, start it using one of two runtime modes:
See Runtime Modes for details on when to use each mode.
Environment Variables
Many configuration options can be set via environment variables. See Environment Variables for a complete reference.
Configuration Reference
Actor definitions. Keys are actor names, values are actor definitions.
Maximum size of incoming WebSocket messages in bytes. Default: 65536
Maximum size of outgoing WebSocket messages in bytes. Default: 1048576
Disable the welcome message on startup. Default: false
Logging configuration.
Log level for RivetKit. Default: 'warn'
Endpoint URL to connect to Rivet Engine. Supports URL auth syntax: https://namespace:token@api.rivet.dev. Can also be set via RIVET_ENDPOINT environment variable.
Authentication token for Rivet Engine. Can also be set via RIVET_TOKEN environment variable.
Namespace to use. Default: 'default'. Can also be set via RIVET_NAMESPACE environment variable.
Additional headers to include in requests to Rivet Engine.
Whether to start the local manager server. Auto-determined based on endpoint and NODE_ENV if not specified.
Base path for the manager API. Default: '/'
Port to run the manager on. Default: 6420
Inspector configuration for debugging and development.
Whether to enable the Rivet Inspector. Defaults to true in development mode.
Token used to access the Inspector.
Default RivetKit server endpoint for Rivet Inspector to connect to.
Configuration for serverless deployment mode.
Downloads and starts the full Rust engine process. Auto-enabled in development mode when no endpoint is provided. Default: false
Version of the engine to download. Defaults to the current RivetKit version.
Automatically configure serverless runners in the engine.
Name of the runner pool.
URL of the serverless platform to configure runners.
Headers to include in requests to the serverless platform.
Maximum number of runners in the pool.
Minimum number of runners to keep warm.
Maximum lifespan of a request in milliseconds.
Buffer margin for scaling runners.
Number of actor slots per runner.
Additional metadata to pass to the serverless platform.
Base path for serverless API routes. Default: '/api/rivet'
The endpoint that clients should connect to. Supports URL auth syntax: https://namespace:token@api.rivet.dev
Token that clients should use when connecting via the public endpoint.
Configuration for runner mode.
Total number of actor slots available. Default: 100000
Name of this runner. Default: 'default'
Authentication key for the runner.
Version number of this runner. Default: 1
Related
- Actor Configuration- Configure individual actors
- HTTP Server Setup: Set up HTTP routing and middleware
- Architecture: Understand how RivetKit works