Browse the docs · Your servers
docs / compute

Your servers

A server of your own can run your sessions too: a Linux box on your Tailscale network, running the same daemon as your Mac and booting each session into its own VM under crosvm. It stays awake when your laptop does not, so work placed there carries on after you close the lid.

How it works

A server joins your World as a device, the same way your Mac does. You run the Mod daemon on it, signed in as you, and it writes its facts into the World's presence: the harnesses its VMs carry, where each is signed in, and the projects it hosts. From then on it beats every ten seconds like any other device, and placement can choose it.

On Linux the daemon talks to Mod's own VM host, built on crosvm, through the same VM service it uses on a Mac. Each session gets its own VM cloned from your project's saved setup. The guest image carries Claude Code, Codex, Cursor and Pi, so the server needs no harness installed on the host.

A session is placed on your server in three ways. You can choose it when you start the session or from the Move menu. Placement can pick it when your Mac is away and the server holds the session's sign-in. And when your Mac sleeps, it hands busy sessions to the server by the same rule. A move stops the old host claiming runs, finishes or interrupts the current turn, sends the last snapshot of the code, and then writes the new placement. The server's VM picks up from the log, with your uncommitted work.

What decides whether a session may run on the server is its sign-in. A session on an API key at Mod's edge can run there: the key is added on the way out and never enters the VM. A session on a Claude Code or Codex subscription can run there only if you have signed that harness in on the server, onto a login volume its VMs share. A server without that sign-in is never offered for a subscription session, and a session sent there by mistake is refused with the reason.

Reach stays inside your tailnet. Mod finds the server by its Tailscale name. Your phone can open a terminal in a session's VM over Tailscale SSH, and open its dev server at the server's Tailscale name, with no public port. The daemon accepts no inbound connection from the internet; it syncs over its own outbound connection to the relay.

Using it as you build

Run the daemon on the server. --host-world hosts every project your World lists, and --supervise restarts the daemon if it exits, as the Mac app does:

mod-desktop --host-world --supervise

The daemon reads your Mod sign-in from MOD_AUTH_TOKEN or ~/.mod/config, and the World from MOD_WORLD_FILE. Give the server a name for the device picker with MOD_DESKTOP_DEVICE_NAME.

To check what the server's harnesses are and whether each is signed in:

mod-desktop status

To confirm the server has joined and is present, from any machine:

mod-next world devices

If you only need Mod's workers on the server, without session VMs, run them headless with mod-next workers (see workers).

To send a session to the server, pick it in the session's Move menu. The menu lists only devices that can serve that session's sign-in.

Limits

  • The server needs Linux with hardware virtualisation, or nested virtualisation on a cloud VM. crosvm runs as root.
  • Reach is Tailscale. The server, your phone and your Mac need to be on the same tailnet to open a terminal or dev server.
  • A subscription session runs there only after you sign that harness in on the server.
  • Each session VM is capped at 768 MiB of memory and two virtual CPUs, as on a Mac.