Skip to content

Run usine on Windows

Run an instance in WSL2 on a Windows computer and open it from the Windows browser.

On Windows, usine runs in an Ubuntu distribution of WSL2, the Windows Subsystem for Linux. The instance uses the local worker, and you open its web UI from the Windows browser. Native Windows isn’t supported.

  • A Windows computer that meets the requirements on Microsoft’s Install WSL page.
  • An administrator account on the computer, for the WSL installation.
  • A GitHub account that can create and install a GitHub App.
  • One model login or API key, as listed in the quickstart prerequisites.
  1. Open PowerShell as an administrator and install WSL with its default distribution, Ubuntu:

    Terminal window
    wsl --install
  2. Restart Windows. When Ubuntu opens, create your Linux user name and password.

  3. In PowerShell, update WSL to its current release, then list the distributions:

    Terminal window
    wsl --update
    wsl --list --verbose

    Confirm that the list shows Ubuntu with VERSION 2.

Run every later command in the Ubuntu terminal unless the step says PowerShell.

The supervisor’s Docker Engine needs systemd. In Ubuntu, run:

Terminal window
systemctl is-system-running

The command prints running or degraded when systemd runs. If it prints anything else, add these lines to /etc/wsl.conf with sudo:

[boot]
systemd=true

Then run wsl --shutdown in PowerShell and open Ubuntu again. If you don’t configure a supervisor, you can skip this section.

Terminal window
sudo apt update && sudo apt install -y git curl

Install the GitHub CLI with the Debian and Ubuntu commands in GitHub’s Linux installation instructions.

Install nvm with the commands on Microsoft’s Node.js on WSL page, open a new Ubuntu terminal, and install Node.js 22:

Terminal window
nvm install 22
node --version

Confirm that node --version prints v22.22.0 or later. Ubuntu’s own nodejs package is older than usine needs.

WSL adds the Windows PATH to Ubuntu’s, so a Windows node or npm can answer instead of Ubuntu’s. Check each command:

Terminal window
command -v node npm git gh

Confirm that no printed path starts with /mnt/. Such a path is a Windows program, and a Windows npm installs usine and the harnesses for Windows.

Follow quickstart steps 1 to 4 in the Ubuntu terminal. They work unchanged: install the CLI and the harness, sign in to the harness, create the scratch repository, and write the bootstrap files.

Keep the instance folder at ~/usine-instance, in the Linux filesystem. usine up refuses a folder on a Windows drive, such as /mnt/c/Users/<name>/usine, and says why: on those drives, usine can’t keep its credential files at mode 0600, and its database isn’t safe.

Harness logins are separate too. usine reads ~/.claude, ~/.codex, and ~/.pi/agent in your Linux home directory, so a login that you saved in a Windows terminal doesn’t apply.

From ~/usine-instance, run:

Terminal window
usine up

usine prints usine is running in setup mode at http://127.0.0.1:7331 and a one-time sign-in link. If no browser opens, open the printed link in the Windows browser. WSL forwards the instance’s 127.0.0.1 port to Windows.

Use http://127.0.0.1:7331, not http://localhost:7331. The GitHub App’s callback URLs use 127.0.0.1, and usine refuses pages from another origin.

Follow step 6 of the quickstart in the Windows browser:

  • Connect Claude shows an authorization URL. Open it in the Windows browser, sign in, and paste the code into usine.
  • Connect ChatGPT shows a sign-in URL and a device code. Open the URL in the Windows browser and enter the code.
  • For Pi, run /login in the Ubuntu terminal. If the browser can’t return to Pi after you sign in, paste the final URL from the browser’s address bar into Pi.

WSL stops an idle distribution, and systemd doesn’t keep it running. Run usine in the foreground, as this guide does:

  • Leave the Ubuntu terminal that runs usine up open while runs are open.
  • Keep Windows awake while it’s on AC power. Sleep suspends WSL.
  • Before you close the terminal, stop usine with Ctrl+C, or run usine stop from ~/usine-instance in a second Ubuntu terminal. Otherwise WSL stops the distribution without a drain, and the next usine up reattaches the open attempts.
  • After Windows wakes from sleep, compare date -u in Ubuntu with the Windows clock. If they differ, run sudo hwclock -s.

For an always-on instance, host usine on a Linux server.

The supervisor runs each turn in a container on the orchestrator host. In WSL2, use Docker Engine installed in Ubuntu:

  1. Install Docker Engine with the commands on Docker’s Ubuntu installation page.

  2. Let your user run containers:

    Terminal window
    sudo usermod --append --groups docker "$USER"

    Members of the docker group control a daemon that runs as root, so your Linux user is then equivalent to root in Ubuntu.

  3. In PowerShell, restart the distribution so that the group applies:

    Terminal window
    wsl --terminate Ubuntu
  4. In a new Ubuntu terminal, check Docker and the cgroup hierarchy:

    Terminal window
    docker run --rm hello-world
    stat -fc %T /sys/fs/cgroup

    Confirm that the container prints its greeting and that stat prints cgroup2fs.

Don’t install Docker Engine in Ubuntu and Docker Desktop together: Docker says that running both can cause conflicts. Docker Desktop’s WSL integration isn’t tested with usine, and Docker Desktop’s Docker VMM can’t mount the instance’s source, which is in the Linux filesystem. See the supervisor’s host requirements.

No service manager runs this instance, so managed upgrades aren’t available. Follow Upgrade a global installation without a service manager.

  1. In a second Ubuntu terminal, from ~/usine-instance, run usine status. It reports the PID and the listener.

  2. After setup, run this command in PowerShell:

    Terminal window
    curl.exe --fail http://127.0.0.1:7331/api/ready

    It prints {"ok":true}.

  3. The web UI at http://127.0.0.1:7331 lists the project.

  • usine up did not start: ... is on the Windows drive: the instance folder is under /mnt/. Create it in your Linux home directory, such as ~/usine-instance, and run usine up there.
  • Setup refuses the page, or GitHub returns to a page that doesn’t load: open http://127.0.0.1:7331, not http://localhost:7331.
  • GitHub returned an installation token that is expired or exceeds the one-hour lifetime limit: Ubuntu’s clock is wrong, usually after Windows sleeps. Run sudo hwclock -s, and compare date -u with the Windows clock.
  • worker "local" failed its memory check: WSL2 gets half of the Windows memory by default, and each concurrent attempt needs 1.5 GiB. Raise memory in the [wsl2] section of %UserProfile%\.wslconfig, then run wsl --shutdown in PowerShell, or lower max_concurrent_attempts of the local worker.