EdgeClaw Operations Runbook

Server: 64.181.198.130 | User: ubuntu | Domain: edge-assist.duckdns.org


Checking If Everything Is Running

See all running services:

systemctl --user list-units --type=service --state=running

You should see 12 services (ignore dbus). If something is missing, it crashed — restart it.

Health check (EdgeClaw itself):

curl -s http://localhost:8080/health | python3 -m json.tool

If this fails, EdgeClaw is down. Restart it (see below).

Dashboard: https://edge-assist.duckdns.org/data-status


All 13 Services

Service What It Does
edgeclaw Main system (port 8080) — everything depends on this
claude-bridge @Claude2107Bot on Telegram
claude-techsupport @EdgeTechSupportBot on Telegram
claude-analyst Claude Analyst on Telegram
claude-wiped CC Wiped Analyst on Telegram
claude-opusgod Opus God on Telegram
discord-edge Edge Bot on Discord
discord-analyst CC Analyst on Discord
discord-techsupport Claude Tech Support on Discord
ta-models TA Foundation Models (runs alongside EdgeClaw)
openclaw-gateway OpenClaw Gateway
login-alert Sends alert when someone SSHs into the server
dbus System thing, ignore it

Restarting Things

Restart one service:

systemctl --user restart <service-name>

Example: systemctl --user restart claude-bridge

Restart EdgeClaw only:

systemctl --user restart edgeclaw

WARNING: This resets all internal scheduled jobs (scrapers, edge scanner, etc.). They have a recovery system that re-runs missed jobs 30 seconds after startup, BUT if EdgeClaw restarts several times in a row (like during the 5-7 AM window), the recovery may not catch everything. The 8 AM props scraper has been missed before because of this.

Restart all Telegram and Discord bots:

for s in claude-bridge claude-techsupport claude-analyst claude-wiped claude-opusgod discord-edge discord-analyst discord-techsupport; do systemctl --user restart $s; done

Restart everything (nuclear option):

systemctl --user restart edgeclaw ta-models openclaw-gateway
for s in claude-bridge claude-techsupport claude-analyst claude-wiped claude-opusgod discord-edge discord-analyst discord-techsupport; do systemctl --user restart $s; done

Checking Logs

EdgeClaw logs (last 50 lines):

journalctl --user -u edgeclaw --no-pager -n 50

Any bot's logs:

journalctl --user -u claude-bridge --no-pager -n 50

Replace claude-bridge with whatever service you want.

Settlement logs: data/logs/settlement-cron.log Pinnacle accuracy logs: logs/pinnacle-accuracy.log

To read a log file, ask Claude Code: "show me the last 30 lines of settlement-cron.log"


System Crontab (runs on its own, not inside EdgeClaw)

These survive EdgeClaw restarts. They run no matter what.

When What
Every 12 min DuckDNS domain refresh (keeps the domain pointing here)
4 AM Session reset
5 AM Backup to Vultr
Every 4 hours Heartbeat check
7:30 AM Pinnacle accuracy check
Every hour (:17) Auto-push code to GitHub
Every hour (:00) Clean up temporary browser files
8 AM, 2 PM, 8 PM Settlement runs
7 AM NBA settlement

All times are ET.


EdgeClaw Internal Scheduled Jobs

These run INSIDE EdgeClaw and restart when EdgeClaw restarts. They include scrapers, edge scanner runs, and other data collection. See the warning above about missed runs after restarts.

Settlement was moved OUT of EdgeClaw's internal scheduler to the system crontab (above) specifically to avoid the missed-run problem.


Settlement Operations

Automatic schedule:

Run settlements manually: Ask Claude Code "run settlements manually"

Check what hasn't settled yet: Ask Claude Code: "show me unsettled props" or "query player_prop_edges where actual_outcome is null"


Edge Scanner

Automatic: Runs at 8 AM, 10 AM, 2 PM, 6 PM, plus closing times (all inside EdgeClaw).

Manual trigger: Ask Claude Code "run the edge scanner"

View results: Dashboard at /data-status/view/edge-scanner-nba (and similar paths for other sports)


Scraper Troubleshooting

  1. Check the dashboard — red or yellow means something is stale
  2. Check EdgeClaw logs for errors
  3. Most common fix: restart EdgeClaw (systemctl --user restart edgeclaw)
  4. If one specific scraper keeps failing, the source website probably changed its layout. Ask Claude Code to look at the scraper code and the error.

Data Cleanup

All data lives in SQLite databases inside data/db/. Never edit these files directly.

Always look before you delete. Ask Claude Code:

Common examples:


Databases

All in /home/ubuntu/edgeclaw/data/db/:

Database What's in it
research-pipeline.db Odds, props, edges, game logs, data freshness
edge-scanner.db Edge detection results
weather-monitor.db Weather data and forecasts
audit.db API cost tracking (how much each AI call costs)
health.db Server health metrics over time
tasks.db Task queue and reminders
memory-tiered.db AI memory system

Rollback (Undoing Changes)

See recent code changes:

git log --oneline -10

Undo a specific change:

git revert <commit-hash>

Or just ask Claude Code:


Quick Reference

What you want What to tell Claude Code
Is everything running? "check all services"
Something feels broken "check EdgeClaw health and logs"
Bot not responding "restart claude-bridge" (or whichever bot)
Data looks stale "check the dashboard freshness"
Run settlements now "run settlements manually"
Check API spending "query the audit table for costs this week"
See unsettled bets "show unsettled props"
Delete bad data "show me rows from X where Y" then "delete those"
Undo a code change "undo the last commit"
Restart everything "restart all services"
Check disk space "how much disk space is left"
Check what crons ran "show me the cron logs"
Source: ~/edgeclaw/RUNBOOK.md