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.

Two ways to work from another device. A remote control, such as Claude Remote Control or the original Happy CLI: the phone reaches a relay, which reaches claude running in a terminal on your laptop, so it works only while your computer stays on. Happy Agent runs the harness: Desktop and the phone reach Happy Agent on your server, which has its own loop, tools, sandbox, and review, and runs Claude through the Claude Agent SDK, Codex, and Grok on the subscriptions you have. It keeps working while your laptop sleeps.

How a Happy Agent server compares with tmux and SSH, Claude Code Remote Control, exe.dev, and T3 Code, and why Happy runs the harness itself: Keep a coding agent running.

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". Team Server covers the setup and the limits; Multiplayer shows what working together looks like.

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:

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.