自托管
三块可以分开部署:App 是客户端;Hub 建议跑在有 Agent CLI 的裸机 / VM;Channel 用 Docker,前面加 TLS。
Self-hosting
Three pieces, three homes: the app is a client; Hub belongs on a machine that already has agent CLIs; Channel is Docker behind TLS.
Agent Hub
编码引擎依赖本机登录态,容器里复刻全家桶成本高。生产默认:裸机 + systemd。
Engine CLIs need host login state. Recreating that inside a container is painful. Production default: bare metal + systemd.
npm install -g shepaw-agent-hub sudo cp deploy/systemd/*.service /etc/systemd/system/ sudo systemctl enable --now shepaw-hub-web
备份 ~/.config/shepaw-hub/(identity、peers、sessions)。Dashboard 不要裸奔公网。
Back up ~/.config/shepaw-hub/ (identity, peers, sessions). Do not put the dashboard on the public internet bare.
Channel
cp .env.example .env # PORT, BASE_URL, DATABASE_URL=postgres://..., REDIS_ADDR # 不要设置 DEV_SKIP_AUTH=1 docker compose up -d curl -fsS https://channel.example.com/health
- TLS 终止:Caddy / Nginx / Cloudflare;
BASE_URL用 https - 生产用 Postgres + Redis,不要多副本共用一个 SQLite 文件
- 配置
ALLOWED_ORIGINS/ALLOWED_DOMAINS - 给
/proxy与/tunnel/connect做反向代理限流
- Terminate TLS at Caddy / Nginx / Cloudflare;
BASE_URLmust be https - Postgres + Redis in production — do not share one SQLite file across replicas
- Set
ALLOWED_ORIGINS/ALLOWED_DOMAINS - Rate-limit
/proxyand/tunnel/connectat the reverse proxy
本站(官网)
This website
纯静态文件,丢到任何静态托管即可:
Static files. Drop them on any static host:
python3 -m http.server 4173 # 或 npx serve -p 4173