# Nanobot Configuration for Dokploy # Copy this file to .env and fill in your values # # IMPORTANT: Use the exact variable names below (with NANOBOT_ prefix and __ delimiter) # Docker Compose will pass these to the container as environment variables # =============================== # Port Configuration # =============================== NANOBOT_PORT=18790 # =============================== # LLM Provider API Keys # =============================== # Configure at least one provider below # Z.AI (Zhipu AI) - RECOMMENDED - GLM-4.7 for Coding # Cost: $0.11/M tokens (input), $0.35/M tokens (output) # Get your API key from: https://open.bigmodel.cn/usercenter/apikeys # # IMPORTANT: If using Z.AI Coding Plan, you MUST specify the API base: # For regular Zhipu AI (default): # NANOBOT_PROVIDERS__ZAI__API_BASE=https://open.bigmodel.cn/api/paas/v4/ # # For Z.AI Coding Plan (RECOMMENDED for developers): # NANOBOT_PROVIDERS__ZAI__API_BASE=https://api.z.ai/api/coding/paas/v4/ # # Models: zai/glm-4.7, zai/glm-4.7-flash (FREE), zai/glm-4.6, zai/glm-4.5 NANOBOT_PROVIDERS__ZAI__API_KEY= NANOBOT_PROVIDERS__ZAI__API_BASE=https://api.z.ai/api/coding/paas/v4/ # OpenRouter - Multi-provider access (alternative) # Get your API key from: https://openrouter.ai/keys NANOBOT_PROVIDERS__OPENROUTER__API_KEY= # Anthropic (Claude models) # Get your API key from: https://console.anthropic.com/ NANOBOT_PROVIDERS__ANTHROPIC__API_KEY= # OpenAI (GPT models) # Get your API key from: https://platform.openai.com/api-keys NANOBOT_PROVIDERS__OPENAI__API_KEY= # Google Gemini # Get your API key from: https://aistudio.google.com/app/apikey NANOBOT_PROVIDERS__GEMINI__API_KEY= # =============================== # Web Search (Optional) # =============================== # Brave Search API for web search tool # Get your API key from: https://brave.com/search/api/ NANOBOT_TOOLS__WEB__SEARCH__API_KEY= # =============================== # Mem0 Memory System (Included by Default) # =============================== # Mem0 server URL (Docker Compose uses internal network) # For Docker Compose: http://mem0:8000 # For manual setup: http://localhost:8000 MEM0_URL=http://mem0:8000 # Optional: Mem0 API key (if your Mem0 instance requires authentication) # Leave empty if not using authentication MEM0_API_KEY= # =============================== # Mem0 LLM Configuration (REQUIRED) # =============================== # Mem0 needs an LLM provider to process memories. Use the same provider as nanobot. # # For Z.AI (RECOMMENDED - same as nanobot): # Use your Z.AI API key (same as NANOBOT_PROVIDERS__ZAI__API_KEY) MEM0_OPENAI_API_KEY= # Z.AI API base (compatible with OpenAI API) MEM0_OPENAI_API_BASE=https://api.z.ai/api/coding/paas/v4/ # # Alternatively, you can use OpenAI: # MEM0_OPENAI_API_KEY=sk-xxxxxxxxxxxxx # MEM0_OPENAI_API_BASE=https://api.openai.com/v1/ # # Note: Mem0 uses OpenAI-compatible API, so we use OPENAI_* variables # but can point to Z.AI or any OpenAI-compatible provider # =============================== # Telegram Bot (Optional) # =============================== # Create a bot at: https://t.me/BotFather NANOBOT_CHANNELS__TELEGRAM__TOKEN= # Get your user ID from: https://t.me/userinfobot # Format: JSON array of user IDs: ["123456789", "987654321"] NANOBOT_CHANNELS__TELEGRAM__ALLOW_FROM=["123456789"] # =============================== # WhatsApp (Optional) # =============================== NANOBOT_CHANNELS__WHATSAPP__ENABLED=false # Phone numbers allowed to interact (format: JSON array) NANOBOT_CHANNELS__WHATSAPP__ALLOW_FROM=["+1234567890"] # =============================== # Advanced Configuration # =============================== # Default model to use (overrides providers.zai.model) # Options: # - Z.AI: zai/glm-4.7, zai/glm-4.7-flash (FREE), zai/glm-4.6, zai/glm-4.5 # - OpenRouter: openrouter/anthropic/claude-opus-4-5 # - Anthropic: anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-5 # - OpenAI: openai/gpt-4o, openai/o1 # - Gemini: gemini/gemini-2.0-flash-exp NANOBOT_AGENTS__DEFAULTS__MODEL=zai/glm-4.7