

Zeabur
⚠️ 此模板需要在 Zeabur 上使用專用伺服器,無法在共享叢集上運行。
建議資源: 1 vCPU / 2 GB RAM(最低:0.5 vCPU / 256 MB RAM)
Nanobot 是來自 HKUDS 的超輕量級個人 AI 助手框架(約 4K 行核心代理程式碼)。支援多種 LLM 供應商,並透過統一的 Gateway 架構連接各種訊息平台。
官方文件: github.com/HKUDS/nanobot
Telegram、Discord、WhatsApp、Slack、釘釘、飛書、QQ 和電子郵件。
/root/.nanobot/config.json部署時跳過了某個欄位? 可以事後透過檔案標籤編輯 /root/.nanobot/config.json,或在 Zeabur 控制台新增對應的環境變數並重啟服務。
預設模型: 使用 Zeabur AI Hub 時預設為 openai/claude-sonnet-4-5,使用 OpenRouter 時預設為 openrouter/anthropic/claude-sonnet-4。可隨時在設定檔中修改。
Nanobot 支援多種供應商,您可以隨時透過檔案標籤編輯 /root/.nanobot/config.json 並重啟服務來切換。
| 供應商 | 取得 API 金鑰 | providers 設定 | 模型 ID 範例 |
|---|---|---|---|
| Zeabur AI Hub | zeabur.com/ai-hub | "openai": {"api_key":"...","api_base":"https://hnd1.aihub.zeabur.ai/v1"} | openai/claude-sonnet-4-5 |
| OpenRouter | openrouter.ai/keys | "openrouter": {"api_key":"sk-or-..."} | openrouter/anthropic/claude-sonnet-4 |
| Anthropic | console.anthropic.com | "anthropic": {"api_key":"sk-ant-..."} | anthropic/claude-sonnet-4-5 |
| OpenAI | platform.openai.com | "openai": {"api_key":"sk-..."} | openai/gpt-4o |
| DeepSeek | platform.deepseek.com | "deepseek": {"api_key":"..."} | deepseek/deepseek-chat |
切換供應商步驟:
/root/.nanobot/config.json"providers" 中新增或修改供應商設定"agents" > "defaults" > "model" 改為新的模型 ID支援:Telegram、Discord、WhatsApp、Slack、釘釘、飛書、QQ 和電子郵件。完整的設定方式請參考官方文件。
Telegram 設定步驟:
@BotFather 並發送 /newbot如果您在部署時輸入了 bot token,已自動啟用。否則在設定檔中新增:
"channels": {
"telegram": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
}
其他平台 — 在設定檔中新增對應的頻道並重啟:
"channels": {
"discord": { "enabled": true, "token": "BOT_TOKEN", "allow_from": [] }
}
allow_from — 控制誰可以與機器人對話。空清單 [] = 任何人都可使用。如需限制存取,加入使用者 ID(Telegram 使用者可傳送訊息給 @userinfobot 查詢自己的 ID):
"allow_from": ["123456789", "987654321"]
修改設定後需重啟服務。
所有資料儲存在 /root/.nanobot(掛載為持久卷)。
建議使用 Zeabur 的備份功能定期備份您的資料。
更多說明: 請參考官方文件。
Zeabur