DEV Community

Marcus
Marcus

Posted on

How I Keep My AI Agent Running 24/7 Without Leaving My Laptop On

Running an AI agent locally is great to start. But the moment you close your laptop, it goes offline. No more scheduled checks. No more proactive alerts. Just silence.

The fix is simple: move it to a VPS. Here's the quick version of how I did it.

The problem with local hosting

OpenClaw (my AI assistant of choice) runs as a Node.js process. That means:

  • It dies when my laptop sleeps
  • My home Wi-Fi drops occasionally
  • Battery wears faster running it 24/7

The solution: a managed VPS

I moved OpenClaw to Ampere.sh — ARM-based managed VPS hosting built for AI agents. Under $10/month.

The setup takes about an hour:

# On your VPS
npm install -g openclaw
# Copy your workspace files over
scp -r ~/openclaw-workspace user@your-vps:/home/user/
# Run with pm2
npm install -g pm2
pm2 start openclaw --name agent
pm2 save && pm2 startup
Enter fullscreen mode Exit fullscreen mode

That's it. Agent runs 24/7, restarts automatically on reboot, and you never have to think about it again.

What changes

Heartbeat checks actually run on schedule. Proactive alerts arrive when they should. You close your laptop and nothing stops.

I wrote a full guide on this over at ReRealize: The Best Way to Run OpenClaw 24/7

If you're running any kind of always-on AI agent, getting it off your laptop is the single most impactful change you can make.

Top comments (0)