| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # HuggingClaw โ Environment Configuration | |
| # Deploy OpenClaw on HuggingFace Spaces | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # Usage: | |
| # Local Docker โ cp .env.example .env โ fill in values โ docker run --env-file .env | |
| # HF Spaces โ Set each variable as a "Repository Secret" in Space Settings | |
| # | |
| # Legend: | |
| # [REQUIRED] Must be set, or data persistence will not work | |
| # [RECOMMENDED] Strongly recommended for production use | |
| # [OPTIONAL] Fine-tune behavior; safe to leave empty | |
| # | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # โโโ SECURITY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # Password for the Control UI dashboard. | |
| # Visitors can see the UI, but only users with this password can connect | |
| # and control the OpenClaw instance (manage agents, plugins, settings). | |
| # | |
| # [RECOMMENDED] Default: huggingclaw | |
| # | |
| OPENCLAW_PASSWORD=huggingclaw | |
| # โโโ DATA PERSISTENCE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # HuggingClaw auto-syncs the ~/.openclaw directory to a private HF Dataset | |
| # repo, so your conversations, settings, and credentials survive restarts. | |
| # Without these two variables, all data is lost when the Space restarts. | |
| # | |
| # HuggingFace Access Token with WRITE permission. | |
| # Create one at: https://huggingface.co/settings/tokens | |
| # Scopes needed: read + write access to your repos. | |
| # | |
| # [REQUIRED] | |
| # | |
| HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # Target Dataset repository for data backup. | |
| # Format: your-username/repo-name | |
| # Example: your-name/YourSpace-data | |
| # | |
| # Manual mode (default): create the repo yourself, then set this variable. | |
| # Auto mode (AUTO_CREATE_DATASET=true): if not set, HuggingClaw derives | |
| # it from your HF_TOKEN username โ "your-username/HuggingClaw-data". | |
| # | |
| # [REQUIRED in manual mode, OPTIONAL in auto mode] | |
| # | |
| OPENCLAW_DATASET_REPO=your-username/HuggingClaw-data | |
| # Whether to auto-create the Dataset repo if it doesn't exist. | |
| # When true: HuggingClaw creates a PRIVATE dataset repo on first startup. | |
| # If OPENCLAW_DATASET_REPO is not set, the repo name is auto-derived | |
| # from your HF_TOKEN username (e.g. "your-username/HuggingClaw-data"). | |
| # When false (default): you must create the repo manually on HuggingFace | |
| # and set OPENCLAW_DATASET_REPO yourself. | |
| # | |
| # [OPTIONAL] Default: false | |
| # | |
| # AUTO_CREATE_DATASET=false | |
| # How often (in seconds) to back up data to the Dataset repo. | |
| # Lower values = safer but more API calls to HuggingFace. | |
| # | |
| # [OPTIONAL] Default: 60 | |
| # | |
| # SYNC_INTERVAL=60 | |
| # โโโ LLM / OPENAI-COMPATIBLE API โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # OpenClaw supports any OpenAI-compatible API. Set the API key for the | |
| # provider(s) you use. See OpenClaw docs: https://openclawdoc.com/docs/reference/environment-variables | |
| # | |
| # OpenAI (or any OpenAI-compatible endpoint) | |
| # Use OPENAI_API_KEY alone for api.openai.com, or set OPENAI_BASE_URL for | |
| # compatible endpoints (e.g. OpenRouter, local LLM servers, Azure OpenAI). | |
| # | |
| # [RECOMMENDED] At least one of the following for AI conversations | |
| # | |
| OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # Optional: base URL for OpenAI-compatible API (default: https://api.openai.com/v1) | |
| # Examples: https://openrouter.ai/api/v1, http://localhost:11434/v1 (Ollama), etc. | |
| # | |
| # OPENAI_BASE_URL=https://api.openai.com/v1 | |
| # OpenRouter โ one key, 200+ models, free tier: https://openrouter.ai/keys | |
| # | |
| OPENROUTER_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # Other providers (OpenClaw reads these from the environment) | |
| # | |
| # ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # GOOGLE_API_KEY=AIza... | |
| # MISTRAL_API_KEY=mis-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # COHERE_API_KEY=co-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| # Default model for new conversations (must exist in your configured provider). | |
| # | |
| # [OPTIONAL] Examples: openai/gpt-5-nano, openrouter/deepseek/deepseek-chat:free | |
| # | |
| # OPENCLAW_DEFAULT_MODEL=openai/gpt-5-nano | |
| # โโโ LOCAL MODEL INFERENCE (Ollama) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # Run small models (โค1B) locally on CPU - perfect for HF Spaces free tier! | |
| # Models are stored in ~/.ollama and persisted via HF Dataset sync. | |
| # For NeuralNexusLab/HacKing 0.6B or other lightweight models. | |
| # | |
| # Enable local model inference | |
| # [OPTIONAL] Default: false | |
| # | |
| # LOCAL_MODEL_ENABLED=true | |
| # Model to pull from Ollama library or HuggingFace | |
| # Format: model_name (e.g., neuralnexuslab/hacking, llama3.1:8b, qwen2.5:7b) | |
| # For HF models: use hf.co/username/modelname format | |
| # [OPTIONAL] Example: neuralnexuslab/hacking | |
| # | |
| # LOCAL_MODEL_NAME=neuralnexuslab/hacking | |
| # Ollama API base URL (internal container network) | |
| # [OPTIONAL] Default: http://localhost:11434/v1 | |
| # | |
| # LOCAL_MODEL_BASE_URL=http://localhost:11434/v1 | |
| # Model ID as it appears in OpenClaw (matches Ollama model name) | |
| # [OPTIONAL] Default: neuralnexuslab/hacking | |
| # | |
| # LOCAL_MODEL_ID=neuralnexuslab/hacking | |
| # Display name in Control UI model selector | |
| # [OPTIONAL] Default: NeuralNexus HacKing 0.6B | |
| # | |
| # LOCAL_MODEL_NAME_DISPLAY=NeuralNexus HacKing 0.6B | |
| # Ollama server settings | |
| # [OPTIONAL] Default: 2 (good for 0.6B models on CPU) | |
| # | |
| # OLLAMA_NUM_PARALLEL=2 | |
| # Keep model loaded in memory (-1 = forever, 5m = 5 minutes) | |
| # [OPTIONAL] Default: -1 (always loaded) | |
| # | |
| # OLLAMA_KEEP_ALIVE=-1 | |
| # Ollama models directory (persisted across restarts) | |
| # [OPTIONAL] Default: ~/.ollama/models | |
| # | |
| # OLLAMA_MODELS=/home/node/.ollama/models | |
| # โโโ PERFORMANCE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # Node.js heap memory limit in MB. | |
| # HF free tier provides 16 GB RAM. Default 512 MB is enough for most cases. | |
| # Increase if you run complex agent workflows or handle large conversations. | |
| # | |
| # [OPTIONAL] Default: 512 | |
| # | |
| # NODE_MEMORY_LIMIT=512 | |
| # โโโ LOCALE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # Timezone for log timestamps and scheduled tasks. | |
| # | |
| # [OPTIONAL] Default: UTC | |
| # | |
| # TZ=Asia/Shanghai | |
| # โโโ OPENCLAW (from official docs) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # Optional overrides. See https://openclawdoc.com/docs/reference/environment-variables | |
| # | |
| # OPENCLAW_HOME=~/.openclaw | |
| # OPENCLAW_STATE_DIR=~/.openclaw | |
| # OPENCLAW_CONFIG_PATH=~/.openclaw/openclaw.json | |
| # OPENCLAW_LOG_LEVEL=info | |
| # OPENCLAW_API_PORT=8080 | |
| # OPENCLAW_WS_PORT=8081 | |
| # OPENCLAW_HOST=0.0.0.0 | |
| # OLLAMA_HOST=http://localhost:11434 | |
| # OPENCLAW_HTTP_PROXY= | |
| # OPENCLAW_HTTPS_PROXY= | |
| # OPENCLAW_NO_PROXY= | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # OpenClaw ๅฎๆน็ฏๅขๅ้ | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # HuggingClaw ๅฏๅจ OpenClaw ๆถ้ไผ ๆดไธช็ฏๅข๏ผenv=os.environ.copy()๏ผ๏ผ | |
| # ๅ ๆญค OpenClaw ๅฎๆนๆๆกฃไธญๅๅบ็ **ๆๆ** ็ฏๅขๅ้ๅจ HF Spaces / Docker ไธญ | |
| # ่ฎพ็ฝฎๅๅๅฏ็ดๆฅ็ๆใ | |
| # ๅฎๆนๅฎๆดๅ่กจ่ง๏ผhttps://openclawdoc.com/docs/reference/environment-variables | |
| # | |
| # ๅธธ่ง็ฑปๅซ๏ผไป ๅไธพ้จๅ๏ผ๏ผ | |
| # API Keys: OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, MISTRAL_API_KEY, | |
| # COHERE_API_KEY, OPENROUTER_API_KEY | |
| # Server: OPENCLAW_API_PORT, OPENCLAW_WS_PORT, OPENCLAW_METRICS_PORT, | |
| # OPENCLAW_HOST, OPENCLAW_TLS_* | |
| # App: OPENCLAW_CONFIG, OPENCLAW_DATA_DIR, OPENCLAW_LOG_LEVEL, | |
| # OPENCLAW_LOG_FORMAT, OPENCLAW_LOG_FILE, OPENCLAW_ENV | |
| # Memory: OPENCLAW_MEMORY_BACKEND, OPENCLAW_REDIS_URL, OPENCLAW_SQLITE_PATH | |
| # Network: OPENCLAW_HTTP_PROXY, OPENCLAW_HTTPS_PROXY, OPENCLAW_NO_PROXY, | |
| # OPENCLAW_OUTBOUND_MODE | |
| # Secrets: OPENCLAW_SECRETS_BACKEND, OPENCLAW_SECRETS_KEY, VAULT_ADDR, VAULT_TOKEN | |
| # Ollama: OLLAMA_HOST, OLLAMA_NUM_PARALLEL, OLLAMA_KEEP_ALIVE | |
| # Browser: OPENCLAW_BROWSER_EXECUTABLE, OPENCLAW_BROWSER_HEADLESS | |
| # | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # HuggingClaw ๆฐๅขๅ้ไธ่ง๏ผไป ๆฌไปๅบ่ๆฌไฝฟ็จ๏ผ | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # | |
| # โโโ ๅฎๅ จ / ๆงๅถๅฐ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # OPENCLAW_PASSWORD [ๆจ่] ๆงๅถๅฐๅฏ็ ๏ผๆช่ฎพๅ้ป่ฎค huggingclaw | |
| # | |
| # โโโ ๆไน ๅ (HuggingFace Dataset) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # HF_TOKEN [ๅฟ ๅกซ] HF ่ฎฟ้ฎไปค็๏ผ้ๅ ทๅคๅๅ ฅๆ้ | |
| # OPENCLAW_DATASET_REPO [ๅฟ ๅกซ] ๅคไปฝ็จ Dataset ไปๅบ๏ผๅฆ your-name/HuggingClaw-data | |
| # AUTO_CREATE_DATASET [ๅฏ้] ๆฏๅฆ่ชๅจๅๅปบไปๅบ๏ผ้ป่ฎค false๏ผๅฎๅ จ่่๏ผ | |
| # SYNC_INTERVAL [ๅฏ้] ๅคไปฝ้ด้๏ผ็ง๏ผ๏ผ้ป่ฎค 60 | |
| # HF_HUB_DOWNLOAD_TIMEOUT [ๅฏ้] ไธ่ฝฝ่ถ ๆถ๏ผ็ง๏ผ๏ผ้ป่ฎค 300 | |
| # HF_HUB_UPLOAD_TIMEOUT [ๅฏ้] ไธไผ ่ถ ๆถ๏ผ็ง๏ผ๏ผ้ป่ฎค 600 | |
| # | |
| # โโโ LLM / ๅฏน่ฏ API๏ผ่ณๅฐ้ ็ฝฎๅ ถไธไปฅๅฏ็จ AI ๅฏน่ฏ๏ผโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # OPENAI_API_KEY [ๆจ่] OpenAI ๆๅ ผๅฎน็ซฏ็น API Key | |
| # OPENAI_BASE_URL [ๅฏ้] ๅ ผๅฎน API ๅบๅฐๅ๏ผ้ป่ฎค https://api.openai.com/v1 | |
| # OPENROUTER_API_KEY [ๅฏ้] OpenRouter๏ผ200+ ๆจกๅใๅ ่ดน้ขๅบฆ | |
| # ANTHROPIC_API_KEY [ๅฏ้] Anthropic Claude | |
| # GOOGLE_API_KEY [ๅฏ้] Google / Gemini | |
| # MISTRAL_API_KEY [ๅฏ้] Mistral | |
| # COHERE_API_KEY [ๅฏ้] Cohere | |
| # OPENCLAW_DEFAULT_MODEL [ๅฏ้] ้ป่ฎคๆจกๅ ID | |
| # | |
| # โโโ ๆถๆฏๆธ ้ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # TelegramใWhatsApp ็ญๆถๆฏๆธ ้ๅๅฏๅจ Control UI ไธญ้ ็ฝฎ๏ผๆ ้็ฏๅขๅ้ใ | |
| # | |
| # โโโ HuggingFace Spaces ่ฟ่กๆถ๏ผHF ่ชๅจๆณจๅ ฅ๏ผไธ่ฌๆ ้ๆๅจ่ฎพ๏ผโโโโโโโโโโโโ | |
| # SPACE_HOST ๅฝๅ Space ๅๅ๏ผๅฆ xxx.hf.space | |
| # SPACE_ID ไปๅบ ID๏ผๅฆ username/HuggingClaw | |
| # | |
| # โโโ ๆง่ฝไธ่ฟ่ก โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| # NODE_MEMORY_LIMIT [ๅฏ้] Node ๅ ๅ ๅญไธ้(MB)๏ผ้ป่ฎค 512 | |
| # TZ [ๅฏ้] ๆถๅบ๏ผๅฆ Asia/Shanghai | |
| # | |
| # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |