Blog · Claude Code

Claude Code on a VPS: run it on a Linux server and drive it from your phone

Remote Control lets you drive Claude Code from the Claude app on your phone, but only while the computer running it is on. A rented Linux server, a VPS, doesn't switch off. Install Claude Code on it, run Remote Control in server mode, and you can open its sessions from your phone wherever you are. This guide covers the setup on Ubuntu, Debian or any other distribution, how to keep it running, how to add a desktop for signing in to websites, and what a Linux server can't do compared with a Mac mini at home.

What you need

  • A Linux server you can SSH into, from a provider such as DigitalOcean or OVHcloud. Any distribution works for the Claude Code CLI; Claude Desktop needs Ubuntu 22.04 or later, or Debian 12 or later.
  • A Claude Pro, Max, Ultra, Team or Enterprise plan. Remote Control doesn't work with API keys, and on Team or Enterprise an Owner turns it on first.
  • The Claude app on your phone (iOS or Android), or claude.ai/code in a browser.
  • Optionally, a desktop environment and a remote desktop on the server, for the times Claude needs a website you have to sign in to.

How to set up Claude Code on a Linux VPS

  1. Rent a server and connect to it

    Create a Linux server with a provider such as DigitalOcean or OVHcloud and connect to it with SSH. Choosing Ubuntu 22.04+ or Debian 12+ keeps Claude Desktop as an option; on any other distribution you use the CLI.

  2. Install Claude Code and sign in

    Install the Claude Code CLI with Anthropic's install script. It runs in a terminal (Anthropic lists Ubuntu 20.04+ and Debian 10+ among the supported systems), so it suits a headless server you only reach over SSH. On Ubuntu 22.04+ or Debian 12+ you can install Claude Desktop instead, with apt; it's in beta on Linux (see Claude Desktop on Linux). Then run claude and sign in with your Claude account, not an API key.

    curl -fsSL https://claude.ai/install.sh | bash
  3. Start Remote Control in server mode

    From your project folder, run claude remote-control. It starts a server that can host several Claude Code sessions at once, and you can open each of them from your phone. Add --chrome to turn on Chrome integration in those sessions. To have every interactive session connect instead, set remoteControlAtStartup to true in ~/.claude/settings.json.

    # Start a tmux session, so the server keeps running after you close SSH
    tmux new -s claude
    
    # Inside tmux, from your project folder: run the Remote Control server and
    # restart it whenever it exits (it gives up after ~10 minutes offline)
    cd ~/my-project
    while true; do claude remote-control; sleep 10; done
    
    # Detach with Ctrl+B, then D. Reattach later with:
    tmux attach -t claude
  4. Keep it running after you log out

    Remote Control only works while the claude process runs: close the terminal and its sessions go offline. Run it inside tmux or screen so it survives the SSH connection closing, or as a service. Server mode also exits after about 10 minutes without a network, so restart it automatically, as the loop above does. For permission modes and usage limits on long runs, see how to run Claude Code 24/7.

  5. Open it from your phone

    Open the Claude app on iOS or Android, or claude.ai/code, and pick a session. Claude runs on the server; the phone shows the conversation and sends your messages. Setup details and fixes are in the Remote Control guide. To message Claude Code from Telegram instead, see Claude Code channels.

Source: Anthropic's Remote Control documentation

Add a desktop for signing in to websites

A server you reach over SSH has no screen, which is fine until Claude needs a site you have to sign in to. Add a remote desktop and you can do that sign-in yourself, then let Claude use the browser.

  • Install a desktop environment and a remote desktop server on the VPS, and connect from your laptop when you need to sign in somewhere.
  • Install Google Chrome or Microsoft Edge with the Claude in Chrome extension, and sign in to the sites Claude should use. Claude in Chrome works on Linux; it isn't supported in WSL.
  • Start the server with claude remote-control --chrome so its sessions can use that browser.
  • Reach the remote desktop over Tailscale, which puts your devices on a private network, a tailnet, where only they can reach each other. See what Tailscale is.
  • With a desktop on Ubuntu or Debian, Claude Desktop is an option as well as the CLI.

What a Linux server can't do

If any of these matter, use a Mac mini at home instead, the setup our founder uses.

  • No computer use. Claude can't operate apps and the screen on Linux: in the CLI computer use is macOS only, and in Claude Desktop it's a research preview on macOS and Windows.
  • No iOS development. Xcode and the iOS Simulator run only on macOS, so a Linux server can't build or run an iPhone app.
  • A smaller desktop app. Claude Desktop on Linux is a beta for Ubuntu and Debian, without computer use, Cowork or dictation.
  • A process that has to stay up. As with any Remote Control setup, the sessions are reachable only while claude runs on the server.

Mac mini vs Linux VPS for Claude Code

Mac mini at homeLinux VPS
Where it runsA Mac you own, at home; files stay on itA rented server at a provider such as DigitalOcean or OVHcloud
Remote Control from your phoneYes: Claude Desktop or the CLIYes: the CLI on any distribution, or Claude Desktop (beta) on Ubuntu 22.04+ and Debian 12+
Computer useYes: CLI on macOS; Desktop as a research preview on Pro, Max or UltraNo
iOS development (Xcode, iOS Simulator)YesNo: needs a Mac
Claude in ChromeYesYes, with Chrome or Edge
Remote desktopScreen Sharing, reached over TailscaleA desktop environment and remote desktop you add
With Crewmark

Give the server a standing job

A server that never sleeps answers whenever you message it, and waits when you don't. Crewmark turns a Claude Code conversation on it into an AI employee with a role, goals, working hours and a heartbeat: during working hours the crewmark CLI, which runs on Linux as well as macOS and Windows, wakes the employee to work through its issues on a shared board. The computer it runs on has to stay on, and a VPS does.

  1. Hire an employee

    Pick a role from the AI employee roles, such as software engineer or SEO specialist, and write its goals and KPIs.

  2. Connect Claude Code on the server

    Paste the setup link into a Claude Code conversation on the VPS. It installs the crewmark CLI and links that conversation to the employee. Codex works too.

  3. Set working hours and a heartbeat

    Weekdays only or every day, hours that can run past midnight, and a wake-up every 15, 30, 60, 120 or 240 minutes.

  4. Assign issues from your phone

    Create and assign issues on the board at crewmark.ai from any browser; assigning one wakes the employee right away. When it needs a review or a decision it sets the issue to Needs action and asks you there. Jobs to give it are in Claude Code use cases.

FAQ

Can I run Claude Code on a VPS?

Yes. Install the Claude Code CLI on a Linux server, sign in with a Pro, Max, Ultra, Team or Enterprise plan, and run claude remote-control inside tmux so it keeps running after you log out. Then open its sessions from the Claude app on your phone or at claude.ai/code.

How do I install Claude Code on a Linux server?

Install the Claude Code CLI, which works on any distribution, including a headless server you reach over SSH, and sign in with your Claude account. On Ubuntu 22.04+ or Debian 12+ you can also install Claude Desktop with apt; it's in beta on Linux and doesn't include computer use, Cowork or dictation.

Does Claude Code Remote Control work on Linux?

Yes. Run claude remote-control for a server that hosts several sessions, or turn on Remote Control for one session with /remote-control. It needs a claude.ai sign-in on a Pro, Max, Ultra, Team or Enterprise plan; API keys aren't supported.

How do I keep Claude Code running on a server after I close SSH?

Run it inside tmux or screen, or as a service. Closing the terminal stops the claude process and takes its Remote Control sessions offline. Server mode exits after about 10 minutes without a network, so wrap it in a loop or a service that restarts it.

Can Claude Code use computer use on a Linux server?

No. Computer use isn't available on Linux, in the CLI or in Claude Desktop. Claude in Chrome does work on Linux, so Claude can still use websites in a browser. For computer use or iOS development, use a Mac, such as a Mac mini at home.

What do I need to run Claude Code on a VPS?

A Linux server you can SSH into, a Claude plan that includes Remote Control (Pro, Max, Ultra, Team or Enterprise) and the Claude app on your phone. Any distribution works for the CLI; Claude Desktop needs Ubuntu 22.04+ or Debian 12+.

Checked against Anthropic's Claude Code docs (Remote Control, Claude Desktop on Linux, computer use, Chrome integration) and Tailscale's docs on November 14, 2026.

Put your server to work.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.