TaskFlow
DashboardFreewriteWhiteboardsProjectsCRMTasksNotificationsSettingsAgent TowerAPI Docs
OpenClaw Docs
?

User

Member

Caricamento in corso...

Home
Progetti
Task
Notifiche
CRM

    OpenClaw

    Documentation Mirror

    Documentation Overview

    Docs

    Auth credential semantics
    Scheduled tasks
    Hooks
    Automation & tasks
    Standing orders
    Task flow
    Background tasks
    BlueBubbles
    Broadcast groups
    Channel routing
    Discord
    Feishu
    Google Chat
    Group messages
    Groups
    iMessage
    Chat channels
    IRC
    LINE
    Channel location parsing
    Matrix
    Matrix migration
    Matrix push rules for quiet previews
    Mattermost
    Microsoft Teams
    Nextcloud Talk
    Nostr
    Pairing
    QA channel
    QQ bot
    Signal
    Slack
    Synology Chat
    Telegram
    Tlon
    Channel troubleshooting
    Twitch
    WeChat
    WhatsApp
    Yuanbao
    Zalo
    Zalo personal
    CI pipeline
    ACP
    Agent
    Agents
    Approvals
    Backup
    Browser
    Channels
    Clawbot
    `openclaw commitments`
    Completion
    Config
    Configure
    Cron
    Daemon
    Dashboard
    Devices
    Directory
    DNS
    Docs
    Doctor
    Flows (redirect)
    Gateway
    Health
    Hooks
    CLI reference
    Inference CLI
    Logs
    MCP
    Memory
    Message
    Migrate
    Models
    Node
    Nodes
    Onboard
    Pairing
    Plugins
    Proxy
    QR
    Reset
    Sandbox CLI
    Secrets
    Security
    Sessions
    Setup
    Skills
    Status
    System
    `openclaw tasks`
    TUI
    Uninstall
    Update
    Voicecall
    Webhooks
    Wiki
    Active memory
    Agent runtime
    Agent loop
    Agent runtimes
    Agent workspace
    Gateway architecture
    Channel docking
    Inferred commitments
    Compaction
    Context
    Context engine
    Delegate architecture
    Dreaming
    Experimental features
    Features
    Markdown formatting
    Memory overview
    Builtin memory engine
    Honcho memory
    QMD memory engine
    Memory search
    Messages
    Model failover
    Model providers
    Models CLI
    Multi-agent routing
    OAuth
    OpenClaw App SDK
    Presence
    QA overview
    Matrix QA
    Command queue
    Steering queue
    Retry policy
    Session management
    Session pruning
    Session tools
    SOUL.md personality guide
    Streaming and chunking
    System prompt
    Timezones
    TypeBox
    Typing indicators
    Usage tracking
    Date and time
    Node + tsx crash
    Diagnostics flags
    Authentication
    Background exec and process tool
    Bonjour discovery
    Bridge protocol
    CLI backends
    Configuration — agents
    Configuration — channels
    Configuration — tools and custom providers
    Configuration
    Configuration examples
    Configuration reference
    Diagnostics export
    Discovery and transports
    Doctor
    Gateway lock
    Health checks
    Heartbeat
    Gateway runbook
    Local models
    Gateway logging
    Multiple gateways
    Network model
    OpenAI chat completions
    OpenResponses API
    OpenShell
    OpenTelemetry export
    Gateway-owned pairing
    Prometheus metrics
    Gateway protocol
    Remote access
    Remote gateway setup
    Sandbox vs tool policy vs elevated
    Sandboxing
    Secrets management
    Secrets apply plan contract
    Security audit checks
    Security
    Tailscale
    Tools invoke API
    Troubleshooting
    Trusted proxy auth
    Debugging
    Environment variables
    FAQ
    FAQ: first-run setup
    FAQ: models and auth
    GPT-5.5 / Codex agentic parity
    GPT-5.5 / Codex parity maintainer notes
    Help
    Scripts
    Testing
    Testing: live suites
    General troubleshooting
    OpenClaw
    Ansible
    Azure
    Bun (experimental)
    ClawDock
    Release channels
    DigitalOcean
    Docker
    Docker VM runtime
    exe.dev
    Fly.io
    GCP
    Hetzner
    Hostinger
    Install
    Installer internals
    Kubernetes
    macOS VMs
    Migration guide
    Migrating from Claude
    Migrating from Hermes
    Nix
    Node.js
    Northflank
    Oracle Cloud
    Podman
    Railway
    Raspberry Pi
    Render
    Uninstall
    Updating
    Logging
    Network
    Audio and voice notes
    Camera capture
    Image and media support
    Nodes
    Location command
    Media understanding
    Talk mode
    Node troubleshooting
    Voice wake
    Pi integration architecture
    Pi development workflow
    Android app
    Platforms
    iOS app
    Linux app
    Gateway on macOS
    Canvas
    Gateway lifecycle
    macOS dev setup
    Health checks (macOS)
    Menu bar icon
    macOS logging
    Menu bar
    Peekaboo bridge
    macOS permissions
    Remote control
    macOS signing
    Skills (macOS)
    Voice overlay
    Voice wake (macOS)
    WebChat (macOS)
    macOS IPC
    macOS app
    Windows
    Plugin internals
    Plugin architecture internals
    Building plugins
    Plugin bundles
    Codex Computer Use
    Codex harness
    Community plugins
    Plugin compatibility
    Google Meet plugin
    Plugin hooks
    Plugin manifest
    Memory LanceDB
    Memory wiki
    Message presentation
    Agent harness plugins
    Building channel plugins
    Channel turn kernel
    Plugin entry points
    Plugin SDK migration
    Plugin SDK overview
    Building provider plugins
    Plugin runtime helpers
    Plugin setup and config
    Plugin SDK subpaths
    Plugin testing
    Skill workshop plugin
    Voice call plugin
    Webhooks plugin
    Zalo personal plugin
    OpenProse
    Alibaba Model Studio
    Anthropic
    Arcee AI
    Azure Speech
    Amazon Bedrock
    Amazon Bedrock Mantle
    Chutes
    Claude Max API proxy
    Cloudflare AI gateway
    ComfyUI
    Deepgram
    Deepinfra
    DeepSeek
    ElevenLabs
    Fal
    Fireworks
    GitHub Copilot
    GLM (Zhipu)
    Google (Gemini)
    Gradium
    Groq
    Hugging Face (inference)
    Provider directory
    Inferrs
    Inworld
    Kilocode
    LiteLLM
    LM Studio
    MiniMax
    Mistral
    Model provider quickstart
    Moonshot AI
    NVIDIA
    Ollama
    OpenAI
    OpenCode
    OpenCode Go
    OpenRouter
    Perplexity
    Qianfan
    Qwen
    Runway
    SGLang
    StepFun
    Synthetic
    Tencent Cloud (TokenHub)
    Together AI
    Venice AI
    Vercel AI gateway
    vLLM
    Volcengine (Doubao)
    Vydra
    xAI
    Xiaomi MiMo
    Z.AI
    Default AGENTS.md
    Release policy
    API usage and costs
    Credits
    Device model database
    Full release validation
    Memory configuration reference
    OpenClaw App SDK API design
    Prompt caching
    Rich output protocol
    RPC adapters
    SecretRef credential surface
    Session management deep dive
    AGENTS.md template
    BOOT.md template
    BOOTSTRAP.md template
    HEARTBEAT.md template
    IDENTITY template
    SOUL.md template
    TOOLS.md template
    USER template
    Tests
    Token use and costs
    Transcript hygiene
    Onboarding reference
    Contributing to the threat model
    Threat model (MITRE ATLAS)
    Formal verification (security models)
    Network proxy
    Agent bootstrapping
    Docs directory
    Getting started
    Docs hubs
    OpenClaw lore
    Onboarding (macOS app)
    Onboarding overview
    Personal assistant setup
    Setup
    Showcase
    Onboarding (CLI)
    CLI automation
    CLI setup reference
    ACP agents
    ACP agents — setup
    Agent send
    apply_patch tool
    Brave search
    Browser (OpenClaw-managed)
    Browser control API
    Browser troubleshooting
    Browser login
    WSL2 + Windows + remote Chrome CDP troubleshooting
    BTW side questions
    ClawHub
    Code execution
    Creating skills
    Diffs
    DuckDuckGo search
    Elevated mode
    Exa search
    Exec tool
    Exec approvals
    Exec approvals — advanced
    Firecrawl
    Gemini search
    Grok search
    Image generation
    Tools and plugins
    Kimi search
    LLM task
    Lobster
    Tool-loop detection
    Media overview
    MiniMax search
    Multi-agent sandbox and tools
    Music generation
    Ollama web search
    PDF tool
    Perplexity search
    Plugins
    Reactions
    SearXNG search
    Skills
    Skills config
    Slash commands
    Sub-agents
    Tavily
    Thinking levels
    Tokenjuice
    Trajectory bundles
    Text-to-speech
    Video generation
    Web search
    Web fetch
    Linux server
    Control UI
    Dashboard
    Web
    TUI
    WebChat

    OpenAPI Specs

    openapi
    TaskFlow
    docs/openclaw
    Original Docs

    Real-time Synchronized Documentation

    Last sync: 01/05/2026 07:01:30

    Note: This content is mirrored from docs.openclaw.ai and is subject to their terms and conditions.

    OpenClaw Docs

    v2.4.0 Production

    Last synced: Today, 22:00

    Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.

    Use this file to discover all available pages before exploring further.

    Environment variables

    OpenClaw pulls environment variables from multiple sources. The rule is never override existing values.

    Precedence (highest → lowest)

    1. Process environment (what the Gateway process already has from the parent shell/daemon).
    2. text
      .env
      in the current working directory
      (dotenv default; does not override).
    3. Global
      text
      .env
      at
      text
      ~/.openclaw/.env
      (aka
      text
      $OPENCLAW_STATE_DIR/.env
      ; does not override).
    4. Config
      text
      env
      block
      in
      text
      ~/.openclaw/openclaw.json
      (applied only if missing).
    5. Optional login-shell import (
      text
      env.shellEnv.enabled
      or
      text
      OPENCLAW_LOAD_SHELL_ENV=1
      ), applied only for missing expected keys.

    On Ubuntu fresh installs that use the default state dir, OpenClaw also treats

    text
    ~/.config/openclaw/gateway.env
    as a compatibility fallback after the global
    text
    .env
    . If both files exist and disagree, OpenClaw keeps
    text
    ~/.openclaw/.env
    and prints a warning.

    If the config file is missing entirely, step 4 is skipped; shell import still runs if enabled.

    Config
    text
    env
    block

    Two equivalent ways to set inline env vars (both are non-overriding):

    json5
    { env: { OPENROUTER_API_KEY: "sk-or-...", vars: { GROQ_API_KEY: "gsk-...", }, }, }

    Shell env import

    text
    env.shellEnv
    runs your login shell and imports only missing expected keys:

    json5
    { env: { shellEnv: { enabled: true, timeoutMs: 15000, }, }, }

    Env var equivalents:

    • text
      OPENCLAW_LOAD_SHELL_ENV=1
    • text
      OPENCLAW_SHELL_ENV_TIMEOUT_MS=15000

    Runtime-injected env vars

    OpenClaw also injects context markers into spawned child processes:

    • text
      OPENCLAW_SHELL=exec
      : set for commands run through the
      text
      exec
      tool.
    • text
      OPENCLAW_SHELL=acp
      : set for ACP runtime backend process spawns (for example
      text
      acpx
      ).
    • text
      OPENCLAW_SHELL=acp-client
      : set for
      text
      openclaw acp client
      when it spawns the ACP bridge process.
    • text
      OPENCLAW_SHELL=tui-local
      : set for local TUI
      text
      !
      shell commands.

    These are runtime markers (not required user config). They can be used in shell/profile logic to apply context-specific rules.

    UI env vars

    • text
      OPENCLAW_THEME=light
      : force the light TUI palette when your terminal has a light background.
    • text
      OPENCLAW_THEME=dark
      : force the dark TUI palette.
    • text
      COLORFGBG
      : if your terminal exports it, OpenClaw uses the background color hint to auto-pick the TUI palette.

    Env var substitution in config

    You can reference env vars directly in config string values using

    text
    ${VAR_NAME}
    syntax:

    json5
    { models: { providers: { "vercel-gateway": { apiKey: "${VERCEL_GATEWAY_API_KEY}", }, }, }, }

    See Configuration: Env var substitution for full details.

    Secret refs vs
    text
    ${ENV}
    strings

    OpenClaw supports two env-driven patterns:

    • text
      ${VAR}
      string substitution in config values.
    • SecretRef objects (
      text
      { source: "env", provider: "default", id: "VAR" }
      ) for fields that support secrets references.

    Both resolve from process env at activation time. SecretRef details are documented in Secrets Management.

    Path-related env vars

    VariablePurpose
    text
    OPENCLAW_HOME
    Override the home directory used for all internal path resolution (
    text
    ~/.openclaw/
    , agent dirs, sessions, credentials). Useful when running OpenClaw as a dedicated service user.
    text
    OPENCLAW_STATE_DIR
    Override the state directory (default
    text
    ~/.openclaw
    ).
    text
    OPENCLAW_CONFIG_PATH
    Override the config file path (default
    text
    ~/.openclaw/openclaw.json
    ).

    Logging

    VariablePurpose
    text
    OPENCLAW_LOG_LEVEL
    Override log level for both file and console (e.g.
    text
    debug
    ,
    text
    trace
    ). Takes precedence over
    text
    logging.level
    and
    text
    logging.consoleLevel
    in config. Invalid values are ignored with a warning.

    text
    OPENCLAW_HOME

    When set,

    text
    OPENCLAW_HOME
    replaces the system home directory (
    text
    $HOME
    /
    text
    os.homedir()
    ) for all internal path resolution. This enables full filesystem isolation for headless service accounts.

    Precedence:

    text
    OPENCLAW_HOME
    >
    text
    $HOME
    >
    text
    USERPROFILE
    >
    text
    os.homedir()

    Example (macOS LaunchDaemon):

    xml
    <key>EnvironmentVariables</key> <dict> <key>OPENCLAW_HOME</key> <string>/Users/user</string> </dict>

    text
    OPENCLAW_HOME
    can also be set to a tilde path (e.g.
    text
    ~/svc
    ), which gets expanded using
    text
    $HOME
    before use.

    nvm users: web_fetch TLS failures

    If Node.js was installed via nvm (not the system package manager), the built-in

    text
    fetch()
    uses nvm's bundled CA store, which may be missing modern root CAs (ISRG Root X1/X2 for Let's Encrypt, DigiCert Global Root G2, etc.). This causes
    text
    web_fetch
    to fail with
    text
    "fetch failed"
    on most HTTPS sites.

    On Linux, OpenClaw automatically detects nvm and applies the fix in the actual startup environment:

    • text
      openclaw gateway install
      writes
      text
      NODE_EXTRA_CA_CERTS
      into the systemd service environment
    • the
      text
      openclaw
      CLI entrypoint re-execs itself with
      text
      NODE_EXTRA_CA_CERTS
      set before Node startup

    Manual fix (for older versions or direct

    text
    node ...
    launches):

    Export the variable before starting OpenClaw:

    bash
    export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt openclaw gateway run

    Do not rely on writing only to

    text
    ~/.openclaw/.env
    for this variable; Node reads
    text
    NODE_EXTRA_CA_CERTS
    at process startup.

    Legacy environment variables

    OpenClaw only reads

    text
    OPENCLAW_*
    environment variables. The legacy
    text
    CLAWDBOT_*
    and
    text
    MOLTBOT_*
    prefixes from earlier releases are silently ignored.

    If any are still set on the Gateway process at startup, OpenClaw emits a single Node deprecation warning (

    text
    OPENCLAW_LEGACY_ENV_VARS
    ) listing the detected prefixes and the total count. Rename each value by replacing the legacy prefix with
    text
    OPENCLAW_
    (for example
    text
    CLAWDBOT_GATEWAY_TOKEN
    →
    text
    OPENCLAW_GATEWAY_TOKEN
    ); the old names take no effect.

    Related

    • Gateway configuration
    • FAQ: env vars and .env loading
    • Models overview

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine