Run Claude Code and Codex on a Remote Server
Install Happy Agent on a server, a VPS, or a Mac mini, and it runs Claude Code and Codex work there itself: one agent harness for Claude, Codex, Grok, Gemini, and more, on the subscriptions you already pay for. It keeps working while your laptop sleeps, and you control it from Happy Desktop or from your phone with Happy's Claude Code mobile app, alone or with your team.
A harness, not a remote control
- A remote control forwards a session that runs in the vendor's own CLI on your computer. Claude Code Remote Control works this way, and so does the original Happy CLI. The session lasts as long as that process and that computer.
- Happy Agent is the harness. It runs the agent loop itself, with its own tools, sandbox, and review, and calls the models directly. Put it on a server and the sessions keep going while your laptop sleeps; Desktop and the phone are windows onto them.
It reuses the subscriptions you already pay for:
-
Claude goes through Anthropic's own Claude Agent SDK, which you can use with your Claude plan. Anthropic announced a change that would have moved SDK usage onto a separate credit, then paused it. From its help center, Use the Claude Agent SDK with your Claude plan:
Update June 15, 2026: We’ve paused the previously-announced changes to Claude Agent SDK usage. For now, nothing has changed: Claude Agent SDK,
claude -p, and third-party app usage still draw from your subscription limits.Its October 7 update adds: "You can still use the Claude Agent SDK,
claude -p, and third-party apps with your subscription limits." -
Codex uses the ChatGPT sign-in from your Codex CLI. "Codex is included across ChatGPT plans," says OpenAI's help center, and OpenAI invites open-source apps to build on those plans: "your open-source app can request permission to use the user’s ChatGPT plan" (Sign in with ChatGPT).
Where Happy came from
We started Happy as the Happy CLI, happy on npm. It runs Claude Code, Codex, and other ACP-compatible agents in your terminal, unchanged, and lets you control them from the Happy app. It is still the way to keep the exact original CLIs and the terminal on your own machine, and its legacy docs are still here, in maintenance mode. Happy Agent and Happy Desktop are the current iteration, where Happy runs the harness itself, on your computer or a server.
Alternatives to a Happy Agent server
A coding agent runs on the machine where you start it. To keep one working, keep that machine awake and online, or run the agent somewhere that stays on:
| tmux + SSH or Mosh + Tailscale + Termius | Claude Code Remote Control | A VM with its own agent (exe.dev and Shelley) | T3 Code | Happy Agent on a server | |
|---|---|---|---|---|---|
| Agents | Any terminal agent | Claude Code | Shelley; Claude Code, Codex, and Pi preinstalled | Claude Code, Codex, Cursor, Grok Build, OpenCode, Pi, Muse Code, and any ACP Registry agent, on your existing subscriptions | Claude, Codex, and Grok models in one harness, reusing your subscriptions; Gemini and any ACP agent (beta) |
| Runs on | Your server | Your computer, or a server inside tmux | An exe.dev VM | Your computer, or a Linux or Apple silicon server it launches over SSH | Your server, VPS, or Mac |
| While your laptop sleeps | Keeps running | On a laptop, pauses until it wakes; on a server, keeps running | Keeps running | On a laptop, stops; on a server with t3 service install, keeps running, and a Mac host must stay logged in and awake | Keeps running |
| Steer it from | A terminal app on any device, over SSH or Mosh | The Claude app, claude.ai/code, or Claude Desktop | Shelley's web page; SSH or the browser terminal for the other agents | T3 Code desktop, the web app, and the iOS and Android app; outside agents over MCP | Happy Desktop and the Happy phone app |
| Approvals | Terminal prompts, typed by hand | Permission prompts in the app, with push notifications | Depends on the agent; the VM is the boundary | Supervised, Auto-accept edits, Auto (the provider's own review), or Full access, the default; push notifications through T3 Connect; no sandbox of its own | Auto mode reviews actions itself, inside the OS sandbox |
| With a team | Shell accounts on the server | One person's sessions; organization controls on Team and Enterprise | Share the VM with Web or Root access, per person or with the whole team | No team mode in its docs; one owner pairs devices and agents with scoped links, such as read-only | Team mode: each member signs in as themselves, in shared projects and sessions |
| In between | Tailscale's coordination and relays; traffic WireGuard-encrypted | Anthropic stores the transcript while connected | exe.dev runs the VM and its HTTPS proxy | T3 Connect, with Clerk sign-in and a Cloudflare Tunnel per machine; without it, direct LAN, Tailscale, or SSH | Tailcat relay for Desktop, WireGuard-encrypted; Happy's relay for the phone, end-to-end encrypted |
| Setup | Install and connect four tools | One command | Create a VM | One install command or the desktop app, then t3 connect to reach it from elsewhere | Ask the Chief of Staff; it follows a public recipe |
Where each is better:
- tmux + SSH or Mosh. Works with every terminal agent and tool, with nothing new to trust. Mosh survives sleep and network changes, and Termius speaks it on iOS and Android.
- Remote Control. Nothing to install if you already use Claude Code and the Claude app, Anthropic supports it, and permission prompts reach your phone as push notifications. Team and Enterprise get admin controls. See Happy vs Remote Control.
- exe.dev. A persistent VM with agents already installed, Shelley, a web agent that works on mobile, and VM sharing that follows team membership. No service to set up. You can also run Happy Agent on it, below.
- T3 Code. Works with more agents: seven built in, plus the ACP Registry. It has a polished free phone app with push notifications and Live Activities, routes work across several machines, launches servers over SSH from its desktop app, and has a much larger community (26.8k GitHub stars; T3 says over 400,000 developers use it).
- Happy Agent. One runtime for three model families under one sandbox and review, a desktop app and a phone app built for agent sessions, and a team mode where everyone keeps their own identity. The cost: more setup than the others, and you run and upgrade the server.
Share it with your team
The same server can serve a team. In team mode:
- Each member signs in with their own Happy Social account from their own Happy Desktop, through WorkOS or your own identity provider, and pairs their own phone.
- Everyone works in the server's shared projects and sessions. Whenever the speaker changes, the agent is told who it is; drafts and each person's task order stay their own.
- The same sandbox and review rules apply to everyone: commands run inside the OS sandbox unless a session is switched to Full access, and in Auto each action that would cross it is reviewed first.
- The server stops accepting its API token. Only Happy Social sign-ins issued for this team get in.
Before you do: all work spends the server's Claude, Codex, and Grok accounts, not each member's, and any member can choose Full access. There are no per-session invites, and we haven't built a remove-member action yet.
To set it up, ask the Chief of Staff, "Create a team called Acme on my server". Multiplayer & Teams has the details.
How Desktop connects to the server
Desktop reaches the server through Tailcat, an encrypted tunnel built into every release. Tailcat is Tailscale's open source data plane without its control plane: no account, no open port, no public IP. SSH is used only to install.
- The address is the server's key. A
tc…address encodes the server's WireGuard public key, its relay region, and a WireGuard pre-shared key. The private key stays on the server in~/.happy/agent/tailcat/default.private.json, so only that machine can answer at that address. - WireGuard, end to end. Your machine makes a throwaway key each time it opens the tunnel and runs the standard WireGuard handshake with the server. Everything after that is encrypted between the two machines, and decrypted only on the server, where Tailcat hands it to Happy Agent.
- Relays carry ciphertext. Both sides meet first at a DERP relay that Tailscale runs for free, rate-limited and without an uptime promise. They then try a direct path through NAT, and the relay keeps carrying traffic if that fails. A relay sees IP addresses, timing, sizes, and the public keys it routes by. It cannot read or change the content.
- The address is a secret, and not the lock. Without the pre-shared key, which only the address carries, nobody can open a tunnel, a relay operator included; keep the address private. Anyone who has it can, since Happy does not use Tailcat's client allowlist, and every request inside still needs the server's API token or a team sign-in. An address made by an older Happy Agent, which bundled Tailcat v0.4.0, has no pre-shared key and keeps working; for it, the server's public key and region are enough to reach the sign-in check. Details: No Open Ports.
Your phone does not use Tailcat. It goes through Happy's own relay: the server publishes its sessions to your Happy account, end-to-end encrypted, so the phone can read them even while the server is offline. A newly published session brings at most its latest 50 messages, without tool output or the model's reasoning.
What the Chief of Staff asks you during deployment
You need a Linux machine you can SSH into (providers). The Chief of Staff runs the deployment end to end and stops only for what is yours to decide:
- SSH: the account to use and the host key.
- Provider accounts: which ones the server may use. A copied credential gives that machine your account and its limits, so it prefers a fresh sign-in on the server where it can.
- Sign-ins: browser or device codes for Claude, Codex, Grok, or
gh, and any macOS Keychain prompt. - Exposure: turning on Tailcat on the server.
- Ubuntu 24.04: an AppArmor allowance for the Happy Agent binary, so the sandbox can start.
- Git identity: it proposes your name and email; say if the server should use different ones.
It copies your profile name and email, installs the service, registers the connection, runs a test task in a throwaway project, restarts the service, and checks again. An existing installation is inspected and kept, not replaced. The handoff lists what passed and anything still waiting on you.
Later: "Upgrade Happy Agent on Build box."
The deployment recipes
The Chief of Staff follows public recipes from the Happy Agent repository. Read them to see exactly what it will do on your server:
- Deploy a standalone remote agent: a personal server, with its service account, provider sign-ins, service, connection to your Desktop, and Git.
- Create and deploy a Happy team: the same server in team mode.
- Upgrade Happy Agent: drain, back up, replace, and verify, keeping your settings.
- Set up or repair Mobile Access: pairing your phone.
- All recipes
Providers
Any Linux machine with systemd that you can SSH into with sudo works, and Tailcat needs no inbound port. We have not tested every one; follow their own docs to create the machine.
Hetzner
A Cloud server with Ubuntu 24.04 or Debian; the Arm (CAX) types work too. With a Hetzner firewall, allow inbound SSH and add no outbound rules; with none, all outbound traffic is allowed. Creating a server.
DigitalOcean
A Droplet with Ubuntu 24.04 LTS. A Cloud Firewall needs only inbound SSH. Create a Droplet.
AWS EC2 and Lightsail
Ubuntu 24.04 LTS; the login user is ubuntu. Graviton (Arm) instances work too. The security group needs only inbound SSH. For Bedrock on EC2, attach a least-privilege instance role, so there is no key to copy. EC2, Lightsail.
Google Cloud
A Compute Engine VM with Ubuntu 24.04 LTS or Debian. Arm machine types work too. No firewall rule is needed for Tailcat. Create a Linux VM.
exe.dev
Persistent VMs, created with ssh exe.dev new, with sudo. Claude Code and Codex come preinstalled, but Happy Agent runs as its own service account, so it signs in to providers separately from your login user. Use SSH with your own key; the exe.dev API token cannot SSH and is not a Happy credential. exe.dev's own agent, Shelley, keeps running; Happy Agent is a separate service beside it. exe.dev docs.
A Mac mini or old laptop at home
A laptop running Linux works like any server. Keep it plugged in and the lid open; a closed lid usually sleeps the machine.
A Mac works too, on Apple silicon or Intel. Happy Agent uses macOS's own sandbox, and runs as a launchd service; we don't ship one, so the Chief of Staff writes it. Keep the Mac from sleeping.
Raspberry Pi and other ARM boards
A 64-bit OS is required: uname -m must print aarch64. A 32-bit OS (armv7l) is not supported.
What we haven't built yet
Remotes connect over Tailcat only. Desktop has no "add remote" button yet; register one with the Chief of Staff or happy.toml.