---
title: "Run oh-my-pi (omp) on a remote server"
description: "Self-host oh-my-pi, the Pi fork with LSP, subagents and session sharing, on an always-on exe.dev VM: no API keys, and turns that finish after a crash or reboot."
url: https://exe-staging.dev/deploy/oh-my-pi
category: "AI agents"
published: 2026-11-21
updated: 2026-11-21
---

# Run oh-my-pi (omp) on a remote server

> **For agents:** with your user's OK, this sets up oh-my-pi on a new exe.dev VM in their account: `curl -fsSL https://exe-staging.dev/deploy/oh-my-pi/prompt.txt | ssh exe.dev new --prompt=/dev/stdin` (or open https://exe-staging.dev/deploy/oh-my-pi/new). Already on the VM? Skip this.

The Pi fork with the IDE wired in, on a computer that stays on.

- **Software:** oh-my-pi (https://omp.sh)
- **Source:** https://github.com/can1357/oh-my-pi
- **License:** MIT
- **Time:** 5 minutes
- **Example VM name:** `my-oh-my-pi` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe-staging.dev/deploy/oh-my-pi/manifest.json

## What you get

- oh-my-pi 19.0.1 answering through exe.dev's LLM integration, with no API key or sign-in
- Claude, GPT and (optionally) open models from one models file
- A Git repository at `~/project` on persistent disk
- An `omp` tmux session that survives disconnects
- Optionally, a boot service that reopens the session and finishes a turn a reboot cut off

Running on the VM:

- **oh-my-pi (omp) 19**: one binary in ~/.local/bin; models from exe.dev's LLM integration, data in `~/.omp/agent`
- **Your project**: a Git repository, data in `~/project`
- **tmux**: keeps omp running when you disconnect; optionally started at boot
- **omp stats**: optional usage dashboard, port 3847

How it is reached:

- ssh my-oh-my-pi.exe.xyz (private): your terminal, and omp in tmux
- https://my-oh-my-pi.exe.xyz:3847/ (private): the optional omp stats dashboard, behind your exe.dev login

## Deploy with Shelley

Open https://exe-staging.dev/deploy/oh-my-pi/new to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe-staging.dev/deploy/oh-my-pi/prompt.txt | ssh exe.dev new --prompt=/dev/stdin
```

Or follow the steps below by hand.

[oh-my-pi](https://omp.sh) (`omp`) is a fork of the Pi coding agent by
Can Bölük and Stencil Labs, with "the IDE wired in": language servers
check every edit, a debugger and subagents are built-in tools, and you
can hand a running session to someone in their browser. Like Pi, it
doesn't stop to ask before it runs a command.

That makes an exe.dev VM a good home for it. The VM is always on, so omp
keeps working with your laptop shut; it's a whole computer of its own,
so there's nothing on it you'd mind omp touching; and models come from
exe.dev's [LLM integration](/docs/integrations-llm), so there's no API
key on the VM. If omp is killed or the VM restarts mid-task, it picks the
interrupted turn back up.

[exe.dev](https://exe.dev/) gives you persistent Linux VMs with HTTPS,
sign-in and a coding agent built in; this page installs omp on one.

> [!NOTE]
> Pi itself is already installed on every exe.dev VM, with nothing to set
> up: see [Pi](/deploy/pi). This page is for its fork, and the two live
> happily side by side.

## Install oh-my-pi

<details id="create-the-vm" data-manual-setup class="dp-details">
<summary>Install oh-my-pi by hand</summary>

On your computer, create a VM and connect. Pick any free name; if you've
already clicked Deploy or have a VM, skip the first command and use its
name:

```bash
ssh exe.dev new --name=my-oh-my-pi
ssh my-oh-my-pi.exe.xyz
```

### Set up the VM

On the VM, install omp with its official installer, pinned to a release.
`--binary` fetches the prebuilt binary (about 300 MB), checks its
checksum and puts it in `~/.local/bin`:

```bash
curl -fsSL https://omp.sh/install | sh -s -- --binary --ref v19.0.1
```

Point omp's Anthropic and OpenAI providers at the LLM integration. The
integration adds the credentials on the way out, so `apiKey` is only a
placeholder. Then choose the models omp uses for normal work (`default`),
quick jobs such as titles (`smol`) and hard thinking (`slow`):

```bash
mkdir -p ~/.omp/agent
cat > ~/.omp/agent/models.yml <<'EOF'
providers:
  anthropic:
    baseUrl: https://llm.int.exe.xyz/anthropic
    apiKey: exe-llm-integration
  openai:
    baseUrl: https://llm.int.exe.xyz/openai/v1
    apiKey: exe-llm-integration
EOF
cat > ~/.omp/agent/config.yml <<'EOF'
modelRoles:
  default: anthropic/claude-sonnet-5-5
  smol: anthropic/claude-haiku-5-5
  slow: openai/gpt-6.1-sol
EOF
```

Make a project, a Git repository so you can review and undo what omp
changes, and let tmux tell **Shift+Enter** (a new line) from **Enter**
(send):

```bash
git init ~/project
echo 'set -g extended-keys on' >> ~/.tmux.conf
```

Check it. The version prints, and a one-off prompt answers `OK`:

```bash
cd ~/project
omp --version
omp -p --model anthropic/claude-haiku-5-5 "Reply with exactly: OK" </dev/null
```

</details>

## Start coding

On the VM, open a tmux session in your project and start omp:

```bash
tmux new -A -s omp -c ~/project
omp
```

The first run is a short setup wizard. Anthropic already shows as
**logged in (config)** and Sonnet 5.5 is the default model, so press
**Enter** or **Esc** through the steps; the others are looks and update
notices. Then give it a task:

> Build a tiny website for a lighthouse keeper who reviews fog, and serve
> it on port 8000.

When omp says it's running, open `https://my-oh-my-pi.exe.xyz/` in your
browser. Only you can see it: exe.dev asks for your login first.
[More about previews](/docs/proxy).

Type `/model` to switch models, or **Ctrl+P** to cycle through the roles.

## Close the laptop

Press **Ctrl-b**, then **d** to detach. omp keeps working. On your
computer, this hops back in, from anywhere:

```bash
ssh -t my-oh-my-pi.exe.xyz 'tmux new -A -s omp -c ~/project'
```

omp writes the session to disk as it goes, in
`~/.omp/agent/sessions`. If omp dies or the VM restarts in the middle of
a task, run `omp --restore` in the project folder and pick the session
marked **interrupted**. omp reruns the cut-off command and finishes the
turn. `omp --continue` reopens your last session without resuming
anything; `omp --resume` lets you choose one.

<details class="dp-details">
<summary>Start omp at boot, and finish what a reboot interrupted</summary>

On the VM, a small script reopens the newest session of `~/project` with
`--restore`, and a systemd service runs it in the `omp` tmux session
whenever the VM starts:

```bash
cat > ~/.local/bin/omp-tmux <<'EOF'
#!/bin/bash
cd ~/project
last=$(ls -t ~/.omp/agent/sessions/-project/*.jsonl 2>/dev/null | head -1)
if [ -n "$last" ]; then exec ~/.local/bin/omp --restore "$last"; fi
exec ~/.local/bin/omp
EOF
chmod +x ~/.local/bin/omp-tmux

sudo tee /etc/systemd/system/omp-tmux.service >/dev/null <<'EOF'
[Unit]
Description=oh-my-pi in a tmux session
After=network-online.target
Wants=network-online.target

[Service]
Type=forking
User=exedev
Environment=HOME=/home/exedev
WorkingDirectory=/home/exedev/project
ExecStart=/usr/bin/tmux new -d -s omp '/home/exedev/.local/bin/omp-tmux; exec bash -l'
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable omp-tmux
```

It takes over at the next boot; leave the session you have open until
then. After a restart, omp says **Restored: going on with the interrupted
turn** and carries on, or **nothing was left unfinished**. Things omp
started in the background, such as a dev server, don't come back by
themselves: ask omp to make a systemd service for anything that should.

</details>

## Hand someone the session

Type `/collab view` in omp and it prints two links: one for another
terminal (`omp join …`) and one for any browser at `my.omp.sh`, a
third-party relay run by the oh-my-pi project. Whoever opens it watches
the session live, as a chat, but can't type. `/collab`
without `view` makes a link that can also prompt the agent, which means
running commands on your VM: share that one only with people you'd give
a shell. `/collab stop` ends it.

<figure>
<img src="https://exe-staging.dev/deploy/oh-my-pi/collab-view.png" alt="An omp session in a browser at my.omp.sh, marked read-only: a bash command cut off with 'Previous OMP process exited before completing the turn', then omp carrying on and adding a footer to index.html" width="1280" height="800" loading="lazy">
<figcaption>A read-only <code>/collab view</code> link in a browser, showing a turn omp finished after it was killed.</figcaption>
</figure>

The relay passes the session along encrypted, with the key in the part
of the link after `#`, which browsers don't send. To keep it all on exe.dev, a teammate you'd
trust with the whole VM can watch over SSH instead: give them
[Root access](/docs/sharing) and they run
`ssh -t my-oh-my-pi.exe.xyz tmux attach -r -t omp`.

## See what it spends

omp keeps its own account of every request. `omp stats --summary` prints
it; `omp stats` serves a dashboard. To open it in your browser, run it on
all interfaces and tell it the VM's name, which it otherwise refuses:

```bash
OMP_STATS_ALLOWED_HOSTS=$(hostname).exe.xyz omp stats --host 0.0.0.0 --port 3847
```

Then open `https://my-oh-my-pi.exe.xyz:3847/`, behind your exe.dev login.
Its dollar figures are estimates from omp's price list; what you pay is
on your exe.dev bill.

<figure>
<img src="https://exe-staging.dev/deploy/oh-my-pi/stats.png" alt="The omp stats dashboard: $0.13 API-equivalent cost, 14 requests, 99% cache rate, and requests split between the main agent, composer and titles" width="1280" height="800" loading="lazy">
<figcaption>omp stats after the fog site and a restored turn.</figcaption>
</figure>

## Know what it can reach

omp's default approval mode is `yolo`: it reads, writes and runs whatever
the `exedev` user can, which on this VM includes `sudo`. That's why it's
here and not on your laptop. To have it ask first, start it with
`omp --approval-mode write` (edits freely, asks before running anything)
or `--approval-mode always-ask` (asks before edits too), or make it
permanent with `omp config set tools.approvalMode write`.

It can also reach the internet and the
[integrations](/docs/integrations) attached to the VM, and it loads a
repository's own hooks, extensions and MCP servers when you open it. Keep
secrets you wouldn't hand to omp off this VM, and attach only the
integrations it needs.

> [!TIP]
> Before a big unattended job, take a copy of the VM with
> `ssh exe.dev cp my-oh-my-pi my-oh-my-pi-backup` on your computer. If
> the job goes sideways, carry on from the copy.

## Make yourself at home

- **Open models:** to use the LLM integration's open models too, such as
  GLM and Kimi, add a third provider to `~/.omp/agent/models.yml`, then
  pick one with `/model` (for example `exe-fireworks/fireworks/glm-5p3`).
  Don't name it `fireworks`: omp rewrites that provider's model names.

  ```yaml
    exe-fireworks:
      baseUrl: https://llm.int.exe.xyz/fireworks/inference/v1
      apiKey: exe-llm-integration
      api: openai-completions
      discovery:
        type: openai-models-list
        injectV1: false
  ```

- **Bring your code:** [connect a GitHub repo](/docs/integrations-github),
  clone it onto the VM, and run `omp` from its folder. omp reads the
  `AGENTS.md`, `CLAUDE.md` and rules files already in it.
- **Bring old sessions:** `omp --from-claude` and `omp --from-codex`
  import a Claude Code or Codex session; both agents are on the VM too.
- **Give it more VMs:** omp speaks MCP, so it can use
  [exe.dev's MCP server](/deploy/exe-mcp) to make VMs of its own. It
  doesn't ask before tool calls by default, so use a token limited to one
  tag, as [that page shows](/deploy/exe-mcp#limit-what-the-agent-can-touch).
- **Update:** `omp update --check` says whether there's a newer release.
  To move on, run the installer again with the new tag, for example
  `--ref v19.0.2`, read the
  [changelog](https://github.com/can1357/oh-my-pi/blob/main/packages/coding-agent/CHANGELOG.md),
  and reopen your session with `omp --continue`.

## Frequently asked questions

### How is oh-my-pi different from Pi?

oh-my-pi started as a fork of [Pi](/deploy/pi) and keeps its feel: a terminal agent that doesn't ask before it acts. It then adds what Pi leaves to extensions: language servers checking every edit, a debugger, subagents in their own worktrees, web search, code review, memory, live session sharing and a usage dashboard. Pi comes preinstalled on exe.dev and finds its models by itself; omp is one install and one models file away.

### Can I keep Pi on the same VM?

Yes. They don't share settings or sessions: Pi keeps its own in `~/.pi/agent` and omp in `~/.omp/agent`. Run `pi` and `omp` side by side, even on the same project. [Pi Pocket](/deploy/pi-pocket) and [Pi Durable](/deploy/pi-durable) are built on Pi, not omp, and keep working with the Pi beside it.

### Do I need Docker?

No. omp is a single binary, and the VM is already the sandbox: a whole Linux machine that isn't your laptop. Docker is on the VM anyway, for the projects omp works on.

### Can I use my own subscription or API key?

Yes. Type `/login` in omp, choose a provider and follow its prompts, then pick its model with `/model`. Or keep the key off the VM: add it to exe.dev's [LLM integration](/docs/integrations-llm) as your own key, and the models file on this page keeps working unchanged.

### How much does it cost?

oh-my-pi is free and open source (MIT). You pay for the VM as part of your exe.dev plan, and model usage through the [LLM integration](/docs/integrations-llm) is billed to your exe.dev account. exe.dev keeps a [list of models and prices](/llm-gateway-models). omp's own cost figures are estimates from its price list. Composer predictions, the grey text that suggests your next prompt, are model calls too; `omp config set composer.predictions false` turns them off.

### How do I back up my work?

Commit and push your code. For a copy of the whole VM, run `ssh exe.dev cp my-oh-my-pi my-oh-my-pi-backup` on your computer. The copy has your files, settings and omp's sessions, which live in `~/.omp/agent/sessions`.


## Related

- [Run the Pi coding agent on a remote server](https://exe-staging.dev/deploy/pi.md): An agent that doesn't ask first, on a computer that can take it.
- [Run Pi Pocket on a remote server](https://exe-staging.dev/deploy/pi-pocket.md): Your Pi agent on your phone, running on a VM that never sleeps.
- [Host a Pi Durable agent](https://exe-staging.dev/deploy/pi-durable.md): An agent that picks up where it left off, even after kill -9.
- [Run Claude Code on a remote server](https://exe-staging.dev/deploy/claude-code.md): A computer for Claude. A breather for your laptop.
- [Run Codex on a remote server](https://exe-staging.dev/deploy/codex.md): A computer for Codex. An early night for your laptop.
- [Run OpenCode on a remote server](https://exe-staging.dev/deploy/opencode.md): Every model, one VM, and an agent that works while your laptop sleeps.
