Skip to content

Run a Rex server on a remote Linux VM

An always-on remote host for Rex, with agents ready and no API keys.

Deploy on exe.dev

Shelley handles the setup. About 5 minutes.

Prefer a terminal?
curl -fsSL https://exe-staging.dev/deploy/rex/prompt.txt | ssh exe.dev new --prompt=/dev/stdin

Rex is a terminal multiplexer from Superlogical, Mitchell Hashimoto's new company. Sessions live in a Rex server, not in the window, and Rex for Mac can attach to servers on other machines. Run one on an exe.dev VM and your shells and agents keep going when your Mac sleeps.

Rex connects to remote servers over SSH, so your exe.dev key is all it needs. Claude Code and Codex on the VM use exe.dev's LLM integration, so there are no API keys to manage.

Warning

Rex is in beta, and you need a Rex for Mac tester build. Rex has no logins of its own yet; it trusts SSH to say who you are. Don't put it behind the HTTPS proxy.

What you get#

  • Rex's Linux server from the preview channel, running as exedev and back after a reboot
  • Rex for Mac reaching it over SSH, with the key you already use for exe.dev
  • Claude Code and Codex using exe.dev's LLM integration, with Rex's agent skill installed
  • A Rex session work in ~/project where Claude Code answers OK
What's running, and where
Private ssh://my-rex.exe.xyz the Rex server, for Rex for Mac and the rex command; your exe.dev SSH key gets you in
Private ssh my-rex.exe.xyz your terminal
my-rex.exe.xyz exe.dev VM
Rex server the rex package (0.1.0 preview), a personal server run as your account by systemd ~/.local/state/rex
Claude Code and Codex preinstalled; connected to exe.dev's LLM integration, with Rex's agent skill ~/.claude, ~/.codex
Your project ~/project

Deploy with Shelley#

Click Deploy and Shelley will set up Rex on a new VM, then check that it works. No config-file wrangling required.

Prefer a terminal?
curl -fsSL \
  https://exe-staging.dev/deploy/rex/prompt.txt \
  | ssh exe.dev new --prompt=/dev/stdin
What Shelley is told
Set up Rex on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/rex.md from top to bottom.

The recipe's example VM name is my-rex. This VM's name is the output of `hostname`: use it wherever the recipe writes my-rex. Skip the step that creates the VM; you are on it.

You are done when all of these are true. Check each one yourself:
- Rex's Linux server from the preview channel, running as `exedev` and back after a reboot
- Rex for Mac reaching it over SSH, with the key you already use for exe.dev
- Claude Code and Codex using exe.dev's LLM integration, with Rex's agent skill installed
- A Rex session `work` in `~/project` where Claude Code answers `OK`

Run the VM-side commands in "Set up the VM" only; skip creating the VM.
If `exeuntu configure` reports an existing user config, leave it alone.
If `~/project` already exists, leave it alone. Don't start interactive
agents. Verify with the checks at the end of that section: `rex version`
starts with `rex 0.1.0`, `rex server status` shows `exit-empty: false`,
and the `work` session shows `OK` from Claude Code. Skip the later
sections and the FAQ. Finish by telling the owner to run
`ssh <this VM's name>.exe.xyz rex version` on their Mac, then add
`ssh://<this VM's name>.exe.xyz` in Rex for Mac with
**Add Remote Host…** ("Add it to Rex for Mac"). Never put Rex behind
exe.dev's HTTPS proxy or use `--allow-anonymous`.

Finish with the URLs I should open.

Also at /deploy/rex/prompt.txt. The recipe it follows is /deploy/rex.md.

Set up the VM#

Create a VM and log in. Skip the first line if you already have one:

ssh exe.dev new --name=my-rex
ssh my-rex.exe.xyz

