# Coding agents on Proxmox

> Codex, Claude Code, OpenCode and 14 more agents on Proxmox VE, from EnvHaven's open-source workspace image, running in Docker inside a virtual machine as Proxmox's documentation recommends for application containers. The VM, the container, backups, updates and what is left to you.

_Updated November 23, 2026_

A Proxmox host is already on around the clock, which is the hard part of giving coding agents a machine of their own. EnvHaven's workspace image covers the rest in one container: 17 agents, VS Code in the browser, and a terminal session that keeps running after you close the tab. The image is `ghcr.io/envhaven/envhaven:latest`, MIT-licensed and built on LinuxServer.io's code-server image, with its source at [github.com/envhaven/envhaven](https://github.com/envhaven/envhaven).

The agents are Codex, Claude Code, OpenCode, Antigravity CLI, Grok Build, Kimi Code CLI, Muse Code, OpenClaw, Hermes Agent, Pi, Goose, Qwen Code, Mistral Vibe, Factory Droid, Kiro, Amp and fx. Each signs in with your own account or API key. The image reports nothing back to EnvHaven.

## A VM or an LXC container

Proxmox's documentation advises against running Docker on the Proxmox host itself. Where isolation or live migration matters, it recommends running application containers inside a QEMU virtual machine, and it calls running them directly as Proxmox containers, created from OCI images, a technology preview. Docker can also run inside an LXC container; for an unprivileged one, the docs name the `keyctl` feature (`features: keyctl=1`) as required. This guide follows the recommendation and uses a VM, which also gives Docker and the agents a kernel of their own.

## Create the VM

1. Upload a Debian installer ISO to Proxmox storage.
2. Click **Create VM**, give it a **Name**, and choose the ISO image in the wizard's OS step. Size the VM from what the host can spare: memory matters more than CPU once builds or a browser are involved, and the disk needs room for the image, which is several gigabytes, as well as your projects.
3. Install Debian with an SSH server, then install Docker Engine and its Compose plugin as [Docker's Debian instructions](https://docs.docker.com/engine/install/debian/) describe.
4. In the VM's **Options**, turn on **Start at boot** so it comes back when the host restarts.

## Run the container

On the VM, make a folder for it:

```bash
mkdir ~/envhaven && cd ~/envhaven
```

Save this in it as `compose.yaml`:

```yaml
services:
  envhaven:
    image: ghcr.io/envhaven/envhaven:latest
    container_name: envhaven
    restart: unless-stopped
    ports:
      - "8443:8443"
      - "2222:22"
    environment:
      - PASSWORD=choose-a-long-password
      - SUDO_PASSWORD=choose-another-password
      - PUBLIC_KEY_URL=https://github.com/<you>.keys
    volumes:
      - ./config:/config
```

Change both passwords, then start it:

```bash
sudo docker compose up -d
```

Port 8443 serves VS Code over plain HTTP, and port 22 inside the container is SSH, published as 2222. `PASSWORD` signs you in to VS Code; without it, the editor listens only inside the container. `SUDO_PASSWORD` is for `sudo` in the terminal. SSH accepts keys only, so `PUBLIC_KEY_URL` imports yours from GitHub, or `PUBLIC_KEY` takes a single key. The image's default `PUID` and `PGID` of 1000 match the first user a Debian install creates, so the files in `~/envhaven/config` are yours.

The image also includes the Docker CLI, which works only if you mount the VM's `/var/run/docker.sock` into the container. That gives it control of every container in the VM. On a VM that runs nothing else, the reach ends at the VM, but leave the socket out unless you want the agents running containers.

## Where your work lives

`/config` is the container's home and its only persistent folder: projects, dotfiles, every agent's sign-in and its settings. On the VM, that is `~/envhaven/config`. A backup of the VM, scheduled under **Datacenter → Backup**, therefore covers the workspace too. Everything outside `/config` resets when the image updates.

## First run

Open `http://<vm-ip>:8443` and enter your `PASSWORD`. Open a terminal; it attaches to a session that keeps running after you close the tab, so an agent you start there keeps working while you are away. Start Codex and sign in with your ChatGPT account or an API key:

```bash
codex
```

Claude Code is `claude`, OpenCode is `opencode`, and the others start by name as well; OpenClaw and Hermes Agent set themselves up with `openclaw onboard` and `hermes setup`. `ssh -p 2222 abc@<vm-ip>` lands in the same session. The [Haven CLI](https://envhaven.com/glossary/haven-cli) syncs a local folder with the container, for working in your own editor: `haven connect . abc@<vm-ip>:2222`.

Processes started in the terminal stop when the container restarts or updates, so start them again afterwards.

## Updating

```bash
cd ~/envhaven
sudo docker compose pull
sudo docker compose up -d
```

Compose replaces the container with one created from the new image and leaves `config` alone. Debian, Docker and Proxmox itself take their own updates.

## What running it yourself leaves to you

- **HTTPS.** Opened by IP address over plain HTTP, VS Code runs in what browsers call an insecure context, and [code-server warns](https://github.com/coder/code-server/blob/main/docs/FAQ.md#why-do-web-views-not-work) that web views, the clipboard and other features may not work there. For one computer, an SSH tunnel fixes it: `ssh -N -L 8443:localhost:8443 -p 2222 abc@<vm-ip>`, then `http://localhost:8443`. A proper address takes a [reverse proxy](https://envhaven.com/glossary/reverse-proxy) with a certificate in front of port 8443, one that passes the WebSockets the editor depends on.
- **Reaching it from outside your home network.** A VPN such as WireGuard or Tailscale, on the VM or on your network, lets your own devices in. Forwarding 8443 on your router would expose a terminal to the internet behind one password.
- **A public address for apps.** An app an agent builds is reachable through the ports you publish from the container. On the internet, with HTTPS, it also needs a domain, DNS, an open port on your router and the reverse proxy.
- **Uptime.** Agents work while the host and the VM are up. **Start at boot** brings the VM back after a host restart and `restart: unless-stopped` brings the container back with Docker, while anything that ran in the terminal waits for you to start it again.
- **Updates.** Proxmox, Debian, Docker and the image each need them.

## If you would rather not run the VM

A VM on hardware you own costs nothing extra. If you would rather not keep one, a managed EnvHaven workspace is an always-on Linux server of its own, in one of 11 regions, that you open from any browser. The agents are signed in once from its Launch menu. Each workspace gets a public HTTPS preview URL and takes custom domains, and the Plus and Pro plans include Docker. Plans start at $15 a month, billed annually.

## Keep reading

- [Self-hosted dev environment](https://envhaven.com/guides/self-hosted-dev-environment)
- [Codex in Docker](https://envhaven.com/agents/codex/docker)
- [Coding agents on TrueNAS](https://envhaven.com/guides/coding-agents-on-truenas)
- [Self-hosting](https://envhaven.com/glossary/self-hosting)

Source: https://envhaven.com/guides/coding-agents-on-proxmox
