MyClawTrade

Ops errors

systemd and journalctl for a Python trading bot

If you only start the bot in an SSH window, it dies when you disconnect. systemd is the boring process manager. journalctl is how you see why it died.

This is operations, not a strategy. A healthy service only means the process is up. It does not mean the bot should be live.

Minimum unit

[Unit]
Description=OpenClaw trading bot
After=network-online.target
Wants=network-online.target

[Service]
User=YOURUSER
WorkingDirectory=/home/YOURUSER/bots/openclaw
ExecStart=/home/YOURUSER/bots/openclaw/.venv/bin/python main.py
Restart=on-failure
RestartSec=10
EnvironmentFile=/home/YOURUSER/bots/openclaw/.env

[Install]
WantedBy=multi-user.target

Install and start

sudo cp openclaw.service /etc/systemd/system/openclaw.service
sudo systemctl daemon-reload
sudo systemctl enable --now openclaw
systemctl status openclaw --no-pager

Read the logs

journalctl -u openclaw -e
journalctl -u openclaw -f
journalctl -u openclaw --since "10 min ago"

-e jumps to the end. -f follows like tail. If status says activating (auto-restart) you are in a crash loop — read the last 30 lines before you restart again.

Common failures

What the log usually means

Do not set Restart=always and walk away on a live key. A crash loop can hammer the exchange. Fix the log first. Keep DRY_RUN=true until the unit stays active for a full scan interval.

Get the full walkthrough

The paid guide includes the source, config template, and deploy script. 50% off: $19.99 (was $39.99). One-time.

Get the ebook — $19.99

Educational product. Trading can lose money. Not financial advice.

Keep reading

How to run an OpenClaw trading bot on a $5 VPSDIY setup Deploy script walkthroughProduct-led DRY_RUN and the paper-trade checklistTrust