Run Claude Code or Codex on a home server
Checked 16 November 2026
A home server is the simplest way to keep a coding agent working while your laptop sleeps, without sending your code to someone else's cloud. You need three things: a Linux machine or VM that stays on, a way to sign the agent in without a browser, and a way to reach it from your phone. The options differ mostly in the third.
This page is published by Bivy, which is one of the options. Each claim below comes from the product's own docs, site or GitHub README, linked under Sources. Products change often, so check the linked page before you rely on a detail. If you don't have a server yet, see Keep Claude Code or Codex running after you close your laptop for the other ways.
| Option | Agents | What runs on the server | Phone access | Push and approvals on the phone | Cost |
|---|---|---|---|---|---|
| tmux + SSH or mosh over Tailscale | Any terminal agent | The agent in a tmux session | Phone SSH or mosh app | No, unless you add hooks | Free: tmux, mosh, Tailscale Personal |
| Claude Code Remote Control | Claude Code | claude, kept running in tmux | Claude app, claude.ai/code | Yes | Pro, Max, Ultra, Team, Enterprise; API keys not supported |
| Codex with an SSH host | Codex | The codex CLI, started over SSH by the ChatGPT desktop app | ChatGPT app, through a Mac or Windows PC that stays awake | Yes | Needs Codex access in your ChatGPT workspace |
| Paseo | Claude Code, Codex, Copilot, OpenCode, Pi, Antigravity, Muse Code | The Paseo daemon, natively or in Docker | iOS and Android apps, web, desktop, CLI | Push when tasks complete | Free, Apache-2.0 |
| Bivy | 20 agents, including Claude Code, Codex, Pi, OpenCode, Grok and Kimi Code | The Bivy node as a systemd user service | Installable web app (PWA) | Yes: approve, answer, reply | Your own machines never count against a plan; self-host $0 |
Pick the machine
Any Linux machine that stays on and online will do. The agent works on the files, services and tools on that machine, so clone your repositories there and run the databases or containers the task needs there too.
- A plain Linux box: an old desktop, a mini PC or an arm64 board. Bivy's installer supports Linux on x64 and arm64.
- Proxmox VE: open source, and it combines the KVM hypervisor with Linux containers (LXC), managed from a web interface. A VM runs its own kernel. Proxmox describes LXC as a lighter alternative that shares the host's kernel, and recommends nesting containers inside a VM when you need maximum isolation.
- TrueNAS Community Edition: free and open source, with integrated container and VM support.
- Unraid: runs VMs with KVM, including Linux, next to Docker containers. Licenses start at $49 once, with a 30-day free trial.
- VM or container: an agent installs packages, runs builds and starts its own containers, so it is easier in a full Linux VM with its own disk than in a container meant for one app. Bivy's install docs describe a Linux machine with systemd. They don't cover LXC or Docker for the machine that runs agents, so use a VM for Bivy.
Sign the agents in without a browser
- Claude Code: run
claudeover SSH. If no browser opens, presscto copy the login URL and open it on another device. If the browser shows a code, paste it at thePaste code here if promptedprompt. On Linux the login is stored in~/.claude/.credentials.json.claude setup-tokenprints a one-year token forCLAUDE_CODE_OAUTH_TOKEN, meant for scripts, but Anthropic says that token can't start Remote Control sessions. - Codex:
codex login --device-authsigns in with a code you enter on another device. OpenAI marks it beta. An OpenAI API key also works, billed at standard API rates. - Copy a sign-in from another machine (Bivy):
bivy auth import claude codex grok --sync account --yeson the machine where you already signed in makes those logins available, end-to-end encrypted, to your other Bivy machines. It reads Claude's and Codex's credential files; logins kept only in an OS keychain aren't supported.
tmux + SSH or mosh, over Tailscale
The do-it-yourself option. It works with any terminal agent and adds no service in between.
- Keep it running: start
tmux new -s agent, run the agent inside, and detach. The tmux wiki says detached sessions and their programs keep running. Reattach withtmux attach -t agent. - Reach it: Tailscale puts your phone and the server on one private network, so you don't open ports, and Tailscale SSH can handle SSH authentication with your Tailscale identity. Its Personal plan is free for up to 6 users and unlimited devices, for non-commercial use. Mosh roams between networks and survives a flaky connection.
- Phone apps: Termius's free Starter plan includes SSH and SFTP. Blink Shell supports Mosh and SSH, at $19.99/year after a 2-week trial. Moshi is a phone terminal for coding agents with push alerts on its free tier.
- Trade-off: a terminal on a phone keyboard. No approval buttons or diff view, and no push unless you add a hook. See phone notifications for Claude Code and Codex.
Claude Code Remote Control on the server
The official Claude app, steering a Claude Code session that runs on your server. Run claude remote-control in the project, or /remote-control inside a session, and open the session in the Claude app or at claude.ai/code.
- Keep it running: the
claudeprocess has to keep running. Anthropic's docs suggest tmux on a remote machine, so the session survives when SSH disconnects. - From the phone: push notifications when Claude finishes or needs a decision, approvals, and photo and file attachments.
- Eligibility: Pro, Max, Ultra, Team and Enterprise plans, with a claude.ai sign-in. API keys and the long-lived
setup-tokendon't work. On Team and Enterprise an Owner must turn it on. - Trade-off: Claude Code only. Some commands, such as
/pluginand/resume, work only in the local terminal.
Codex with the server as an SSH host
The official ChatGPT app, with Codex working on your server. In the ChatGPT desktop app on a Mac or Windows PC, add the server from your ~/.ssh/config under Settings › Connections and choose a project folder. The app starts Codex on the server over SSH.
- Setup: install Codex on the server, sign it in, and make sure
codexis on the remote user'sPATH. - From the phone: start or continue chats, approve commands, review diffs and test results, and get notified when a task completes or needs you.
- Trade-off: OpenAI's docs say your phone still connects to the desktop app's host, which reaches the SSH host. So the Mac or PC running the ChatGPT desktop app has to stay awake and online as well. For a server you reach directly, use tmux, Paseo or Bivy.
Paseo
An open-source daemon with native apps, and the one option here with a documented Docker setup. A daemon on the server manages the agents, each in its own git worktree, and the desktop, iOS, Android, web and CLI clients connect to it.
- On a server: install the CLI and start the daemon, or run the daemon and its self-hosted web UI in Docker. In Docker you extend the base image with the agent CLIs you use and pass credentials through environment variables or the persistent volume.
- Connection: an optional end-to-end encrypted relay for pairing, or a direct connection over TCP, Tailscale or another VPN.
- Cost and license: free, Apache-2.0, and the README says it has no telemetry or forced log-ins.
Bivy
Runs Claude Code, Codex and other agents on your server, and lets you follow and steer them from a phone, browser or terminal. Bivy runs the real agent CLIs, each with its own login and configuration.
- Install:
curl -fsSL https://bivy.sh/install.sh | bashdownloads a release for Linux x64 or arm64, checks it against the release's checksums, and needs nosudo. On a server without a browser, use Connect a machine at app.bivy.sh instead: it gives you a single-use command that expires after 10 minutes and enrolls just that machine. - Keep it running:
bivy service installsets up a systemd user service. Runloginctl enable-linger $USERonce so it keeps running after you log out. - Reach it: through the hosted service, where the machine dials out and session traffic is end-to-end encrypted between the server and your paired devices. Or run
bivy tailscaleto serve the app from the server over your tailnet, with no Bivy account, control plane or relay; push notifications and app previews then need the hosted service or your own server. - From the phone: watch the session live, answer questions, approve tool calls, open its terminal, send files, stop it, and get push notifications. Automations can start sessions from GitHub, CI, Slack, Linear or a schedule. There is no native iOS or Android app yet; Bivy is an installable web app (PWA).
- Cost and license: MIT-licensed. Sessions on your own machines don't count against a plan. Self-hosting the control plane and relay is $0, using Bivy's published container images. Agent subscriptions are separate.
- Trade-off: no container image for the machine that runs agents yet, so on Proxmox, TrueNAS or Unraid you run it in a Linux VM. A web app instead of a native one.
Which should you pick?
- You live in a terminal and use one agent: tmux over Tailscale, with Termius, Blink or Moshi on the phone.
- Claude Code on a Pro or Max plan: Remote Control in tmux on the server. Nothing else to install.
- Codex, and you already keep a Mac or Windows PC on: add the server as an SSH host in the ChatGPT desktop app.
- Several agents, and you want them in Docker: Paseo.
- Several agents, push and approvals on the phone, and sessions started from GitHub, CI or a schedule: Bivy in a Linux VM on the server.
FAQ
Can I run Claude Code on a home server without a browser?
Yes. Run claude over SSH. If no browser opens, press c to copy the login URL, open it on any device, and paste the code it shows back into the terminal. For scripts, claude setup-token prints a one-year token for CLAUDE_CODE_OAUTH_TOKEN, but that token can't start Remote Control sessions.
How do I sign in to Codex on a headless Linux server?
Run codex login --device-auth and enter the code on another device. OpenAI marks device code sign-in as beta. You can also use an OpenAI API key, billed at standard API rates.
Should I use a VM or a container on Proxmox, TrueNAS or Unraid?
All three can run a Linux VM. Proxmox's docs describe LXC containers as a lighter alternative that shares the host kernel, and recommend nesting containers inside a VM when you need maximum isolation. Bivy's install docs cover a Linux machine with systemd, not LXC or Docker, so a Linux VM is the documented path for Bivy.
Is there a Docker image for running agents with Bivy?
Not for the machine that runs agents. Bivy publishes container images for its control plane and relay, the server side you can self-host. The machine side installs with one script on Linux or macOS, x64 or arm64. Paseo's daemon does have a documented Docker setup.
Do I need to open ports on my router?
No, for the options here. Tailscale connects your devices on a private network. Remote Control traffic goes through the Anthropic API, Codex remote connections use OpenAI's relay, and Bivy machines dial out to its relay or serve over your tailnet with bivy tailscale.
Sources
All checked on 16 November 2026.
- Proxmox: Proxmox VE overview, Linux Container. TrueNAS: Community Edition. Unraid: pricing, virtual machines
- tmux: Getting Started. Mosh: site. Tailscale: Tailscale SSH, pricing. Termius pricing, Blink Shell, Moshi pricing
- Anthropic: Authentication, Remote Control
- OpenAI: Codex authentication, Remote connections
- Paseo: GitHub README and license
- Bivy: README, install notes, credential sync, Tailscale, deploy images, agent support matrix
Want to try Bivy? Connect your server, or start on a cloud computer with nothing installed.