This page is for operators — the person who sets up the shared infrastructure. You do this once. Individual users never touch these steps.

The publish server and messaging router each need their own VM. Both listen on port 8000, which is the port exe.dev's proxy forwards HTTPS traffic to. Since each VM can only expose one port publicly, they can't share a host.

Prerequisites

ItemWhere to get it
Two VMs — one for the publish server, one for the messaging router exe.dev dashboard or your preferred provider
Cloudflare account cloudflare.com — free tier is fine
Cloudflare API token with Cloudflare Pages: Edit Cloudflare dashboard → My Profile → API Tokens
Discord bot token Discord developer portal → Applications → your bot → Bot tab
TOTP authenticator app Google Authenticator, Authy, 1Password, etc.
The hub VM runs the publish server and messaging router. It can be small — a $5/month box is plenty. The compute-heavy work happens on the per-user VMs.

Step 1: Clone the repo

On the hub VM:

git clone https://github.com/butaud/claude-harness.git
cd claude-harness

Step 2: Deploy the publish server

The publish server accepts build uploads from harness VMs and deploys them to Cloudflare Pages.

sudo bash publish-server/scripts/setup.sh

The script will ask for:

After the script finishes, open the VM's public URL (e.g. https://publish-vm.exe.dev) in a browser. You'll see a QR code — scan it with your authenticator app. That TOTP secret is how you provision publish tokens for each user VM.

Write down the hub VM's address and the fact that you've scanned the QR code. You'll need to enter TOTP codes when adding new VMs later.

Step 3: Deploy the messaging router

The messaging router holds the Discord bot connection and routes DMs to the right user VM. It shares the /srv/publish-platform/config directory with the publish server so pairings persist across restarts.

sudo bash messaging-router/scripts/setup.sh

The script will ask for your Discord bot token. The bot needs to be added to at least one Discord server that users are in (or users can add it to their own server during onboarding).

!
Enable Message Content Intent in the Discord developer portal under your bot's settings. Without it, the bot cannot read DMs for pairing codes.

Step 4: Note the hub URLs

When provisioning each user VM you'll need:

ValueExample
Publish server URLhttps://publish-vm.exe.dev
Messaging router URLhttps://router-vm.exe.dev
Discord bot invite linkFrom the Discord developer portal → OAuth2 → URL Generator

Adding a new user VM

Once the hub is up, adding a user is just running session-manager/scripts/setup.sh on the new VM and entering the hub URLs when prompted. See the New VM Setup guide for the full walkthrough.

Architecture note

The only persistent state is:

Both setup scripts check for existing files before writing, so re-running setup.sh on the same VM is safe. The deploy.sh scripts only rebuild Docker images and restart containers — they never touch config files.

The only situation where you'd lose this state is migrating to a different VM. Copy the relevant file to the new machine before running setup there.