~/.ravi/.env variables the code actually reads, how to change settings and agent properties, and where Ravi keeps its data and processes.
Where configuration lives
Changes made with
ravi agents, ravi instances and ravi settings apply to the running daemon without a restart. Changes to .env, and to a Slack channel’s credentials or defaults, need a restart of the process that reads them.
The .env file
How it is loaded
The daemon and the CLI both read~/.ravi/.env, but not the same way:
- The daemon (
raviunder PM2) loads the file at start and overrides any value already in its environment. The file wins. - The CLI (
raviin your shell) loads the file but only fills keys that are not already set. A variable exported in your shell wins over the file. - The channel runner (
ravi-channels) runs the CLI, so it reads the file the CLI way. It also inherits the environment of the shell that ranravi channels startorravi channels restart, so a variable exported in that shell wins over the file.
0600 and never prints the value:
ravi runtime env set accepts only CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, CODEX_HOME, GROK_HOME and GROK_DISABLE_AUTOUPDATER.
Slack tokens never come from
.env. The Slack runner reads them only from the credential broker. See Slack.Model providers
The Codex provider always runs
codex from PATH.
Infrastructure
HTTP gateway and SDK
The HTTP server is off unlessRAVI_HTTP_PORT is set. See SDKs and HTTP gateway.
Boolean variables accept
1, true or yes. The gateway never answers with Access-Control-Allow-Origin: *; chrome-extension:// origins are always allowed.
Media
The image provider is chosen by, in order: the command flag, the agent’s
image_provider default, the instance’s default, the image.provider setting, then RAVI_IMAGE_PROVIDER. See Media.
Slack runner
These are read by theravi-channels runner. Apply them with ravi channels restart.
A Slack channel’s own
defaults win over these variables, per channel:
defaults takes the whole JSON object; pass every key you want to keep.
ravi channels restart keeps the previous value of RAVI_SLACK_SUBSCRIPTION_SCOPE, RAVI_SLACK_THREAD_REPLY_MODE, RAVI_SLACK_ROOT_REPLY_MODE and RAVI_SLACK_WORKING_REACTION when your shell no longer sets them. To drop a value, remove it, then run ravi channels stop and ravi channels start.Credentials and sandbox
Not used
Older docs listOMNI_DIR, DATABASE_URL, OMNI_API_PORT and NATS_PORT. Ravi does not read them. Omni’s database and ports are Omni’s configuration; Ravi reaches NATS through NATS_URL.
Global settings
Settings live inravi.db and apply immediately.
ravi settings list also shows runtime.model_broker.required, the superadmin-only permissions.* keys and tasks.sessionTtl.knowledgeEngineer.
Agent properties
When you change
provider, model or modelPreset, sessions without their own override switch on their next turn. Sessions pinned with ravi sessions set-provider or ravi sessions set-model keep their pin; add --force to clear those pins too.
DM scopes
The DM scope decides which direct messages share a session.
Groups always get their own session,
agent:main:<channel>:<account>:group:<id>, with :thread:<id> added for threads.
The scope is chosen by: the matching route’s dmScope, then the agent’s dmScope, then the defaultDmScope setting.
ravi instances set <name> dmScope <scope> is accepted and stored, but routing does not use it. Set the scope on the route or the agent.Files on disk
Ravi’s logs are PM2’s logs:
PM2 processes
If you run NATS yourself instead of through Omni, it is your own PM2 process (for example
nats). See Install.
ravi daemon start starts only ravi. ravi daemon status shows ravi, omni-nats and omni-api; check the runner with ravi channels status or pm2 ls. ravi update restarts both ravi and ravi-channels.
To bring everything back after a reboot:
ravi daemon install saves the PM2 process list and suggests the startup command.