---
title: "Self-host OpenWorker on a server"
description: "Run Andrew Ng's OpenWorker agent server on an always-on exe.dev VM, with its web app behind exe.dev login and models through exe.dev, no API keys."
url: https://exe.dev/deploy/openworker
category: "AI agents"
updated: 2026-11-19
---

# Self-host OpenWorker on a server

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

Andrew Ng's open-source coworker agent, always on, in your browser.

- **Software:** OpenWorker (https://openworker.com)
- **Source:** https://github.com/andrewyng/openworker
- **License:** MIT
- **Time:** 15 minutes
- **Example VM name:** `my-openworker` (yours will differ; on the VM, `hostname` prints it)
- **Machine-readable:** https://exe.dev/deploy/openworker/manifest.json

## What you get

- OpenWorker 0.3.1's agent server as a systemd service, back after a reboot
- OpenWorker's web app at https://my-openworker.exe.xyz/, behind exe.dev login
- Claude and GPT models through exe.dev's LLM integration, with no API key to paste
- A random OpenWorker token in files only their owners can read, added by nginx so you never type it
- A work folder at `~/work` and a headless check that an agent answers

Running on the VM:

- **OpenWorker server**: openworker 0.3.1 for Linux, a systemd service on 127.0.0.1, port 8765, data in `~/.config/coworker, ~/OpenWorker`
- **OpenWorker web app**: the desktop app's interface, built from the v0.3.1 source and served by nginx, port 8000
- **Models**: Claude and GPT through exe.dev's LLM integration
- **Your files**, data in `~/work`

How it is reached:

- https://my-openworker.exe.xyz/ (private): OpenWorker's web app, behind exe.dev login
- https://my-openworker.exe.xyz/v1/ (private): OpenWorker's HTTP API, for scripts on your computer with an exe.dev VM token
- ssh my-openworker.exe.xyz (private): your terminal, for headless runs and upkeep

## Deploy with Shelley

Open https://exe.dev/deploy/openworker/new to create a VM whose agent, Shelley, follows this recipe. From a terminal:

```sh
curl -fsSL https://exe.dev/deploy/openworker/prompt.txt | ssh exe.dev new --prompt=/dev/stdin
```

Or follow the steps below by hand.

[OpenWorker](https://openworker.com) is Andrew Ng's open-source AI
coworker: you describe the result you want, such as a report, a
spreadsheet or a summary of your inbox, and an agent plans it, runs
commands, browses, and writes the files, asking before each step that
matters. It ships as a desktop app, but the agent itself is a server, and
that server runs fine on Linux.

Put it on an exe.dev VM and you get OpenWorker in any browser, on a machine
that stays on when your laptop sleeps:

- **Private by default.** The web app is behind exe.dev's login; nobody
  else reaches it unless you [share the VM](/docs/sharing).
- **No API keys.** Claude and GPT come through exe.dev's
  [LLM integration](/docs/integrations-llm).
- **A box of its own.** The agent runs commands on a VM with nothing else
  of yours on it, with a disk that keeps its state.
- **Scriptable.** Call OpenWorker's API from your computer with an
  exe.dev [VM token](/docs/https-tokens-for-vms), or run tasks headless
  over SSH.

<figure>
<img src="https://exe.dev/deploy/openworker/task.png" alt="OpenWorker's web app on an exe.dev VM: a finished task that checked the machine and wrote report.md, shown in the Artifacts pane" width="1440" height="900" loading="lazy">
<figcaption>OpenWorker in the browser, after a task that checked the VM and wrote <code>report.md</code>.</figcaption>
</figure>

## Install

Deploy installs OpenWorker, builds its web app, runs both as services, and
checks that an agent answers. To do it yourself:

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

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

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

### Install OpenWorker

On the VM, install the `openworker` program, pinned to 0.3.1, the newest
release as of November 2026. It goes in `~/.local/bin`, with the agent
server next to it in `~/.local/share/openworker`:

```bash
curl -fsSL https://openworker.com/install.sh | OPENWORKER_VERSION=0.3.1 sh
export PATH="$HOME/.local/bin:$PATH"
openworker --version
```

### Connect the models

Give the server its settings in a file only you can read: a random token
that guards its API, and exe.dev's [LLM integration](/docs/integrations-llm)
as its Anthropic and OpenAI endpoint. The integration needs no key; the
`exe-gateway` values only fill the fields the model libraries require:

```bash
mkdir -p ~/work ~/.config/coworker
install -m 600 /dev/null ~/.config/coworker/server.env
cat > ~/.config/coworker/server.env <<EOF
COWORKER_API_TOKEN=$(openssl rand -hex 32)
ANTHROPIC_BASE_URL=https://llm.int.exe.xyz
ANTHROPIC_API_KEY=exe-gateway
OPENAI_BASE_URL=https://llm.int.exe.xyz/v1
OPENAI_API_KEY=exe-gateway
EOF
```

Check that an agent answers, with a headless run that keeps nothing:

```bash
(set -a; . ~/.config/coworker/server.env; openworker run --isolated --out /tmp/openworker-check \
  --model anthropic/claude-haiku-4-5 --approval-mode bypass-approvals \
  --prompt "Reply with exactly: OK")
```

The agent's reply, `OK`, comes before a summary line that ends with
`outcome=completed`.

### Run the server as a service

Run the agent server with systemd, on `127.0.0.1:8765` where only the VM
reaches it, with `~/work` as its folder:

```bash
sudo tee /etc/systemd/system/openworker.service >/dev/null <<'EOF'
[Unit]
Description=OpenWorker agent server
After=network-online.target
Wants=network-online.target

[Service]
User=exedev
WorkingDirectory=/home/exedev/work
EnvironmentFile=/home/exedev/.config/coworker/server.env
Environment=PATH=/home/exedev/.local/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/home/exedev/.local/share/openworker/openworker-server --host 127.0.0.1 --port 8765 --cwd /home/exedev/work
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now openworker
sleep 5
curl -s localhost:8765/v1/health
```

The health check prints `{"status":"ok"}`.

### Build the web app

The Linux program has no interface of its own, so build the desktop app's
from the same release. It needs Node.js 22, from NodeSource, and takes
about a minute:

```bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
git clone --depth 1 --branch v0.3.1 https://github.com/andrewyng/openworker ~/openworker-src
cd ~/openworker-src/surfaces/gui
npm ci
npm run build
sudo rm -rf /var/www/openworker
sudo cp -r dist /var/www/openworker
cd ~
```

### Serve it with nginx

nginx serves the web app on port 8000, where exe.dev's
[HTTPS proxy](/docs/proxy) sends `https://my-openworker.exe.xyz/`, and
passes the API to the server. On the way it adds the token, so the browser
never needs it, and makes the VM's own address look local, the only kind
of page the server accepts. Pages from other sites get `403`.

First the token, in a file only root can read:

```bash
token=$(sed -n 's/^COWORKER_API_TOKEN=//p' ~/.config/coworker/server.env)
sudo install -m 600 /dev/null /etc/nginx/openworker-token.conf
echo "set \$openworker_token \"$token\";" | sudo tee /etc/nginx/openworker-token.conf >/dev/null
unset token
```

Then the site, with your VM's address filled in:

```bash
sudo tee /etc/nginx/sites-available/openworker >/dev/null <<'EOF'
map $http_upgrade $openworker_connection {
    default upgrade;
    ""      close;
}
# The server trusts only local pages: present this VM's own address as one.
map $http_origin $openworker_origin {
    default            $http_origin;
    "https://VM_HOST"  "http://127.0.0.1";
}
# Refuse pages from any other site. Scripts send no Origin and pass.
map $http_origin $openworker_foreign {
    default            1;
    ""                 0;
    "https://VM_HOST"  0;
}

server {
    listen 8000;
    listen [::]:8000;
    root /var/www/openworker;
    client_max_body_size 50m;
    include /etc/nginx/openworker-token.conf;

    location / {
        try_files $uri /index.html;
    }

    location ~ ^/(v1|ws|auth|oauth|mcp)/ {
        if ($openworker_foreign) {
            return 403;
        }
        proxy_pass http://127.0.0.1:8765;
        proxy_http_version 1.1;
        proxy_set_header Host 127.0.0.1:8765;
        proxy_set_header Origin $openworker_origin;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $openworker_connection;
        proxy_set_header X-OpenWorker-Token $openworker_token;
        proxy_set_header Sec-WebSocket-Protocol "openworker, $openworker_token";
        proxy_hide_header Sec-WebSocket-Protocol;
        proxy_buffering off;
        proxy_read_timeout 1h;
    }
}
EOF
sudo sed -i "s/VM_HOST/$(hostname).exe.xyz/g" /etc/nginx/sites-available/openworker
sudo ln -sf /etc/nginx/sites-available/openworker /etc/nginx/sites-enabled/openworker
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl enable nginx
sudo systemctl reload-or-restart nginx
```

Check it, as a page from another site and then from your VM's address:

```bash
curl -s -o /dev/null -w '%{http_code}\n' -H 'Origin: https://example.com' localhost:8000/v1/health
curl -s -o /dev/null -w '%{http_code}\n' -H "Origin: https://$(hostname).exe.xyz" localhost:8000/v1/sessions
```

The first prints `403`, the second `200`.

</details>

## Open OpenWorker

Open `https://my-openworker.exe.xyz/` and log in to exe.dev. OpenWorker
asks **What should we produce?**, with **work** as the folder, **Ask for
approval** as the mode, and **GPT-5.6 Sol** as the model. Type a task:

> Check this machine's OS, CPU, memory and free disk space, then write a short report.md about it in this folder.

The agent plans, then stops at cards such as **Run a command** and **Write
report.md**: choose **Allow once**, **Allow for this session**, or
**Deny**. When it's done, open `report.md` in the **Artifacts** pane on the
right. The file is in `~/work` on the VM.

A few things worth knowing:

- **Pick the model** at the bottom of the message box. Claude models
  (Fable, Opus, Sonnet, Haiku) and GPT-5.6 are listed and run through the
  LLM integration.
- **Modes**: **Discuss** only talks, **Ask for approval** asks before edits
  and commands, and **Bypass approvals** goes ahead on its own, keeping
  basic safety checks. Fetches from websites get their own cards, showing
  which site the data goes to.
- **Where results go**: files the agent works on are in `~/work`; the
  documents it produces as a session's artifacts are in
  `~/OpenWorker/<session>/`.
- **Settings** (the menu at the bottom left) has **Models & Keys**,
  **Connectors**, **Skills**, **Memory** and **Coworkers**, the same as
  the desktop app.

> [!WARNING]
> Whoever gets past exe.dev's login can make the agent run any command on
> the VM. Share the VM only with people you'd give a shell, and keep it
> private.

## Connect your tools

**Settings → Connectors** lists OpenWorker's connectors: Telegram, Slack,
email over IMAP, Gmail, Google Calendar, GitHub, Outlook, Jira and two
dozen more, plus **Add custom MCP server** for any hosted MCP server.

<figure>
<img src="https://exe.dev/deploy/openworker/connectors.png" alt="OpenWorker's Connectors settings: the built-in Browser connected, and Telegram, Slack, Email (IMAP), Gmail, Google Calendar, GitHub, Outlook, Jira and Granola available" width="1440" height="900" loading="lazy">
<figcaption>Connectors, in the web app on the VM.</figcaption>
</figure>

Connectors that take a token or password, such as IMAP, Telegram or a
manual Slack app, keep it in `~/.config/coworker` on the VM. The one-click
ones sign in through OpenWorker Cloud, an account this page doesn't use.

To keep a credential off the VM altogether, let exe.dev hold it:

- **GitHub**: [connect a repository](/docs/integrations-github). The agent
  can then clone it from `https://github.int.exe.xyz/OWNER/REPO.git`, and
  use `gh` with `GH_HOST=github.int.exe.xyz`, with no token on the VM.
- **Any HTTP API**: an [HTTP proxy integration](/docs/integrations-http-proxy)
  adds the key on exe.dev's side, and the VM calls
  `https://NAME.int.exe.xyz/` instead. That works for a hosted MCP server
  that takes a bearer token: add the integration's URL under **Add custom
  MCP server**.

Keep secrets out of chat messages; the [agent secrets](/deploy/agent-secrets)
page has more patterns.

## Call it from your computer

The API is behind exe.dev's login too. For scripts, make a token for this
VM on your computer ([HTTPS tokens for VMs](/docs/https-tokens-for-vms)):

```bash
ssh exe.dev ssh-key generate-api-key --vm=my-openworker --label=openworker
```

Send it in the `X-Exedev-Authorization` header. nginx adds OpenWorker's
own token, so this lists your sessions:

```bash
TOKEN=exe0.paste-your-token
curl -s -H "X-Exedev-Authorization: Bearer $TOKEN" https://my-openworker.exe.xyz/v1/sessions
```

and this reads a session's artifacts, with an id from that list:

```bash
curl -s -H "X-Exedev-Authorization: Bearer $TOKEN" \
  https://my-openworker.exe.xyz/v1/sessions/SESSION_ID/artifacts
```

To run a task without the browser, use OpenWorker's
[headless mode](https://github.com/andrewyng/openworker/blob/main/docs/headless.md)
over SSH:

```bash
ssh my-openworker.exe.xyz 'set -a; . ~/.config/coworker/server.env; cd ~/work; \
  ~/.local/bin/openworker run --model anthropic/claude-haiku-4-5 --approval-mode bypass-approvals \
  --prompt "Count the words in report.md and reply with just the number."'
```

It prints the agent's steps and answer, then a summary line with the
outcome and cost.

## Back up and restore

For a copy of the whole VM, run this on your computer (choose a free
backup name):

```bash
ssh exe.dev cp my-openworker my-openworker-backup
```

OpenWorker keeps its sessions, settings, connector credentials and
token in `~/.config/coworker`, and session artifacts in `~/OpenWorker`.
To archive them and your work folder on the VM, stop the server for a
moment. The archive holds secrets, so keep it private:

```bash
mkdir -p ~/backups
sudo systemctl stop openworker
tar -C ~ -czf ~/backups/openworker-$(date +%F).tar.gz .config/coworker OpenWorker work
sudo systemctl start openworker
chmod 600 ~/backups/openworker-*.tar.gz
```

To restore one on a VM set up as above, replace `2026-11-19` with the
archive's date, then write the nginx token file again from "Serve it with
nginx" and reload nginx:

```bash
sudo systemctl stop openworker
rm -rf ~/.config/coworker ~/OpenWorker
tar -C ~ -xzf ~/backups/openworker-2026-11-19.tar.gz
sudo systemctl start openworker
```

## Update

OpenWorker's [releases](https://github.com/andrewyng/openworker/releases)
page lists new versions. To move to one, set its number in both places,
reinstall the program, rebuild the web app from the matching tag, and
restart; running sessions are interrupted, so pick a quiet moment:

```bash
v=0.3.1
curl -fsSL https://openworker.com/install.sh | OPENWORKER_VERSION=$v sh
rm -rf ~/openworker-src
git clone --depth 1 --branch v$v https://github.com/andrewyng/openworker ~/openworker-src
(cd ~/openworker-src/surfaces/gui && npm ci && npm run build)
sudo rm -rf /var/www/openworker
sudo cp -r ~/openworker-src/surfaces/gui/dist /var/www/openworker
sudo systemctl restart openworker
openworker --version
```

Keep the program and the web app on the same version.

## Troubleshooting

- **The page is blank or says it can't reach the server.** On the VM,
  `systemctl status openworker` and `curl -s localhost:8765/v1/health`;
  `journalctl -u openworker -n 50` shows why it stopped. Then
  `sudo nginx -t` and `systemctl status nginx`.
- **Every request gets `403`.** The address in
  `/etc/nginx/sites-available/openworker` must match the one in your
  browser, `https://my-openworker.exe.xyz`. If you renamed the VM, run
  the `sed` line from "Serve it with nginx" on a fresh copy of the file.
- **Requests fail after you changed the token.** The token in
  `~/.config/coworker/server.env` and `/etc/nginx/openworker-token.conf`
  must match: write the nginx file again, then
  `sudo systemctl restart openworker` and `sudo systemctl reload nginx`.
- **A task stops with "LLM credits exhausted".** Your exe.dev LLM credit
  ran out for now; it refreshes over time. Choose **Retry** later.
- **The model picker has no Claude or GPT models.** The server reads the
  integration settings from `~/.config/coworker/server.env` only when it
  starts: check the file, then `sudo systemctl restart openworker`.

For everything else, see OpenWorker's
[docs](https://github.com/andrewyng/openworker/tree/main/docs) and
[issues](https://github.com/andrewyng/openworker/issues).

## Frequently asked questions

### Is there an official OpenWorker server or Docker image?

Not for the desktop app. OpenWorker ships as a macOS and Windows app whose interface talks to a local agent server, plus a Linux `openworker` program for headless runs and remote machines. The Linux program includes the same server, so this page runs it as a service and serves the app's interface from its source. The VM is the box around it: no Docker needed. (OpenWorker's optional [OpenShell sandbox](https://github.com/andrewyng/openworker/blob/main/docs/openshell.md) uses Docker for its own per-agent containers; it isn't covered here.)

### Do I need an OpenAI or Anthropic API key?

No. The server reaches Claude and GPT through exe.dev's [LLM integration](/docs/integrations-llm), and usage is billed to your exe.dev account; see the [models and prices](/llm-gateway-models). To use your own keys or another provider instead, add them under **Settings → Models & Keys**.

### Who can use it?

Only you, by default: the web app and API sit behind exe.dev's login. Everyone who gets past it can make the agent run commands on the VM, so [share the VM](/docs/sharing) only with people you'd give a shell, and never make it public.

### Does it keep working when I close the browser?

Yes. Sessions run in the server on the VM, so you can close the tab mid-task and come back to the result. **Automations** run on their schedule while you're away.

### Can I use Ollama or another local model?

OpenWorker supports Ollama and other OpenAI-compatible servers, but exe.dev VMs have no GPU, so a local model runs on the CPU: fine for a small model and a little patience, slow for real agent work. The LLM integration is the practical choice here.

### How is this different from the desktop app?

It's the same interface and agent, on a machine that's always on and reachable from any browser. What needs your own computer doesn't apply: there's no native folder picker (the agent works in `~/work` and the folders you name in a message), and connectors that sign in through OpenWorker Cloud may not complete their sign-in here.

### Something's not working. Where do I look?

On the VM, `systemctl status openworker nginx` and `journalctl -u openworker -n 50`. [Troubleshooting](#troubleshooting) covers the usual problems.


## Related

- [Run Paseo on a remote server](https://exe.dev/deploy/paseo.md): One app for your coding agents, on a VM you steer from your phone.
- [Run T3 Code on a remote server](https://exe.dev/deploy/t3code.md): Your coding agents on an always-on VM, steered from your phone.
- [Self-host Hermes Agent](https://exe.dev/deploy/hermes-agent.md): An agent that remembers you, on a computer that never sleeps.
- [Host OpenClaw](https://exe.dev/deploy/openclaw.md): An AI sidekick with its own computer. Your laptop can take a nap.
- [Run Claude Code on a remote server](https://exe.dev/deploy/claude-code.md): A computer for Claude. A breather for your laptop.
- [A Linux desktop in your browser](https://exe.dev/deploy/linux-desktop.md): Xfce, Chrome, and coding agents on a VM you open in a browser tab.
