aster.ax / Docs

Windows runners

A Windows machine can be a runner in two ways. A native Windows runner executes Windows commands through the host's job-object supervisor. A WSL runner executes Linux commands inside a WSL distribution, on the Linux backend.

Native Windows serves Exec when its host configuration includes the enrolled peer transport, which deployment writes. The Windows open profile runs with the host account's OS permissions and is not a sandbox, as the security model explains. The Windows host reference lists the native host's paths, configuration and limits.

Native Windows

Native Windows deployment installs and updates the ax CLI and the host that serves messaging and native Windows execution. You run it from a Linux or macOS owner machine. Deployment then takes these steps, and you edit no configuration, run no separate enrollment command and start no task yourself:

  1. It generates the host identity on the Windows machine.
  2. It writes the host's complete private configuration, including the enrolled peer transport.
  3. It registers and starts the ax-host task.
  4. It publishes the root-signed caller grant.
  5. It proves execution with an authenticated cmd.exe diagnostic.

No signed Windows release is published, so a Windows deployment always needs a bundle built on Windows. On the Windows machine, prepare it from a working ax installation:

ax deploy bundle --out ./ax-win-bundle

Transfer the bundle directory to the owner machine you deploy from, and pass it to the deployment.

ax deploy ssh user@windows-host --name build --bundle ./ax-win-bundle/manifest.json

When the deployment finishes, run a job on the new host by its saved name:

ax exec run --host build -- cmd.exe /C echo Hello

Paths, the full configuration and merge rules, the task definition, identity separation and limitations are on the Windows host reference.

Upgrade by redeploying with ax deploy ssh. ax undeploy ssh HOST stops and unregisters the managed task. See Remove an installation.

Remove a native Windows installation

Remove an installation describes the removal command and its options.

On Windows, removal stops and unregisters the deploy-managed ax-host task and stops the host process serving the configured server.json. Stopping the owned task's host is part of undeploying it.

Removal takes the provisioning lock, so it cannot run in the middle of a deployment. A crashed deployment or removal does not block later runs, because removal takes over a lock in some cases:

Lock owner record Removal
The owner process is dead, or its PID was reused Takes the lock over
No owner record, and the lock is older than an hour Takes the lock over
The owner process still exists, with a matching creation time or with none recorded Never takes the lock over, whatever its age
The owner process is live, but its creation time cannot be read Treats the owner as unverifiable and is blocked in the same way
The record is present but unreadable, malformed or shared Refuses in place, and never takes the lock over by age

A wedged but live owner blocks removal until that process is stopped. Remove its lock by hand only after you have confirmed the process is gone. For an unreadable, malformed or shared record, inspect it, and remove it by hand only once the provisioning process is confirmed gone. In both cases the lock fails closed.

WSL runners

A WSL runner executes Linux commands. To install the CLI on Windows itself, use the native Windows build. See Native Windows.

For a Windows OpenSSH endpoint that dispatches commands into WSL Bash, select that transport explicitly:

ax deploy ssh wsl-host --wsl-dispatcher --name wsl-build --bundle ./ax-linux-bundle/manifest.json
ax undeploy ssh wsl-host --wsl-dispatcher --plan

--wsl-dispatcher keeps the SSH command the same size every time. It sends a Bash loader, then a length-framed encoded command on stdin, then any binary data. It applies to probes, installation, provisioning and removal. A failed WSL probe is an error, and ax never falls back to a native Windows installation. For a Linux sshd running inside WSL, use an ordinary deployment instead.

Keep the distribution running

Windows must also keep the distribution alive after SSH disconnects. From an ax checkout, as the Windows user who owns the distribution, run the supplied script:

powershell.exe -NoProfile -File .\scripts\wsl-runner.ps1 -Action Install -Distribution Ubuntu
powershell.exe -NoProfile -File .\scripts\wsl-runner.ps1 -Action Status -Distribution Ubuntu

The script registers a task named ax-wsl-runner-Ubuntu and starts it immediately. The task starts again at that user's logon and runs wsl.exe --distribution Ubuntu --exec /bin/sleep infinity with the user's interactive token and limited privileges. It stores no password, has no time limit, and retries three times at one-minute intervals. Installing it again leaves a running task alone, and a conflicting task is refused. -TaskName selects a different managed task name.

The task keeps the distribution available after the user logs on. After a Windows reboot, it is not available until that logon. It does not make running jobs survive a Windows reboot or a WSL shutdown.

After deployment, close the SSH session. Verify the runner with ax exec info wsl-build and an ordinary ax job. The runner's Linux service reports give the WSL distribution as their boot scope, and say when the Windows keepalive task is required.

Remove the keepalive task

After you undeploy the runner, remove its task on Windows:

powershell.exe -NoProfile -File .\scripts\wsl-runner.ps1 -Action Remove -Distribution Ubuntu

Removal stops only the managed keepalive task. It never terminates the WSL distribution or other jobs. Install and remove the task with the same Windows account, distribution and task name.

Next steps