Skip to content

Windows Golden Image Recipe

Booting a fresh Windows DevBox is slow: ClusterCode runs Windows as a full VM, and the unattended Windows install takes 20–30 minutes on first boot. Then you still have to install your toolchain — Node, Git, an editor, your AI CLIs — every single time.

This recipe fixes both in two levels: prepare a Windows DevBox by hand once, then snapshot it into a golden image so every future launch reaches a working desktop — with all your tools already installed — in seconds.

  • Level 1 — Prepare the machine. Launch a Windows DevBox, open its terminal, and install everything you want baked in. You do this once.
  • Level 2 — Bake the image. Snapshot that prepared DevBox into a reusable golden image. Every launch from it skips the Windows install and the tool install.

The payoff compounds: the slow parts (Windows first-boot, Chocolatey, npm globals) happen a single time, and are then frozen into the image.

  1. Launch a Windows DevBox. From Launch, pick a worker that supports Windows VMs, choose a Windows image (e.g. Windows Server 2022/2025), and start it. Wait for the first-boot install to finish — this is the slow, one-time part.

  2. Open the DevBox terminal. Once the desktop is up, open the DevBox terminal right from the ClusterCode console (the DevBoxes list). It opens a PowerShell session inside the guest, in your browser — you’ll land at a prompt as the developer user, no RDP or VNC needed.

Paste this entire block into the DevBox terminal in the ClusterCode console. It’s the exact, tested sequence we use to prepare a Windows golden image — Chocolatey, the base tools (Node.js, Git, VS Code, GitHub CLI), and the three AI coding agents (Claude Code, OpenAI Codex, and GitHub Copilot), including the PATH wiring that makes claude resolve. Paste it once and it sets up the whole machine.

Terminal window
# 1. Bootstrap Chocolatey (the package manager for the base tools)
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# 2. Install Node.js (LTS = Node 22+), Git, VS Code, and the GitHub CLI
choco install -y nodejs-lts git vscode gh
# 3. Refresh PATH in this session so node/npm/git resolve without reopening
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
# 4. Install Claude Code (native installer — standalone binary, no npm)
irm https://claude.ai/install.ps1 | iex
# 5. Add Claude Code's install dir (~/.local/bin) to the User PATH, permanently
$bin = "$env:USERPROFILE\.local\bin"
$userPath = [Environment]::GetEnvironmentVariable("Path","User")
if ($userPath -notlike "*$bin*") {
[Environment]::SetEnvironmentVariable("Path", "$userPath;$bin", "User")
}
$env:Path = [Environment]::GetEnvironmentVariable("Path","User") + ";" + [Environment]::GetEnvironmentVariable("Path","Machine")
# 6. Install the Codex and Copilot CLIs (npm globals)
npm install -g @openai/codex @github/copilot
# 7. Verify every tool resolves
node -v; npm -v; git --version; code --version; gh --version; codex --version; claude --version; copilot --version

The final line should print a version for each tool. If it does, this DevBox is ready to snapshot.

Once the verify line prints clean versions, you have a fully-loaded Windows DevBox. Everything from here is about never doing this again.

Level 2 — Snapshot it into a golden image

Section titled “Level 2 — Snapshot it into a golden image”

Now freeze that prepared DevBox into a reusable image. This is the standard Build an Image from a DevBox flow — see the full guide for details and validation limits.

  1. Open Create Image and select the From DevBox segment.

  2. Pick the same worker the DevBox is running on (images stay on the worker that builds them).

  3. Select your prepared DevBox as the source, give the image a name (e.g. windows-dev-golden), and submit.

  4. A Windows snapshot briefly stops the DevBox to capture a consistent disk, then bakes the post-install disk into the image. This takes a few minutes.

Because a snapshot lives on exactly one worker, the launch has to land on that worker — the target picker handles it.

  1. Open the launch flow and open the target picker.

  2. Select the worker that holds your golden image. This pins the launch to that worker.

  3. Pick your golden image — filter by name, tag, or capability.

  4. Launch.

The DevBox boots from the baked post-install disk, so it reaches a working desktop in seconds instead of 20–30 minutes — with Node, Git, VS Code, and your AI CLIs already installed and on PATH. Rebuild the golden image whenever your toolchain changes; day to day, you just launch from it.