openclaw-nerve/.env.example

76 lines
5 KiB
Text

# Nerve Configuration
# Tip: Run `npm run setup` for guided configuration instead of editing this manually.
# ─── Server ───────────────────────────────────────────────────────────────────
# HTTP/HTTPS ports
PORT=3080
SSL_PORT=3443
# Bind address — defaults to 127.0.0.1 (localhost only)
# Set to 0.0.0.0 for network/remote access (requires auth — see below)
# HOST=127.0.0.1
# Development: Vite runs on VITE_PORT and proxies /api + /ws to PORT
# VITE_PORT=3080 # Vite dev server port (default: 3080)
# VITE_HOST=127.0.0.1 # Vite dev server bind address (default: 127.0.0.1)
# ─── Agent Identity ──────────────────────────────────────────────────────────
AGENT_NAME=Agent
# ─── OpenClaw Gateway (required) ─────────────────────────────────────────────
# Authentication token for the OpenClaw gateway.
# Injected server-side for trusted (local or authenticated) connections.
GATEWAY_TOKEN=
# OPENCLAW_GATEWAY_TOKEN= # Alternative name for GATEWAY_TOKEN (checked as fallback)
GATEWAY_URL=http://127.0.0.1:18789
# NERVE_PUBLIC_ORIGIN=https://your-nerve.example.com # Explicit browser origin for remote-workspace gateway RPC fallback
# ─── Authentication ──────────────────────────────────────────────────────────
# Enable to require a password for all API/WebSocket access.
# The setup wizard configures these automatically when network access is chosen.
# NERVE_AUTH=false
# NERVE_PASSWORD_HASH= # scrypt hash — generated by `npm run setup`
# NERVE_SESSION_SECRET= # 32-byte hex for cookie signing — auto-generated by setup
# NERVE_SESSION_TTL=2592000000 # Session lifetime in ms (default: 30 days)
# ─── Security Override ───────────────────────────────────────────────────────
# Setting HOST=0.0.0.0 without auth causes the server to refuse to start.
# Set this to bypass that safety check (NOT recommended for production).
# NERVE_ALLOW_INSECURE=false
# ─── Paths (defaults to ~/.openclaw structure if unset) ──────────────────────
# MEMORY_PATH=~/.openclaw/workspace/MEMORY.md
# MEMORY_DIR=~/.openclaw/workspace/memory
# SESSIONS_DIR=~/.openclaw/agents/main/sessions
# USAGE_FILE=~/.openclaw/token-usage.json
# NERVE_WATCH_WORKSPACE_RECURSIVE=false # Disable full-workspace live file watching (default: enabled)
# ─── API Keys (optional — Edge TTS is always available as a free fallback) ───
OPENAI_API_KEY=
REPLICATE_API_TOKEN=
MIMO_API_KEY= # Xiaomi MiMo TTS, used only when Xiaomi is selected explicitly
# ─── API Base URLs (optional — override for proxies or self-hosted) ──────────
# OPENAI_BASE_URL=https://api.openai.com/v1
# REPLICATE_BASE_URL=https://api.replicate.com/v1
# ─── Speech-to-Text ─────────────────────────────────────────────────────────
# STT_PROVIDER=local # 'local' (whisper.cpp) or 'openai'
# WHISPER_MODEL=tiny # tiny, base, small (multilingual) or tiny.en, base.en, small.en
# WHISPER_MODEL_DIR=~/.nerve/models # Directory for downloaded whisper model files
# NERVE_LANGUAGE=en # Preferred voice language (ISO 639-1)
# EDGE_VOICE_GENDER=female # Edge TTS voice gender: 'female' or 'male'
# NERVE_VOICE_PHRASES_PATH=~/.nerve/voice-phrases.json
# ─── TTS Cache ───────────────────────────────────────────────────────────────
# TTS_CACHE_TTL_MS=3600000 # Cache TTL in ms (default: 1 hour)
# TTS_CACHE_MAX=200 # Max cached TTS entries (in-memory LRU)
# ─── Network & CORS ─────────────────────────────────────────────────────────
# ALLOWED_ORIGINS=https://your-server.example.com:3443
# CSP_CONNECT_EXTRA=wss://your-server.example.com:3443 https://your-server.example.com:3443
# WS_ALLOWED_HOSTS=gateway.local,10.0.0.5
# TRUSTED_PROXIES=127.0.0.1,::1,::ffff:127.0.0.1
# ─── Codex Integration ──────────────────────────────────────────────────────
# CODEX_DIR=.codex