Files
crypto_monitor/manual_trading_hub/scripts/后台运行-Ubuntu.md
T
dekun 1282293e91 docs: unify Ubuntu root /opt PM2 deployment and refresh README
Add docs/ubuntu-server.md; remove Windows and alternate process managers from deployment guides; index strategy, key monitor, TP/SL, breakeven, and replay docs in root README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 11:48:54 +08:00

982 B

中控与子代理 · 后台常驻(Ubuntu)

唯一推荐方式:PM2。

请勿使用 screen、nohup、systemd 与 PM2 同时 启动同一端口上的 hub.py / agent.py


启动

cd /opt/crypto_monitor/manual_trading_hub
source .venv/bin/activate
pip install -r requirements.txt
cp -n .env.example .env   # 首次

pm2 start ecosystem.config.cjs
pm2 save
pm2 list

一条 ecosystem.config.cjs 会拉起 4 个子代理 + 1 个 hub


常用命令

pm2 logs manual-trading-hub
pm2 restart manual-trading-hub
pm2 restart all
bash scripts/verify_hub_deploy.sh

详细说明

文档 内容
../部署文档.md 端口、反代、故障排查
../../docs/ubuntu-server.md Python / Node / PM2 版本与四所启动顺序

历史 screen/systemd 示例已废弃,仅保留 PM2 运维。