LAUNCH-SUB
LAUNCH-CLAWS
LAUNCH-SUB
LAUNCH-CLAWS
Environment Variables Reference
Overview
Environment variables control how your OpenClaw instance connects to services and configures its runtime behavior. Most variables are set automatically by ClawHosters based on your dashboard settings. Some can be customized via SSH for advanced use cases.
Variables Set by ClawHosters
These variables are managed automatically. Changing your dashboard settings updates them on the next config deployment.
Instance Identification
| Variable | Description | Example |
|---|---|---|
OPENCLAW_INSTANCE_ID |
Unique instance identifier | 42 |
OPENCLAW_CUSTOMER_ID |
Your customer ID | 7 |
OPENCLAW_TIER |
Your tier name | budget, balanced, pro |
OPENCLAW_INSTANCE_NAME |
The name you gave your instance | my-assistant |
OPENCLAW_GATEWAY_MODE |
Gateway operating mode | local |
OPENCLAW_GATEWAY_TOKEN |
SHA256-hashed token for web UI auth | a1b2c3... |
LLM Configuration
| Variable | Description | Set When |
|---|---|---|
LLM_MODE |
LLM operating mode | Always |
ANTHROPIC_API_KEY |
Anthropic API key | Anthropic selected |
OPENAI_API_KEY |
OpenAI API key | OpenAI selected |
OPENROUTER_API_KEY |
OpenRouter API key | OpenRouter selected |
GEMINI_API_KEY |
Google Gemini API key | Google selected |
DEEPSEEK_API_KEY |
DeepSeek API key | DeepSeek selected |
LLM_MODE values:
| Value | Meaning |
|---|---|
none |
No LLM configured — gateway-only mode |
byok |
Bring Your Own Key — your API key, direct to provider |
managed |
Managed LLM — routed through ClawHosters proxy |
When LLM_MODE is managed, the proxy URL is also set:
| Variable | Value |
|---|---|
LLM_PROXY_URL |
https://llm-proxy.clawhosters.com/v1 |
Playwright (Browser)
| Variable | Description | Value |
|---|---|---|
PLAYWRIGHT_BROWSERS_PATH |
Where Chromium is installed | /opt/playwright-browsers |
This is set in all instances. Chromium is pre-installed in the base snapshot for web automation skills.
Docker Compose Variables
These variables are set in the docker-compose.yml file and affect the container runtime:
| Variable | Description | Budget | Balanced | Pro |
|---|---|---|---|---|
NODE_OPTIONS |
Node.js memory limit | --max-old-space-size=768 |
--max-old-space-size=1536 |
--max-old-space-size=3072 |
The NODE_OPTIONS variable limits the Node.js heap size to prevent the container from running out of memory. It is set based on your tier's Docker memory limit.
Viewing Current Variables
Via Dashboard
Your instance's current environment variables are visible in the instance detail page. Sensitive values (API keys, tokens) are masked.
Via SSH
To see all variables inside the running container:
docker exec openclaw-<id> env
To check a specific variable:
docker exec openclaw-<id> printenv LLM_MODE
Adding Custom Variables
If you need to set custom environment variables (for MCP servers or custom skills):
Temporary (Until Container Restart)
docker exec openclaw-<id> bash -c "export MY_VAR=value && ..."
This does not persist across restarts.
Persistent (Via .env File)
SSH into your instance and edit the .env file:
# On the host (not inside the container)
nano /opt/openclaw/.env
Add your variable:
MY_CUSTOM_VAR=some-value
Then restart the container:
cd /opt/openclaw && docker compose restart
Custom variables in .env persist across restarts but are overwritten during a full redeploy from the dashboard. To keep custom variables after redeploy, add them again after each deployment.
Security Notes
- API keys are stored encrypted in the ClawHosters database
- Keys are decrypted only during config deployment
- On the instance, keys exist as plaintext in
openclaw.jsonand environment variables - The instance's firewall restricts network access, limiting exposure
- Never share your instance's
.envfile oropenclaw.json— they contain secrets
Related Documentation
- OpenClaw Configuration Reference — Config file structure
- Docker Configuration — Container settings
- Resource Limits — Memory limits by tier
- SSH Access — Connecting to your instance
Related Documentation
OpenClaw Configuration Reference
What openclaw.json Does The openclaw.json file is the main configuration file for your OpenClaw ...
Docker Configuration
How Docker Is Used Every ClawHosters instance runs OpenClaw inside a Docker container on a dedic...
Creating Your First Instance
What You'll Set Up An instance is a dedicated server running OpenClaw, provisioned exclusively f...