On the VM, connect the agents to the LLM integration and install Rex from the preview channel. (Without --channel, the script installs a snapshot build, since there's no stable release yet.)

exeuntu configure claude
exeuntu configure codex
curl -fsSL https://pkgs.superlogical.com/rex/install.sh | sh -s -- --channel preview
rex version

Start a personal server, run by systemd as exedev. exe.dev's SSH sessions don't set XDG_RUNTIME_DIR, which rex server install needs:

XDG_RUNTIME_DIR=/run/user/$(id -u) rex server install

Teach the agents Rex's commands, and open a session in a new project:

rex skill setup
git init ~/project
rex new work -c ~/project

Check that it works. Claude Code should print OK in the work session:

rex server status | grep -E '^(version|exit-empty)'
rex send -s work 'claude -p --model haiku "Reply with exactly: OK"'
rex send-key -s work Enter
sleep 20; rex capture -s work | tail -3

Add it to Rex for Mac#

On your Mac, check that SSH works and finds rex. This also accepts the VM's host key:

ssh my-rex.exe.xyz rex version

In Rex for Mac, choose Add Remote Host… and enter:

ssh://my-rex.exe.xyz

Rex uses your Mac's ssh, keys and ~/.ssh/config. exe.dev logs every SSH user in as exedev, so you can leave the user name out.

Open the work session and start an agent:

cd ~/project && claude

Give it a task and close the laptop. It keeps working. Codex works too; approve Rex's hook with /hooks the first time.

From a terminal on your Mac (hosts added this way don't show up in the app yet):

rex hosts add my-rex ssh://my-rex.exe.xyz
rex -S my-rex ls

We tested the rex command over SSH. We couldn't run Rex for Mac, but it takes the same address.

Let agents drive Rex#

With the skill installed, an agent in Rex can open tabs, split panes and read other terminals. Ask it to "start the dev server in another tab" or "run the tests beside you and fix what fails", and watch. Shelley, at https://my-rex.shelley.exe.xyz/, uses the same skill. See Rex's agent docs.

Serve previews on port 8000 and open https://my-rex.exe.xyz/. It's private until you share it.

Prefer Tailscale?#

You don't need it, but Rex can join your tailnet itself; the VM doesn't need Tailscale installed. Turn on MagicDNS and HTTPS Certificates for your tailnet, then on the VM (this restarts the server, ending programs running in Rex):

export XDG_RUNTIME_DIR=/run/user/$(id -u)
mkdir -p ~/.config/systemd/user/rex.service.d
cat > ~/.config/systemd/user/rex.service.d/tailscale.conf <<EOF
[Service]
ExecStart=
ExecStart=/usr/bin/rex server run --log-format text --tailscale --tailscale-hostname $(hostname)
EOF
systemctl --user daemon-reload
systemctl --user restart rex.service
rex server status

Open the authenticate: link and approve the device. Then add https://my-rex.<your-tailnet>.ts.net in Rex for Mac. See Remote Access for who can connect.

What keeps running#

  • Your Mac sleeps: nothing on the VM notices.
  • The VM restarts: sessions, tabs and panes come back, with fresh shells. Programs that were running are gone.
  • Rex updates: the running server keeps the old version until you restart it.

Back up and restore#

Push your code. To copy the whole VM:

ssh exe.dev cp my-rex my-rex-backup

If you use Tailscale, the copy shares the original's Tailscale identity. On the copy, delete ~/.local/state/rex/tsnet, change the name in the drop-in, and restart the server.

Update#

curl -fsSL https://pkgs.superlogical.com/rex/install.sh | sh -s -- --channel preview
rex version | head -1
rex server status | grep '^version'

If the versions differ, run rex server stop when nothing important is running. The next connection starts the new version. Update the agents with sudo exeuntu update claude and sudo exeuntu update codex.

Troubleshooting#

  • rex server install can't reach systemd's user manager: put XDG_RUNTIME_DIR=/run/user/$(id -u) in front.
  • Rex for Mac can't connect: run ssh my-rex.exe.xyz rex version on your Mac. If SSH asks for a passphrase, run ssh-add; Rex can't prompt.
  • rex says (R)?ex: that's an unrelated Ubuntu package. Run the install script again.
  • The server won't start: see journalctl --user -u rex, or the log path in rex server status.
  • An agent doesn't answer: try claude -p "Reply with exactly: OK" on the VM, and rerun exeuntu configure claude if it fails.

More in Rex's Linux docs.

Frequently asked questions#

Can I use Rex yet?

It's in public testing. Rex for Mac goes out in waves to Superlogical's mailing list. The Linux server is open to all testers and installs without an account. The iOS, Linux and Windows clients aren't in public testing yet. Expect things to change between builds.

Can I set it up from my Mac with `rex server install ssh://my-rex.exe.xyz`?

Not yet. It installs Rex but then fails, because exe.dev's SSH sessions don't set XDG_RUNTIME_DIR. Run the steps in Set up the VM instead.

Can I use Rex for iOS?

If you're in its testing. It connects to ssh:// hosts with a key of its own (Settings > Remote Hosts > SSH Key). Add that public key to your exe.dev account with ssh exe.dev ssh-key add '<key>'. We haven't tried it.

Can I use exe.dev's HTTPS proxy instead of SSH?

No. Rex has no logins yet, so an HTTP listener needs --allow-anonymous, and then anyone who connects can run programs as you. Use SSH, or Tailscale.

Why the personal server?

It runs as exedev, the account with your files and agent configs, and it's the one Rex finds over SSH. The shared server runs as a separate rex account and loses its sessions on upgrade. For several people, see Rex's login server.

Can I use my own Claude or ChatGPT subscription?

Yes. Remove what exeuntu configure added (apiKeyHelper and env.ANTHROPIC_BASE_URL in ~/.claude/settings.json, the exe-llm provider in ~/.codex/config.toml), then run claude auth login or codex login. Keep the hooks entries Rex added.

How much does it cost?

Rex is free, and Superlogical says it will stay free. The VM is part of your exe.dev plan, and model usage through the LLM integration is billed to your exe.dev account.

Does Rex send data anywhere?

Rex collects no telemetry. The VM talks to Superlogical's package repository for updates, and to Tailscale only if you turn it on.

Updated Nov 16, 2026 · Markdown · manifest.json · Something wrong? Tell us