---
title: "Agents shouldn't live on your laptop anymore"
description: "Build a remote home for coding agents with an always-on VPS, Tailscale, Herdr, Pi, and Moshi, then control the same sessions from any device."
author: "olaf"
author_name: "Olaf Sulich"
tags: ["agents","pi","infrastructure"]
published_at: "2026-10-19T00:00:00.000Z"
canonical: "https://mega.dev/remote-agent-setup"
---

A local environment isn't enough for agents anymore. Laptop compute isn't the only limit. Security and working across devices matter too.

OpenAI, xAI, and Anthropic are pushing their cloud offerings harder. The most effective teams are moving, or have already moved, fully onto remote setups.

Peter Steinberger, creator of OpenClaw, [notes](https://x.com/steipete/status/2094290652649636173) that "Local harnesses feel like relics of the past now." Lauren ([@poteto](https://x.com/poteto)), an engineer working on Grok Bot at xAI, [ships 2,000 pull requests a month](https://x.com/poteto/status/2094457600259842065). Vercel [closed](https://nextjs.org/blog/how-we-closed-1500-github-issues) almost 1,500 GitHub issues with its Vercel Sandbox infrastructure.

Today, with a few solid tools, we'll walk through setting up a remote agent host. That lets us work effectively across many projects, from multiple devices at once, while keeping control over access and security.

It's time to move agents to the cloud.

## A machine that stays online

Keep the runtime off the device you use to steer it. Turning off or switching that device shouldn't stop the work.

With remote agent assistants (e.g. Hermes or OpenClaw), people often talk about buying a dedicated Mac Mini and running the agent on it. That's one way. In that case the main cost is the hardware itself, plus electricity and upkeep (security, backups, etc.).

We don't have to drop hundreds or thousands of dollars on hardware right away. A cheap VPS is enough. The days of the "$5 VPS" are slowly fading, but you can still get a cheap one.

Services like [DigitalOcean](https://digitalocean.com/) or [Hetzner](https://www.hetzner.com/) offer affordable, reliable VPSes you can run your setup on. Don't start with a beast that has hundreds of GB of RAM. You probably don't need that much power at the start. Talk through your needs with your agent, compare providers, and pick a plan that fits. For a lot of use cases, a machine with 4 or 8 GB of RAM is enough. If it's too small, you can always resize later.

<Plate src="remote-host-options" alt="A five-row decision table compares a rented VPS with an owned always-on machine. A VPS has low startup cost, recurring rent, provider and region failure risk, quick resizing, and no physical access. Owned hardware has high startup cost, power and network costs, home-infrastructure failure risk, hardware-bound upgrades, and full physical control." fig="FIG.01" width="wide" />

An always-on host survives a client disconnect or a sleeping laptop. It doesn't make processes immune to host reboots, crashes, or provider outages, so backups and a recovery path still matter.

## Private access with Tailscale

Since we want the setup reachable from several devices, we care about a secure and private connection. That's what [Tailscale](https://tailscale.com/kb/1151/what-is-tailscale) is for.

Tailscale gives you a private tailnet for your devices. Your laptop, phone, and VPS can talk securely as if they were on the same LAN, even when they sit on completely different networks.

Under the hood, Tailscale creates an encrypted, peer-to-peer mesh. It handles the awkward work of finding a path between devices across different networks. Most of the time they connect directly, without port forwarding or one central VPN server carrying every packet.

Each device gets a stable Tailscale IP. [MagicDNS](https://tailscale.com/docs/features/magicdns) can give it a readable name too. That means the VPS stays at the same address while your laptop moves between home Wi-Fi, hotel Wi-Fi, or a phone hotspot.

<Plate src="tailscale-stable-identity" alt="Three horizontal cards explain Tailscale: laptops and phones move between physical networks, each device keeps a stable Tailscale IP and optional MagicDNS name, and Tailscale connects available peers directly when possible." fig="FIG.02" width="wide" />

## Pi sessions with Herdr

[Herdr](https://herdr.dev/docs/concepts/) is a terminal workspace manager, similar to a terminal multiplexer: a tool for running many panes in one terminal window. Unlike proven options like tmux, it can do a lot more.

Herdr is organized around workspaces. One workspace usually maps to one project. Each has tabs where you run agent sessions. Herdr automatically detects sessions and shows them in the agents tab. From there you can track agents across all sessions and all workspaces.

<Plate src="herdr-pi-workspaces" alt="Two wide panels explain Herdr. One workspace holds agents, runtime, and tests. The Herdr server holds workspaces for the main app, docs, infra, and design so you can switch between projects." fig="FIG.03" width="wide" />

That's where Herdr starts to pay off. It tracks agent status and tells you when an agent finishes, or is waiting for input or approval. That lets you run many agents at once, across many projects, without losing track.

Herdr ships a [skill](https://github.com/herdrdev/herdr/blob/v0.9.0/skills/herdr/SKILL.md) that lets you drive the whole tool from an agent. You can create and manage workspaces, sessions, and tabs. With the skill you can even read and send messages to an agent living in another session.

[Pi](https://pi.dev/docs/latest/sdk) lets you dynamically spawn agents that act as workers steered by one main orchestrator agent. Together with Herdr, Pi can dynamically create and manage tabs and talk between agents. That shines especially when you've built a custom system like [limen](https://github.com/overment/limen).

For a remote setup, [session persistence](https://herdr.dev/docs/persistence-remote/) and VPS integrations matter most. Herdr doesn't kill sessions when you detach or close the client. Work keeps going in the background, and you come back to it still running. Native VPS support works well too. You can run Herdr on your own machine the classic way. More interestingly, it also lets you [add more machines](https://herdr.dev/docs/connecting-machines/) from your local gear, so you can switch quickly between local work and the VPS.

<Plate src="herdr-local-and-vps" alt="Two specimen cards compare local Herdr with a VPS. Locally, herdr opens a server on this laptop and panes stop when the laptop sleeps. On the VPS, herdr machine add puts the remote server in the same sidebar and Pi keeps running after you detach." fig="FIG.04" width="wide" />

## Moshi: agents in your pocket

What if you had all of that within reach, on your phone? [Moshi](https://getmoshi.app/docs/introduction), a mobile terminal app, solves that. It can connect over SSH or [Mosh](https://mosh.org/), a transport designed to survive intermittent connections and network changes.

Running a terminal on your phone sounds awful. Who would want to work that way? Moshi shows it works, and does it really well. You don't just get a terminal view. You get shortcuts, dictation, gestures, notifications, an inbox, live activities, photo attachments, file browsing, and diffs. The makers put real work into turning what should be a UX nightmare into something pleasant.

<Image src="art/drops/remote-agent-setup/images/moshi-iphone-demo" w="1800" h="2400" alt="A hand holds an iPhone running Moshi. The screen shows a Pi terminal session in the limen project, with mobile controls for Ctrl, Esc, Tab, gestures, undo, clipboard, chat, and the keyboard." caption="A Pi session running in Moshi on an iPhone, connected over Mosh." fig="FIG.05" width="inline" />

You don't rebuild your agent setup from scratch. You just connect to the same VPS. Setup is almost trivial, because the phone reaches the VPS through Tailscale, where Herdr is already running. Same workspaces, same tabs, same Pi sessions. Close the laptop, and with Moshi you're right back where you left off.

With [`moshi-hook`](https://getmoshi.app/docs/hooks), supported agents including Pi can send approval requests, questions, completions, and status updates to Moshi. Instead of keeping the terminal open and checking it, you get one evolving inbox item for the session. When Pi is waiting, you can approve or answer from the phone and let the same session continue.

<Plate src="moshi-attention-loop" alt="A four-step loop shows Pi working on the VPS, moshi-hook updating the session in Moshi, the phone surfacing a question or approval, and the answer returning to the same Pi session so work can continue." fig="FIG.06" width="wide" />

## How the stack fits together

This setup lets you work remotely with agents effectively. The whole thing is fully configurable and stays flexible.

You size the VPS for yourself. Start smaller, resize when you need more. Tailscale keeps the laptop, phone, and VPS connected across changing networks, with stable addresses you can keep using.

Herdr runs many agents at once, across workspaces and projects, with status tracking and the ability to return to a durable session. Pi adds customization: from plain sessions to spawning workers and orchestrating between agents.

<Plate src="complete-remote-agent-stack" alt="A laptop and phone use Herdr or Moshi to reach one VPS through Tailscale. The VPS contains the repositories and credentials, Herdr preserves the terminal panes, and Pi runs inside them." fig="FIG.07" width="wide" />

This setup might not fully replace your local environment at first. It's still a good step toward [autonomous product development](https://mega.dev/autonomous-product-development).
