Configuration
Every setting that Rehearsal reads from the environment, with its default and what it changes.
Rehearsal reads its settings from environment variables. A server also reads a file named .env in the folder
it starts in, and a value in the real environment wins over the file. With Docker Compose, the settings are in
infra/deploy.env: see Install with Docker Compose.
A person who only uses a server needs the first section. The rest is for the person who runs one.
Client
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_URL | https://rehearsalkit.xyz | The server that the CLI, the Python client and the MCP server talk to. It takes precedence over a saved sign-in. |
REHEARSAL_API_KEY | The key they use. It takes precedence over a saved sign-in. | |
REHEARSAL_CONFIG | ~/.config/rehearsal/config.json | Where rehearsal login saves the sign-in. |
REHEARSAL_DEBUG | Set it to anything to make the CLI log each HTTP request. |
Database and files
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_DATABASE_URL | a local PostgreSQL on port 5433 | The PostgreSQL database, as postgresql+psycopg://user:password@host:port/database. |
REHEARSAL_DB_POOL_SIZE | 10 | Connections that each process keeps open. |
REHEARSAL_DB_MAX_OVERFLOW | 20 | Extra connections that each process may open under load. A managed database limits the total of all processes. |
REHEARSAL_DATA_DIR | ./var | The folder for application sources, world snapshots and exported files. The API and every worker must see the same folder. |
REHEARSAL_SOURCE_ROOTS | ./examples | Folders, separated by commas, that an application may name as a local source. |
REHEARSAL_DOWNLOADS_DIR | downloads in the data folder | A folder that the server offers at /downloads, for the client package. |
REHEARSAL_ENV_FILE | .env | A file of settings to read at start. A value in the real environment wins over the file. |
Sign-in
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_SESSION_SECRET | a development value | Signs browser sessions. Set a long random value on any server that others can reach. |
REHEARSAL_SIGNUP | open | Any visitor can create an account and an organisation. closed turns that off. |
GOOGLE_CLIENT_ID | A Google OAuth web client id. With it, the console offers "Sign in with Google". | |
REHEARSAL_ADMIN_EMAILS | Operator admins, separated by commas. They see every workspace and can set any plan. Only a sign-in with Google counts. | |
REHEARSAL_PUBLIC_URL | http://localhost:7800 | Where browsers reach the server. Payment pages return here. |
REHEARSAL_DOCS_URL | The documentation site. /docs on the server redirects there; without it, /docs opens the API reference at /api/docs. |
Models
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_MODEL_COMPILER | a chain of three hosted models | The model chain that builds worlds. |
REHEARSAL_MODEL_AGENT | the same chain | The model chain for agents that have no model of their own. |
REHEARSAL_MODEL_PARTICIPANT | a chain of two smaller models | The model chain that plays the simulated customer. |
REHEARSAL_MODEL_IMPROVER | the compiler's chain | The model chain that proposes a better agent. |
REHEARSAL_PRICES | {} | Prices for models whose provider reports none: JSON of provider:model to [input, output] in US dollars for a million tokens. |
REHEARSAL_PRICING_FILE | pricing.yaml | A file of the same prices, each with its source and date. |
Model chains
A chain is a list of provider:model, separated by commas. The server tries them in order, and moves to the
next when a provider fails or is not configured.
REHEARSAL_MODEL_COMPILER=nebius:deepseek-ai/DeepSeek-V4.1-Flash,google:gemini-3.5-flashProviders
A provider works when its key is set. Every provider is reached through an OpenAI-compatible API.
| Provider | Key | Address |
|---|---|---|
nebius | NEBIUS_API_KEY | https://api.tokenfactory.nebius.com/v1 |
openrouter | OPENROUTER_API_KEY | https://openrouter.ai/api/v1 |
groq | GROQ_API_KEY | https://api.groq.com/openai/v1 |
google | GOOGLE_API_KEY | https://generativelanguage.googleapis.com/v1beta/openai/ |
openai | OPENAI_API_KEY | https://api.openai.com/v1 |
anthropic | ANTHROPIC_API_KEY | https://api.anthropic.com/v1/ |
litellm | LITELLM_API_KEY | LITELLM_BASE_URL |
modal | MODAL_PROXY_TOKEN_ID and MODAL_PROXY_TOKEN_SECRET | MODAL_BASE_URL |
local | REHEARSAL_LOCAL_API_KEY | REHEARSAL_LOCAL_BASE_URL |
custom | REHEARSAL_CUSTOM_API_KEY | REHEARSAL_CUSTOM_BASE_URL |
local is for a model server on your own machine, such as vLLM. custom is for any other
OpenAI-compatible address. rehearsal prices shows the price the server uses for each configured model.
Workers and sandboxes
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_RUN_PARALLEL | 4 | Into how many parts a run is cut. Each part needs one free worker and one sandbox. |
REHEARSAL_BUILD_PARALLEL | 4 | How many jobs a build writes and validates at once. Each one being validated runs its own copy of the world. |
REHEARSAL_MAX_ACTIVE_BUILDS | 0, no limit | Builds that one project may have in progress. |
REHEARSAL_MAX_ACTIVE_RUNS | 0, no limit | Runs that one project may have in progress. |
REHEARSAL_CONTAINER_MEMORY | 1g | The memory limit of each container in a sandbox. |
REHEARSAL_CONTAINER_CPUS | 1.0 | The processor limit of each container in a sandbox. |
REHEARSAL_CONTAINER_PIDS | 256 | The process limit of each container in a sandbox. |
REHEARSAL_LEASE_SECONDS | 60 | How long a worker's claim on a server job lasts without a renewal. After that, another worker takes the job. |
REHEARSAL_WORKER_CONTAINER | The worker's own container id, when the worker runs in a container. The Compose file sets it. |
Spend and plans
| Setting | Default | What it changes |
|---|---|---|
REHEARSAL_MONTHLY_ALLOWANCE_USD | 0, no limit | A model spend limit for the whole server, for a calendar month. It applies when plans are off. |
REHEARSAL_PLANS | off | on puts every workspace on a plan and enforces its limits. Leave it off on a private server. |
REHEARSAL_QUIET_HOURS_UTC | 18:00-02:00 | When evaluations of the Free plan may start, as HH:MM-HH:MM in UTC. It may cross midnight. |
DODO_PAYMENTS_API_KEY | The payment provider's key. Only with plans on. | |
DODO_PAYMENTS_WEBHOOK_KEY | The secret that signs the payment provider's notifications. | |
DODO_PAYMENTS_ENVIRONMENT | test_mode | test_mode or live_mode. |
DODO_PRODUCT_* | The payment provider's product id for each thing that can be bought: PRO_MONTHLY, PRO_YEARLY, TEAM_MONTHLY, TEAM_YEARLY, EPISODES_1000, BUILD_1. |
Tracing and training
| Setting | Default | What it changes |
|---|---|---|
NEATLOGS_API_KEY | With it, the server sends traces of model calls to neatlogs. Without it, tracing is off. | |
KAGGLE_API_TOKEN | For training, which is not built yet. |
Was this page helpful?