vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
| 1 | # Deploy on Windows |
| 2 | |
| 3 | !!! warning "The MSI is not Authenticode-signed" |
| 4 | Windows shows an unknown-publisher prompt. Check the download against the |
| 5 | release's GPG-signed `SHA256SUMS` instead of trusting the prompt. |
| 6 | Authenticode and winget are tracked in |
| 7 | [#408](https://rodent.software/vole/n/408). |
| 8 | |
| 9 | ## Requirements |
| 10 | |
| 11 | - Windows Server 2019 or later, or Windows 10/11, `amd64`. |
| 12 | - **Git for Windows** with `git.exe` on the machine `PATH`. The server shells out |
| 13 | to git for every push, clone, and metadata write, and the install initializes |
| 14 | the instance, so nothing works without it. |
| 15 | - A DNS name such as `forge.example.com` if you want HTTPS. |
| 16 | - An elevated PowerShell. |
| 17 | |
| 18 | ## 1. Install the package |
| 19 | |
| 20 | Run the install script from an elevated PowerShell: |
| 21 | |
| 22 | ```powershell |
| 23 | Invoke-WebRequest https://rodent.software/vole/channels/stable/install.ps1 -OutFile install.ps1 |
| 24 | .\install.ps1 |
| 25 | ``` |
| 26 | |
| 27 | `-Version v0.2.0` installs a pinned release, `-Channel` follows another channel, |
| 28 | and `-DryRun` prints the plan without changing anything. To install the MSI |
| 29 | directly, download `vole-windows-amd64.msi` from the |
| 30 | [stable channel](https://rodent.software/vole/channels/stable) and run it with |
| 31 | `msiexec /i`. |
| 32 | |
| 33 | The installer does the part a service needs: |
| 34 | |
| 35 | | What | Where | |
| 36 | |---|---| |
| 37 | | Binary | `C:\Program Files\Vole\vole.exe`, with `LICENSE` and `NOTICE` beside it | |
| 38 | | Service | `Vole`, running as the virtual account `NT SERVICE\Vole` | |
| 39 | | Configuration | `%ProgramData%\Vole\vole.toml`, written with a documented default when absent | |
| 40 | | Data | the `data_dir` that configuration names, `%ProgramData%\Vole\data` by default | |
| 41 | | Log | `<data_dir>\logs\serve.log` | |
| 42 | | Event Log | source `Vole` in the Application log, for start and stop failures | |
| 43 | |
| 44 | It registers the service to start automatically after a short delay, creates the |
| 45 | instance database and instance repository if they are not there, gives the |
| 46 | service account access to the data, log, and configuration, and starts the |
| 47 | service. It does not create an administrator: who administers the instance is |
| 48 | your decision, not the package's. |
| 49 | |
| 50 | The configuration and the data are not package files. Uninstalling removes the |
| 51 | service and the binary and leaves both in place. |
| 52 | |
| 53 | ## 2. Configure |
| 54 | |
| 55 | Edit `%ProgramData%\Vole\vole.toml` and restart the service: |
| 56 | |
| 57 | ```powershell |
| 58 | & "C:\Program Files\Vole\vole.exe" service stop |
| 59 | notepad "$env:ProgramData\Vole\vole.toml" |
| 60 | & "C:\Program Files\Vole\vole.exe" service start |
| 61 | ``` |
| 62 | |
| 63 | The default serves `http://127.0.0.1:8080` and SSH on `0.0.0.0:2222`. To serve |
| 64 | the forge itself, set `public_url` and `https_addr`: |
| 65 | |
| 66 | ```toml |
| 67 | data_dir = 'C:\ProgramData\Vole\data' |
| 68 | http_addr = ":80" |
| 69 | https_addr = ":443" |
| 70 | public_url = "https://forge.example.com" |
| 71 | acme_email = "you@example.com" |
| 72 | ssh_addr = "0.0.0.0:2222" |
| 73 | ``` |
| 74 | |
| 75 | Windows has no privileged ports, so binding 80 and 443 needs no capability |
| 76 | change. ACME needs the DNS name to resolve to this machine and port 80 reachable |
| 77 | from the internet. Leave `ssh_listen` at its default `"tcp"`: the sshd front door |
| 78 | is unix-only for now, and clone URLs therefore carry `:2222`. |
| 79 | |
| 80 | ## 3. Create the first administrator |
| 81 | |
| 82 | Run this in the elevated session. The data files name only the service account, |
| 83 | `SYSTEM`, and `Administrators`, so an unelevated prompt cannot read them even if |
| 84 | you are an administrator. |
| 85 | |
| 86 | ```powershell |
| 87 | $cfg = "$env:ProgramData\Vole\vole.toml" |
| 88 | & "C:\Program Files\Vole\vole.exe" admin --config $cfg account create admin ` |
| 89 | --key "$env:USERPROFILE\.ssh\id_ed25519.pub" --role admin |
| 90 | ``` |
| 91 | |
| 92 | Further administration can run from your own machine over the instance's SSH |
| 93 | listener: |
| 94 | |
| 95 | ```sh |
| 96 | vole admin --remote ssh://git@forge.example.com:2222 account invite admin |
| 97 | vole admin --remote ssh://git@forge.example.com:2222 repo create demo |
| 98 | ``` |
| 99 | |
| 100 | ## 4. Open the firewall |
| 101 | |
| 102 | The installer does not change firewall rules, the same way the Linux package |
| 103 | leaves your sshd alone. |
| 104 | |
| 105 | ```powershell |
| 106 | foreach ($p in 80, 443, 2222) { |
| 107 | New-NetFirewallRule -Name "vole-$p" -DisplayName "Vole $p" ` |
| 108 | -Direction Inbound -Protocol TCP -LocalPort $p -Action Allow |
| 109 | } |
| 110 | ``` |
| 111 | |
| 112 | Keep port 80 open for HTTP-01 certificate renewal. Vole's built-in SSH listener |
| 113 | uses 2222; the sshd front door is not supported on Windows. |
| 114 | |
| 115 | ## 5. Verify |
| 116 | |
| 117 | ```powershell |
| 118 | & "C:\Program Files\Vole\vole.exe" version |
| 119 | curl.exe -sS -o NUL -w "%{http_code}`n" https://forge.example.com/ |
| 120 | & "C:\Program Files\Vole\vole.exe" service status |
| 121 | Get-Content "$env:ProgramData\Vole\data\logs\serve.log" -Tail 20 |
| 122 | ``` |
| 123 | |
| 124 | The HTTP check should print `200`, and the service should report `Running`. |
| 125 | |
| 126 | Then clone something from your own machine: |
| 127 | |
| 128 | ```sh |
| 129 | git clone ssh://git@forge.example.com:2222/demo.git |
| 130 | ``` |
| 131 | |
| 132 | ## MSI behavior |
| 133 | |
| 134 | The MSI is built with wixl because WiX refuses to build anywhere but Windows and |
| 135 | the release runs on Linux. Its limits shape the package: it cannot preserve files |
| 136 | across an uninstall, edit `PATH`, or schedule rollback actions, so the |
| 137 | configuration and data directory belong to `vole service install` instead of the |
| 138 | package. |
| 139 | |
| 140 | The MSI registers the `Vole` service by running `vole service install`, so the |
| 141 | account, recovery actions, and command line are the same for an MSI, |
| 142 | `install.ps1`, and a hand-run install. Uninstall stops and deletes the service |
| 143 | before the files go, and leaves the configuration and instance data in place. |
| 144 | |
| 145 | Upgrading is installing a newer MSI. Pre-release tags have no MSI, because an MSI |
| 146 | version cannot carry a pre-release suffix; those releases publish the Windows |
| 147 | binary only. |
| 148 | |
| 149 | ## Upgrading |
| 150 | |
| 151 | Install the newer MSI, or run `install.ps1` again; there is no separate upgrade |
| 152 | command. |
| 153 | |
| 154 | ```powershell |
| 155 | .\install.ps1 -Version v0.2.1 |
| 156 | ``` |
| 157 | |
| 158 | The old product is removed before the new files are copied, so the running |
| 159 | service is stopped before its executable would be locked, and then the new |
| 160 | version is installed, initialized, and started. The configuration and the data |
| 161 | are untouched, and database migrations run on start. Back up before upgrading: |
| 162 | [back up an instance](../backup-and-restore.md#back-up-an-instance). |
| 163 | |
| 164 | A pre-release tag has no MSI — an MSI version cannot carry a pre-release suffix |
| 165 | here — so those releases publish the Windows binary only. Install one as |
| 166 | described below. |
| 167 | |
| 168 | ## From a binary |
| 169 | |
| 170 | For a pre-release, a build from a checkout, or a machine without the package: |
| 171 | |
| 172 | ```powershell |
| 173 | New-Item -ItemType Directory -Force 'C:\Program Files\Vole' | Out-Null |
| 174 | Copy-Item .\vole.exe 'C:\Program Files\Vole\vole.exe' |
| 175 | & "C:\Program Files\Vole\vole.exe" service install |
| 176 | & "C:\Program Files\Vole\vole.exe" service start |
| 177 | ``` |
| 178 | |
| 179 | `service install` with no `--config` writes the documented default to |
| 180 | `%ProgramData%\Vole\vole.toml`, initializes the instance, registers the service, |
| 181 | and gives the service account access to the files. `service uninstall` stops and |
| 182 | removes it and leaves the configuration and data alone. The same commands are |
| 183 | what the MSI runs. |
| 184 | |
| 185 | ## What is not supported yet |
| 186 | |
| 187 | !!! warning "Windows is a server and client, not a runner" |
| 188 | Container jobs need a container runtime; Windows containers and WSL2 are a |
| 189 | different architecture rather than a port. The forge serves repositories and |
| 190 | queues nothing it cannot build elsewhere. |
| 191 | |
| 192 | - **Authenticode signing and winget.** The MSI is unsigned, and there is no |
| 193 | package-manager entry yet; see |
| 194 | [#408](https://rodent.software/vole/n/408). arm64 is not built. |
| 195 | |
| 196 | ## Put sshd in front of Vole |
| 197 | |
| 198 | Not supported on Windows: the front door needs a Unix-domain socket, `exec`, and |
| 199 | file modes. Keep `ssh_listen = "tcp"` and the built-in listener on 2222. A |
| 200 | separate Linux host runs the CI runner. |
| 201 | |
| 202 | ## CI runners on Windows |
| 203 | |
| 204 | The Windows package does not include the CI runner. Run CI on a separate Linux |
| 205 | machine; see [Set up a runner on Linux](linux.md#set-up-a-runner-on-linux). |
| 206 | |
| 207 | ## Windows troubleshooting |
| 208 | |
| 209 | - **The service did not start.** `vole service status` prints its state and |
| 210 | command line, and the Application event log has the error under source |
| 211 | `Vole`. Running the printed command in an elevated console shows the same |
| 212 | failure on stderr. |
| 213 | - **The install failed.** `install.ps1` prints the Windows Installer log's path. |
| 214 | For a direct MSI install, add `/l*v install.log` and read that file; the |
| 215 | failing custom action is the one named `ServiceInstall`. If the service was |
| 216 | registered by hand before, remove it first with `vole service uninstall`: the |
| 217 | package installs the service with the same command, which refuses to replace |
| 218 | an existing registration. |
| 219 | - **`access is denied` on the data directory.** Something changed the files' |
| 220 | access lists after the install. Re-run `service install` to rewrite them, or |
| 221 | compare with `Get-Acl`. |
| 222 | - **Git operations fail.** `git.exe` is not on the machine `PATH`. Services read |
| 223 | the machine environment, not a user's. |
| 224 | |
| 225 | ## Next |
| 226 | |
| 227 | - [Deploy on macOS](macos.md) — Homebrew and launchd. |
| 228 | - [Runners](../runner.md) — a runner needs a Linux host. |
| 229 | - [MSI behavior](#msi-behavior) — the package layout and upgrade path. |
| 230 |