Deployment
Production uses pm2 for process management. Config lives in ecosystem.config.cjs.
Commands
| Command | Purpose |
|---|---|
npm install | Install dependencies |
PRIVATE_KEY="0x..." node bot.js | Run locally |
node bot.js --close | Close any open position |
./scripts/push_rsync.sh | Deploy to remote server |
./scripts/remote_logs.sh | View remote logs |
Deploy
./scripts/push_rsync.shManage with pm2
Use the project’s ecosystem.config.cjs with pm2 on the remote host (start / restart /
status as you would any pm2 app).
View logs
./scripts/remote_logs.shEnsure PRIVATE_KEY is set in the remote environment (pm2 env / host secrets), not in a
committed file. Live leverage trading means a leaked key or misconfigured process can place
real orders.
Related
- Getting Started — local run
- Architecture — process shape and state files
- Configuration — constants and env
Last updated on