Files
heretek-openclaw-cli/.env.vm.example
T
John Doe a2cba717c6 P6: Complete 8 initiatives - Agent files, deployment options, CLI, dashboards, plugins
P6-7: Agent File Completion (34 files - 11 agents × 3 files + guides)
  - Added BOOTSTRAP.md, IDENTITY.md, TOOLS.md for all 11 agents
  - Created AGENT_CREATION_GUIDE.md

P6-2: Per-Agent Model Configuration (9 files)
  - Agent model router and config library
  - YAML configs for arbiter, coder agents
  - Configuration documentation

P6-3: Health Check Dashboard (20+ files)
  - Complete frontend React application
  - API endpoints, WebSocket server
  - Collectors for agents, resources, services
  - Alert management and configuration

P6-4: LiteLLM Observability Integration (10 files)
  - LiteLLM metrics collector and API
  - Frontend components for model/budget tracking
  - Integration documentation

P6-1: Non-Docker Deployment (16 files)
  - Bare metal and VM deployment docs
  - Systemd service files
  - Installation scripts for Ubuntu/RHEL
  - Migration guide and troubleshooting

P6-6: Cloud-Native Deployments (45+ files)
  - AWS, Azure, GCP Terraform configurations
  - Kubernetes base deployments with Kustomize overlays
  - Cloud deployment documentation

P6-5: Unified Deployment CLI (28 files)
  - Complete CLI with 12 commands
  - Deployers for Docker, Kubernetes, cloud, baremetal
  - Health checker, backup manager, config manager

P6-8: Plugin Installation Guide (15 files)
  - Plugin development and installation guides
  - Plugin CLI documentation and registry
  - Templates for basic, skill, and tool plugins
2026-03-31 20:33:43 -04:00

380 lines
14 KiB
Bash

