Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
source preview history blame raw 8.7 KiB

Deploy on Windows

!!! warning “The MSI is not Authenticode-signed” Windows shows an unknown-publisher prompt. Check the download against the release’s GPG-signed SHA256SUMS instead of trusting the prompt. Authenticode and winget are tracked in [#408](https://rodent.software/vole/n/408).

Requirements

  • Windows Server 2019 or later, or Windows 10/11, amd64.
  • Git for Windows with git.exe on the machine PATH. The server shells out to git for every push, clone, and metadata write, and the install initializes the instance, so nothing works without it.
  • A DNS name such as forge.example.com if you want HTTPS.
  • An elevated PowerShell.

1. Install the package

Run the install script from an elevated PowerShell:

Invoke-WebRequest https://rodent.software/vole/channels/stable/install.ps1 -OutFile install.ps1
.\install.ps1

-Version v0.2.0 installs a pinned release, -Channel follows another channel, and -DryRun prints the plan without changing anything. To install the MSI directly, download vole-windows-amd64.msi from the stable channel and run it with msiexec /i.

The installer does the part a service needs:

What Where
Binary C:\Program Files\Vole\vole.exe, with LICENSE and NOTICE beside it
Service Vole, running as the virtual account NT SERVICE\Vole
Configuration %ProgramData%\Vole\vole.toml, written with a documented default when absent
Data the data_dir that configuration names, %ProgramData%\Vole\data by default
Log <data_dir>\logs\serve.log
Event Log source Vole in the Application log, for start and stop failures

It registers the service to start automatically after a short delay, creates the instance database and instance repository if they are not there, gives the service account access to the data, log, and configuration, and starts the service. It does not create an administrator: who administers the instance is your decision, not the package’s.

The configuration and the data are not package files. Uninstalling removes the service and the binary and leaves both in place.

2. Configure

Edit %ProgramData%\Vole\vole.toml and restart the service:

& "C:\Program Files\Vole\vole.exe" service stop
notepad "$env:ProgramData\Vole\vole.toml"
& "C:\Program Files\Vole\vole.exe" service start

The default serves http://127.0.0.1:8080 and SSH on 0.0.0.0:2222. To serve the forge itself, set public_url and https_addr:

data_dir = 'C:\ProgramData\Vole\data'
http_addr  = ":80"
https_addr = ":443"
public_url = "https://forge.example.com"
acme_email = "you@example.com"
ssh_addr = "0.0.0.0:2222"

Windows has no privileged ports, so binding 80 and 443 needs no capability change. ACME needs the DNS name to resolve to this machine and port 80 reachable from the internet. Leave ssh_listen at its default "tcp": the sshd front door is unix-only for now, and clone URLs therefore carry :2222.

3. Create the first administrator

Run this in the elevated session. The data files name only the service account, SYSTEM, and Administrators, so an unelevated prompt cannot read them even if you are an administrator.

$cfg = "$env:ProgramData\Vole\vole.toml"
& "C:\Program Files\Vole\vole.exe" admin --config $cfg account create admin `
    --key "$env:USERPROFILE\.ssh\id_ed25519.pub" --role admin

Further administration can run from your own machine over the instance’s SSH listener:

vole admin --remote ssh://git@forge.example.com:2222 account invite admin
vole admin --remote ssh://git@forge.example.com:2222 repo create demo

4. Open the firewall

The installer does not change firewall rules, the same way the Linux package leaves your sshd alone.

foreach ($p in 80, 443, 2222) {
    New-NetFirewallRule -Name "vole-$p" -DisplayName "Vole $p" `
        -Direction Inbound -Protocol TCP -LocalPort $p -Action Allow
}

Keep port 80 open for HTTP-01 certificate renewal. Vole’s built-in SSH listener uses 2222; the sshd front door is not supported on Windows.

5. Verify

& "C:\Program Files\Vole\vole.exe" version
curl.exe -sS -o NUL -w "%{http_code}`n" https://forge.example.com/
& "C:\Program Files\Vole\vole.exe" service status
Get-Content "$env:ProgramData\Vole\data\logs\serve.log" -Tail 20

The HTTP check should print 200, and the service should report Running.

Then clone something from your own machine:

git clone ssh://git@forge.example.com:2222/demo.git

MSI behavior

The MSI is built with wixl because WiX refuses to build anywhere but Windows and the release runs on Linux. Its limits shape the package: it cannot preserve files across an uninstall, edit PATH, or schedule rollback actions, so the configuration and data directory belong to vole service install instead of the package.

The MSI registers the Vole service by running vole service install, so the account, recovery actions, and command line are the same for an MSI, install.ps1, and a hand-run install. Uninstall stops and deletes the service before the files go, and leaves the configuration and instance data in place.

Upgrading is installing a newer MSI. Pre-release tags have no MSI, because an MSI version cannot carry a pre-release suffix; those releases publish the Windows binary only.

Upgrading

Install the newer MSI, or run install.ps1 again; there is no separate upgrade command.

.\install.ps1 -Version v0.2.1

The old product is removed before the new files are copied, so the running service is stopped before its executable would be locked, and then the new version is installed, initialized, and started. The configuration and the data are untouched, and database migrations run on start. Back up before upgrading: back up an instance.

A pre-release tag has no MSI — an MSI version cannot carry a pre-release suffix here — so those releases publish the Windows binary only. Install one as described below.

From a binary

For a pre-release, a build from a checkout, or a machine without the package:

New-Item -ItemType Directory -Force 'C:\Program Files\Vole' | Out-Null
Copy-Item .\vole.exe 'C:\Program Files\Vole\vole.exe'
& "C:\Program Files\Vole\vole.exe" service install
& "C:\Program Files\Vole\vole.exe" service start

service install with no --config writes the documented default to %ProgramData%\Vole\vole.toml, initializes the instance, registers the service, and gives the service account access to the files. service uninstall stops and removes it and leaves the configuration and data alone. The same commands are what the MSI runs.

What is not supported yet

!!! warning “Windows is a server and client, not a runner” Container jobs need a container runtime; Windows containers and WSL2 are a different architecture rather than a port. The forge serves repositories and queues nothing it cannot build elsewhere.

Put sshd in front of Vole

Not supported on Windows: the front door needs a Unix-domain socket, exec, and file modes. Keep ssh_listen = "tcp" and the built-in listener on 2222. A separate Linux host runs the CI runner.

CI runners on Windows

The Windows package does not include the CI runner. Run CI on a separate Linux machine; see Set up a runner on Linux.

Windows troubleshooting

  • The service did not start. vole service status prints its state and command line, and the Application event log has the error under source Vole. Running the printed command in an elevated console shows the same failure on stderr.
  • The install failed. install.ps1 prints the Windows Installer log’s path. For a direct MSI install, add /l*v install.log and read that file; the failing custom action is the one named ServiceInstall. If the service was registered by hand before, remove it first with vole service uninstall: the package installs the service with the same command, which refuses to replace an existing registration.
  • access is denied on the data directory. Something changed the files' access lists after the install. Re-run service install to rewrite them, or compare with Get-Acl.
  • Git operations fail. git.exe is not on the machine PATH. Services read the machine environment, not a user’s.

Next