Show HN: Bastion – self-hosted VMs for background coding agents Bastion, an open-source orchestrator for running background coding agents on self-hosted Linux infrastructure, was released. Each agent runs in a separate Cloud Hypervisor VM with a reproducible dev environment, supporting declarative setup, prepared snapshots, and multi-node clustering. The tool aims to simplify scaling coding agents with VM-level isolation and direct access via SSH or a TUI. Self-hosted virtual computers for background coding agents. Website https://bastion.computer/ · Docs https://bastion.computer/introduction/ · Quick start https://bastion.computer/quick-start/ · Demo https://github.com/bastion-computer/bastion-demo · Discussions https://github.com/orgs/bastion-computer/discussions Bastion is an open-source orchestrator for running background coding agents on your own Linux infrastructure. Each agent runs in a separate Cloud Hypervisor https://www.cloudhypervisor.org/ VM with a reproducible dev environment. Define an environment in JSON, prepare it once as a snapshot, and create disposable VMs for parallel tasks. Bastion can run on a single KVM host or schedule environments across an optional multi-node cluster. Bastion makes it easy to scale background coding agents into reproducible environments. VM-level isolation: each environment has its own guest kernel, root filesystem, processes, and network. Declarative setup: define CPU, memory, disk, agents, service tunnels, and lifecycle actions in schema-validated JSON. Prepared snapshots: install dependencies during template creation, then replicate isolated copy-on-write environments from that prepared state. Direct access: connect through SSH, attach a local OpenCode TUI, or use bastion mux to move between persistent sessions. Conflict-free previews: expose dev servers on the guest VM through named tunnels for host side previews. Self-hosted control: start on one Linux machine, then add the cluster control plane when a single host is not enough. The host needs: - Linux on x86 64 - read/write access to /dev/kvm /dev/vhost-vsock for VM tunnel traffic- nested virtualization when the host is itself a VM curl -fsSL https://bastion.computer/install.sh | bash bastion system check bastion system init --with-utilities The installer adds the bastion CLI, guest proxy, and systemd services for the host API and privileged VM daemon. Release archives are also available from GitHub Releases https://github.com/bastion-computer/bastion/releases . cat template.json <<'JSON' { "resources": { "vcpu": 2, "memory": 2, "volume": 20 }, "agents": { "opencode": {} }, "actions": { "init": { "run": "mkdir -p /workspace && printf 'hello from Bastion\\n' /workspace/README.md" } } } JSON bastion templates create --key hello --file ./template.json Template creation boots a temporary VM, runs actions.init , and stores an immutable prepared root disk and VM snapshot. bastion env create --template-key hello --key agent-1 bastion ssh --key agent-1 -- cat /workspace/README.md bastion ssh --key agent-1 With OpenCode installed locally, attach its TUI to the server inside the environment: bastion opencode --key agent-1 Or open Bastion's tmux-based environment picker: bastion mux Clean up when finished: bastion env remove --key agent-1 bastion templates remove --key hello For a complete parallel-agent walkthrough, see the Bastion issue tracker demo https://github.com/bastion-computer/bastion-demo . It includes a Bun/TypeScript app, a reusable environment template, service previews, and five independent coding tasks. php flowchart LR Client "CLI / API client" -- API "Host API