# ==============================================================================
# Heretek OpenClaw - VM Environment Configuration v2.0
# ==============================================================================
# Copy this file to /etc/openclaw/.env and update with your values
# Usage: cp .env.vm.example /etc/openclaw/.env
#
# Configuration: VM Deployment (AWS EC2, GCP Compute, Azure VM, etc.)
# Optimized for cloud VM environments with security group considerations
#
# Generated: 2026-03-31
# ==============================================================================
# ==============================================================================
# LITEELM GATEWAY CONFIGURATION
# ==============================================================================
# LiteLLM Master Key (REQUIRED - change in production!)
# Generate with: openssl rand -hex 32
LITELLM_MASTER_KEY=heretek-master-key-change-me
# LiteLLM Salt Key (used for encryption)
# Generate with: openssl rand -hex 32
LITELLM_SALT_KEY=heretek-salt-change-me
# LiteLLM Port (bind to 0.0.0.0 for external access)
LITELLM_PORT=4000
LITELLM_HOST=0.0.0.0
# LiteLLM UI Credentials
LITELLM_UI_USERNAME=admin
LITELLM_UI_PASSWORD=heretek-admin-change-me
# External URL for VM access (update with your VM's public IP or domain)
LITELLM_EXTERNAL_URL=http://YOUR_VM_IP:4000
# ==============================================================================
# PROVIDER API KEYS
# ==============================================================================
# See docs/configuration/PROVIDER_SETUP.md for detailed setup instructions
# See config/providers/ for pre-configured provider templates
# ==============================================================================
# ------------------------------------------------------------------------------
# MiniMax API (PRIMARY - All Agents Default)
# ------------------------------------------------------------------------------
# Get your key from: https://platform.minimaxi.ai
MINIMAX_API_KEY=your-minimax-key-here
MINIMAX_API_BASE=https://api.minimaxi.chat/v1
# ------------------------------------------------------------------------------
# z.ai Coding API (FAILOVER - GLM-5)
# ------------------------------------------------------------------------------
# Endpoint: https://api.z.ai/api/coding/paas/v4
ZAI_API_KEY=your-zai-key-here
ZAI_API_BASE=https://api.z.ai/api/coding/paas/v4
# ------------------------------------------------------------------------------
# OpenAI API (OPTIONAL)
# ------------------------------------------------------------------------------
# Get your key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-your-openai-key-here
OPENAI_API_BASE=https://api.openai.com/v1
OPENAI_ORGANIZATION=
# ------------------------------------------------------------------------------
# Anthropic API (OPTIONAL)
# ------------------------------------------------------------------------------
# Get your key from: https://console.anthropic.com/
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key-here
ANTHROPIC_API_BASE=https://api.anthropic.com
# ------------------------------------------------------------------------------
# Google API (OPTIONAL)
# ------------------------------------------------------------------------------
# Get your key from: https://makersuite.google.com/app/apikey
GOOGLE_API_KEY=your-google-api-key-here
GOOGLE_VERTEX_PROJECT_ID=your-gcp-project-id
GOOGLE_VERTEX_LOCATION=us-central1
# ------------------------------------------------------------------------------
# Azure OpenAI API (OPTIONAL)
# ------------------------------------------------------------------------------
# Create resource at: https://portal.azure.com
AZURE_API_KEY=your-azure-openai-key-here
AZURE_API_BASE=https://your-resource.openai.azure.com/
AZURE_API_VERSION=2024-02-15-preview
# ------------------------------------------------------------------------------
# xAI API (OPTIONAL)
# ------------------------------------------------------------------------------
# Get your key from: https://console.x.ai/
XAI_API_KEY=your-xai-key-here
XAI_API_BASE=https://api.x.ai
# ------------------------------------------------------------------------------
# Ollama (Local Models - No API key required)
# ------------------------------------------------------------------------------
OLLAMA_API_KEY=not-required
OLLAMA_HOST=http://localhost:11434
# ==============================================================================
# DATABASE CONFIGURATION (PostgreSQL)
# ==============================================================================
# PostgreSQL runs on localhost for VM deployment
# Bind to localhost only for security (use SSH tunnel for remote access)
# pgvector extension required for vector embeddings
# ==============================================================================
POSTGRES_USER=openclaw
POSTGRES_PASSWORD=heretek-secure-password-change-me
POSTGRES_DB=openclaw
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
DATABASE_URL=postgresql://openclaw:heretek-secure-password-change-me@localhost:5432/openclaw
# PostgreSQL connection pool settings (adjusted for VM resources)
DATABASE_POOL_SIZE=5
DATABASE_MAX_OVERFLOW=10
DATABASE_POOL_TIMEOUT=30
# ==============================================================================
# REDIS CONFIGURATION
# ==============================================================================
# Redis runs on localhost for VM deployment
# Bind to localhost only for security
# ==============================================================================
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_URL=redis://localhost:6379/0
# If password is enabled (recommended for VM):
# REDIS_URL=redis://:your-redis-password@localhost:6379/0
# Redis connection settings
REDIS_DB=0
REDIS_PASSWORD=
REDIS_SSL=false
# ==============================================================================
# OLLAMA CONFIGURATION (Local LLM Runtime)
# ==============================================================================
# Ollama runs on localhost for VM deployment
# GPU support depends on VM instance type
# ==============================================================================
# GPU Mode: cpu, amd, nvidia, auto
# For GPU-enabled VMs, set appropriately:
# - AWS g5 instances: nvidia
# - GCP g2 instances: nvidia
# - Azure NC series: nvidia
OLLAMA_GPU_MODE=auto
# Ollama host binding (localhost for security)
OLLAMA_HOST_BINDING=127.0.0.1
OLLAMA_PORT=11434
# Embedding model
OLLAMA_EMBEDDING_MODEL=nomic-embed-text-v2-moe
# Pre-pull models on startup
OLLAMA_MODELS=nomic-embed-text-v2-moe
# AMD ROCm Settings (for AMD GPU VMs)
# HSA_OVERRIDE_GFX_VERSION=10.3.0
# NVIDIA CUDA Settings (for NVIDIA GPU VMs)
# CUDA_VISIBLE_DEVICES=0
# ==============================================================================
# AGENT MODEL ASSIGNMENTS
# ==============================================================================
# Default model for all agent passthrough endpoints
DEFAULT_AGENT_MODEL=minimax/MiniMax-M2.7
# Failover model when primary is unavailable
FAILOVER_AGENT_MODEL=zai/glm-5-1
# Individual agent model overrides (optional)
# AGENT_CODER_MODEL=zai/glm-5-1
# ==============================================================================
# LITEELM A2A AGENT CONFIGURATION
# ==============================================================================
# Current agent name
AGENT_NAME=steward
# Agent configuration JSON
AGENTS='{
"steward": {"role": "orchestrator", "session": "agent:heretek:steward", "port": 8001},
"alpha": {"role": "triad", "session": "agent:heretek:alpha", "port": 8002},
"beta": {"role": "triad", "session": "agent:heretek:beta", "port": 8003},
"charlie": {"role": "triad", "session": "agent:heretek:charlie", "port": 8004},
"examiner": {"role": "interrogator", "session": "agent:heretek:examiner", "port": 8005},
"explorer": {"role": "scout", "session": "agent:heretek:explorer", "port": 8006},
"sentinel": {"role": "guardian", "session": "agent:heretek:sentinel", "port": 8007},
"coder": {"role": "artisan", "session": "agent:heretek:coder", "port": 8008},
"dreamer": {"role": "visionary", "session": "agent:heretek:dreamer", "port": 8009},
"empath": {"role": "diplomat", "session": "agent:heretek:empath", "port": 8010},
"historian": {"role": "archivist", "session": "agent:heretek:historian", "port": 8011}
}'
# ==============================================================================
# OPENCLAW SPECIFIC SETTINGS
# ==============================================================================
# OpenClaw directories
OPENCLAW_DATA_DIR=/root/.openclaw/data
OPENCLAW_WORKSPACE=/root/.openclaw/agents
OPENCLAW_LOG_DIR=/var/log/openclaw
COLLECTIVE_MEMORY_DIR=/root/.openclaw/memory
SKILLS_DIR=/root/heretek/heretek-openclaw/skills
PLUGINS_DIR=/root/heretek/heretek-openclaw/plugins
# ==============================================================================
# RATE LIMITING & CACHING
# ==============================================================================
# Rate limit settings (adjusted for VM deployment)
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS_PER_MINUTE=60
# Cache settings
CACHE_ENABLED=true
CACHE_TTL_SECONDS=3600
# ==============================================================================
# LOGGING & MONITORING
# ==============================================================================
# Log level
LOG_LEVEL=INFO
# Enable detailed request logging
LITELLM_REQUEST_LOGGING=true
# Cost tracking
LITELLM_COST_TRACKING_ENABLED=true
# Performance metrics
LITELLM_METRICS_ENABLED=true
# ==============================================================================
# A2A PROTOCOL SETTINGS
# ==============================================================================
LITELLM_STREAMING_ENABLED=true
LITELLM_AGENT_DISCOVERY_ENABLED=true
A2A_TASK_HANDOFF_TIMEOUT=60
A2A_HEARTBEAT_INTERVAL=30
# ==============================================================================
# WEBSOCKET CONFIGURATION
# ==============================================================================
# WebSocket URL for external access (update with your VM's public IP)
VITE_WS_URL=ws://YOUR_VM_IP:18789
WS_PORT=18789
# ==============================================================================
# FAILOVER CONFIGURATION
# ==============================================================================
LITELLM_PRIORITY_FALLBACK_ENABLED=true
LITELLM_HEALTH_CHECK_ENABLED=true
LITELLM_HEALTH_CHECK_INTERVAL=30
LITELLM_UNHEALTHY_THRESHOLD=2
# ==============================================================================
# OBSERVABILITY - LANGFUSE & OPENTELEMETRY
# ==============================================================================
# LangFuse Configuration
LANGFUSE_ENABLED=false
LANGFUSE_PUBLIC_KEY=pk-lf-your-public-key-here
LANGFUSE_SECRET_KEY=sk-lf-your-secret-key-here
LANGFUSE_HOST=https://cloud.langfuse.com
# OpenTelemetry Configuration
OTEL_ENABLED=false
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_TYPE=console
OTEL_SERVICE_NAME=heretek-openclaw
# ==============================================================================
# SECURITY (VM-Specific)
# ==============================================================================
# CORS allowed origins (update with your VM's public IP or domain)
CORS_ALLOWED_ORIGINS=http://YOUR_VM_IP:3000,http://YOUR_VM_IP:5173
# Admin emails for alerts
# ADMIN_EMAILS=admin@heretek.local
# API rate limiting (stricter for public VMs)
API_RATE_LIMIT_ENABLED=true
API_RATE_LIMIT_REQUESTS_PER_MINUTE=100
# Bind addresses (localhost for internal services)
POSTGRES_BIND_ADDRESS=127.0.0.1
REDIS_BIND_ADDRESS=127.0.0.1
OLLAMA_BIND_ADDRESS=127.0.0.1
# Public bind addresses (for external access)
LITELLM_BIND_ADDRESS=0.0.0.0
OPENCLAW_BIND_ADDRESS=0.0.0.0
# ==============================================================================
# BACKUP & RECOVERY (VM-Specific)
# ==============================================================================
# Enable automatic backup
AUTO_BACKUP_ENABLED=true
# Backup interval (hours)
BACKUP_INTERVAL_HOURS=24
# Backup retention (days)
BACKUP_RETENTION_DAYS=7
# Backup directory
BACKUP_DIR=/var/backups/openclaw
# Cloud backup integration (optional)
# AWS S3
# AWS_BACKUP_BUCKET=your-backup-bucket
# AWS_BACKUP_REGION=us-east-1
# AWS_ACCESS_KEY_ID=your-aws-key
# AWS_SECRET_ACCESS_KEY=your-aws-secret
# GCP Cloud Storage
# GCP_BACKUP_BUCKET=your-backup-bucket
# GCP_PROJECT_ID=your-project-id
# Azure Blob Storage
# AZURE_BACKUP_CONTAINER=your-backup-container
# AZURE_STORAGE_ACCOUNT=your-storage-account
# AZURE_STORAGE_KEY=your-storage-key
# ==============================================================================
# SYSTEM PATHS (VM Specific)
# ==============================================================================
# Data directories
POSTGRES_DATA_DIR=/var/lib/postgresql/15/main
REDIS_DATA_DIR=/var/lib/redis
OLLAMA_DATA_DIR=/var/lib/ollama
LITELLM_CONFIG_DIR=/etc/litellm
OPENCLAW_CONFIG_DIR=/etc/openclaw
# ==============================================================================
# SERVICE MANAGEMENT
# ==============================================================================
# Systemd service names
POSTGRES_SERVICE_NAME=postgresql
REDIS_SERVICE_NAME=redis
OLLAMA_SERVICE_NAME=ollama
LITELLM_SERVICE_NAME=litellm
OPENCLAW_SERVICE_NAME=openclaw-gateway
# ==============================================================================
# CLOUD-SPECIFIC SETTINGS
# ==============================================================================
# Cloud provider detection (auto-detected by vm-install.sh)
# Options: aws, gcp, azure, digitalocean, linode, bare-metal
CLOUD_PROVIDER=auto
# Instance metadata (auto-populated by vm-install.sh)
# INSTANCE_TYPE=auto
# INSTANCE_ID=auto
# REGION=auto
# ==============================================================================
# END OF ENVIRONMENT CONFIGURATION
# ==============================================================================