This site contains affiliate links. If you purchase through them I may earn a commission at no extra cost to you. Full disclosure.

OpenClaw Update Checklist Before You Restart — Keep Deployments Boring

The short answer: Yes, you should follow a short checklist before restarting OpenClaw after an update. Skipping it is a leading cause of avoidable downtime and configuration drift. This guide gives you the exact steps to run, commands to execute, and pitfalls to avoid.

"Updating OpenClaw is routine, but skipping pre-restart verification turns routine into firefighting. A consistent checklist makes deployments boring."

Why updates need a checklist

OpenClaw updates can change:

If you simply git pull and restart, you might encounter:

A short pre-restart checklist catches these issues before they affect your running automations.

Pre-update checklist

  1. Back up ~/.openclaw
    This is your single source of truth for agents, credentials, and config. Create a compressed snapshot:
    tar -czf ~/backups/openclaw-$(date +%F).tar.gz -C ~/.openclaw .
    Verify the file exists and is not zero bytes.
  2. Check current status
    Make sure the running instance is healthy before changing anything:
    pm2 status openclaw
    curl -f https://localhost:3000/health || echo "Health check fails"
    Note any warnings in the logs that might need investigation later.
  3. Read the release notes
    If updating to a new major version, check the changelog for breaking changes. Look for:
  4. Pull the update in a maintenance window
    cd ~/openclaw
    git fetch --tags
    git checkout vX.Y.Z  # or git pull if tracking main
    npm ci --only=production
    If npm ci fails due to engine mismatches, resolve before proceeding.
  5. Diff configuration
    Compare your ~/.openclaw/config.json with any new example config (often in repo as config.example.json). Add missing fields, but keep your secrets intact.
    diff -u ~/.openclaw/config.json openclaw/config.example.json || true
  6. Validate environment variables
    Ensure all required env vars are set. You can check by running:
    node -e "require('./src/config')" 2>&1 | grep -i missing
    Or simply start OpenClaw in the foreground to catch missing env errors:
    npm start 2>&1 | head -100
  7. Smoke test locally
    Start OpenClaw on a non-standard port temporarily to avoid disrupting the live service:
    PORT=3001 npm start &
    Then test:
    curl -f http://localhost:3001/health
    curl -f http://localhost:3001/api/status
    If the health endpoint returns 200, you're likely good.
  8. Test critical agents
    Trigger a dry-run of your most important agents (if supported) or check their last run status from the previous version. Don't let a broken agent silently stop your crucial automations.

Restart procedure

Once the checklist is complete:

# If the old instance is still running under pm2
pm2 restart openclaw
pm2 save
# Verify it's up
pm2 status openclaw
sleep 2
curl -f https://your-domain/health

Watch the logs for a minute:

pm2 logs openclaw --lines 50

Post-update verification

Rollback plan

If something goes wrong:

  1. Immediately revert to the previous version:
    cd ~/openclaw
    git checkout previous-tag-or-commit
  2. Restore ~/.openclaw from the backup you made:
    tar -xzf ~/backups/openclaw-YYYY-MM-DD.tar.gz -C ~/.openclaw --overwrite
  3. Reinstall dependencies and restart:
    npm ci --only=production
    pm2 restart openclaw
  4. Verify health again.

Practice this rollback at least once on a test VPS so you're confident when it counts.

Common pitfalls

Skipping the backup

Never update without a recent backup of ~/.openclaw. Even if the update itself fails, a misconfigured agent could delete or modify data. Backups are cheap insurance.

Ignoring npm ci vs npm install

Use npm ci, not npm install. npm ci strictly follows package-lock.json and ensures reproducible installs. npm install may update dependency ranges and introduce drift.

Environment variable drift

If you store env vars in multiple places (systemd service file, .env, shell profile), it's easy to miss one. Consolidate to a single .env file sourced by the pm2 startup script.

Not testing on a staging VPS first

For production-critical deployments, clone your VPS (or use a separate Hostinger VPS) and run the update there first. It catches environment-specific issues before they affect live operations.

Remember: The goal is to make deployments so boring that they become uneventful. A checklist is the simplest way to get there.

Need a reliable VPS to test updates safely? Hostinger's KVM VPS lets you spin up a staging instance in minutes. Test updates there before production, and keep your main deployment running smoothly.

Related reads

Frequently asked questions

Why do I need a pre-restart checklist for OpenClaw?
Because updates can introduce config changes, dependency mismatches, or agent code that fails silently. A short checklist catches these before you restart, avoiding downtime and firefighting.
What's the most important step before restarting OpenClaw?
Back up your ~/.openclaw directory. That's where agent definitions, credentials, and configuration live. If the update breaks something, you can restore quickly.
Do I need to run npm ci again after a git pull?
Yes. Always run npm ci --only=production after pulling new code to ensure dependencies match package-lock.json. Skipping this leads to missing modules or version mismatches.
How can I test agents without affecting production?
Use pm2 start npm --name openclaw-test -- start -- --test or set up a staging environment on a separate VPS. Test critical agents with sample data before switching over.
When should I restart OpenClaw after an update?
After you've verified: backup exists, npm ci succeeded, config files are consistent, env variables are present, and a smoke test of the web UI passes. Then pm2 restart openclaw and monitor logs.
What if an agent fails after the restart?
Check logs: pm2 logs openclaw. Common causes: missing API keys, changed config schema, or network changes. If needed, restore the backup and revert the git commit. Keep the previous version available.