營運

VPS 部署

在隨時線上的伺服器上運行 Hermes,以實現持續自動化和閘道功能。

VPS 部署

這是什麼

在隨時線上的伺服器上運行 Hermes,以實現持續自動化和閘道功能。

白話解釋

想像一下在自家車道上經營檸檬水攤和租用一個有獨立租約的店面之間的區別:店面會自己保持燈亮,並按照自己的時間表接單,無論你當天是否親自出現。VPS 部署將 Hermes 放在其他地方租用的硬體上,因此無論你的筆記型電腦是否開機,排程和訊息頻道都會持續運行。

為什麼重要

Cron 任務持續觸發、閘道保持連線、排定的報告仍在早上 6 點執行——VPS 部署讓「隨時線上」真正實現,無論有人的筆記型電腦是否剛好開著。初學者導向的內容花最多時間在這裡,因為正確設定 VPS——模型、閘道、排程、備份、安全性——是一個比本機運行有意義得多的任務。它以本機部署更嚴格的資料控制權換取持續可用性,這也是成本控制、秘密處理和核准邊界在無人看管的部署中需要更多關注的原因。

How it works

Hermes ships a hermes gateway install command that registers the Hermes API server as a systemd service, configured to restart on failure and start on boot (cli/gateway.py). The gateway service exposes the API server on a configurable host and port, typically behind a reverse proxy for TLS termination. Cron jobs are managed through the same CLI or dashboard, and the scheduler runs as part of the gateway process, checking every 60 seconds for due jobs. Persistent storage — session state, memory, skill files — lives on the VPS filesystem, with optional S3-compatible backups for the state database. Gateway adapters connect to their respective platforms (Telegram, Slack, Discord, WhatsApp) through the running gateway process, maintaining persistent connections that survive brief network interruptions through automatic reconnection logic.