Windows Build Machine
This sets up a Windows 10 or 11 (x64) machine, physical or a VM, with only what is needed to build the rotki backend and the Electron installer, sign the installer, run the Python, Rust and frontend tests, and run rotki in development mode.
There is no Visual Studio IDE. The native toolchain comes from the standalone Build Tools for Visual Studio, which installs the MSVC compiler, linker and the Windows SDK without the editor.
These steps were checked end to end on a fresh Windows 10 Pro 22H2 VM with Build Tools 2026.
Windows 10
Windows 10 left mainstream support in October 2025. Microsoft supports Visual Studio 2026 on Windows 10 only with Extended Security Updates installed. It installs and works without them, but for a supported combination on Windows 10 use Build Tools 2022 (see Install the tools).
What each tool is for
| Tool | Needed for |
|---|---|
| Git for Windows | The checkout |
GitHub CLI (gh) | Downloading and uploading release assets when signing |
| Build Tools: MSVC x64 tools | link.exe and cl.exe for the x86_64-pc-windows-msvc Rust target, the C parts of SQLCipher and the vendored OpenSSL, and node-gyp's rebuild of Electron's native modules |
| Build Tools: Windows SDK | rc.exe, which embeds the icon and version info in colibri.exe and starling.exe, and signtool.exe |
| Strawberry Perl | OpenSSL's Configure script. The Perl that comes with Git fails on it with Number found where operator expected |
| rustup | The toolchain pinned in rust-toolchain.toml |
| uv | Free-threaded Python 3.14 (3.14t) and the project virtual environment. The same interpreter also serves node-gyp |
fnm, Node (version in frontend/.nvmrc) and pnpm (version in frontend/package.json) | The frontend, Electron and electron-builder |
| YubiKey Smart Card Minidriver | Only for signing: exposes the code signing certificate on a YubiKey to signtool |
Nothing else is required. NSIS comes with electron-builder, and package.py installs PyInstaller itself.
Windows settings
In an elevated PowerShell, enable long paths:
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Value 1 -PropertyType DWORD -ForceThis switch alone is not enough. It only applies to programs that declare themselves long path aware, and parts of the toolchain (MSVC's link.exe and cl.exe, cmd.exe, some node-gyp and Perl steps) do not. Builds can still fail with path errors from a checkout under C:\Users\<name>\..., so this guide clones into the short path C:\dev\rotki.
Let local scripts such as packaging\*.ps1 run:
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedOptionally, on a dedicated build machine only, exclude the checkout from Defender's real-time scan. It speeds up builds and keeps Defender from quarantining fresh PyInstaller output:
Add-MpPreference -ExclusionPath 'C:\dev'Install the tools
winget comes with the App Installer package, but a fresh Windows 10 22H2 install ships an App Installer too old to include it, and winget is "not recognized" until the Microsoft Store updates itself. To get it without the Store, run these in an elevated PowerShell at the console. Repair-WinGetPackageManager fails over SSH with "Access is denied ... reading the console output".
Install-PackageProvider -Name NuGet -Force
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery
Repair-WinGetPackageManager -AllUsers -LatestOpen a new terminal, check winget --version, then install the tools:
winget install --id Git.Git -e
winget install --id GitHub.cli -e
winget install --id StrawberryPerl.StrawberryPerl -e
winget install --id Rustlang.Rustup -e
winget install --id astral-sh.uv -e
winget install --id Schniz.fnm -eInstall the Build Tools with only the C++ x64 toolchain and a Windows SDK, instead of the whole "Desktop development with C++" workload. Build Tools 2026 is the recommended version. Its winget id has no year in it:
winget install --id Microsoft.VisualStudio.BuildTools -e --override "--passive --wait --norestart --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100"If 2026 is not offered, fails to install, or you want a Microsoft-supported setup on Windows 10 without Extended Security Updates, install Build Tools 2022 with the same components instead:
winget install --id Microsoft.VisualStudio.2022.BuildTools -e --override "--passive --wait --norestart --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows11SDK.26100"winget search BuildTools lists the versions on offer. The Windows 11 SDK builds and signs for Windows 10 as well. If the installer rejects a component id, open Visual Studio Installer, choose Modify, and under Individual components tick the MSVC x64/x86 build tools and the newest Windows 11 SDK. To check what got installed:
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -products * -format text | Select-String 'displayName|installationVersion'You do not need the "Developer PowerShell" prompt: rustc finds MSVC by itself, and the signing scripts find signtool.exe under Windows Kits\10\bin.
For signing with a YubiKey, also install the YubiKey Smart Card Minidriver:
winget install --id Yubico.YubiKeySmartCardMinidriver -eClose and reopen the terminal so the new PATH entries load.
Set up fnm
Add fnm's hook to the PowerShell profile so it switches Node per directory, then reopen the terminal:
if (-not (Test-Path $PROFILE)) { New-Item -Path $PROFILE -ItemType File -Force }
Add-Content $PROFILE 'fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression'Without fnm: official Node.js
If you would rather not use fnm, install the exact Node version from frontend\.nvmrc with the official installer from nodejs.org, checked against Node's published SHA256 sums. winget cannot do this, because its Node.js packages do not carry every patch release. Run this after cloning, from C:\dev\rotki, in an elevated PowerShell:
$v = (Get-Content .\frontend\.nvmrc -Raw).Trim(); $msi = "node-$v-x64.msi"; $ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest "https://nodejs.org/dist/$v/$msi" -OutFile "$env:TEMP\$msi" -UseBasicParsing
Invoke-WebRequest "https://nodejs.org/dist/$v/SHASUMS256.txt" -OutFile "$env:TEMP\SHASUMS256.txt" -UseBasicParsing
$expected = ((Get-Content "$env:TEMP\SHASUMS256.txt") -match " $msi$" -split '\s+')[0]
if ((Get-FileHash "$env:TEMP\$msi" -Algorithm SHA256).Hash -ne $expected) { throw 'SHA256 mismatch, do not install' }
Start-Process msiexec.exe -ArgumentList '/i', "`"$env:TEMP\$msi`"", '/qn', '/norestart' -WaitIt installs Node with corepack to C:\Program Files\nodejs and adds it to the system PATH, so open a new terminal afterwards. Skip the fnm hook above and the fnm install and fnm use steps below. Run it again whenever .nvmrc changes.
Check the toolchain
git --version; gh --version; perl -v | Select-String 'This is perl'; uv --version; fnm --version; rustup --version
where.exe perlwhere.exe perl must list C:\Strawberry\perl\bin\perl.exe first. With Git's default install options it is the only one. If you installed Git with "Use Git and optional Unix tools from the Command Prompt", Git's Perl may come first: move Strawberry Perl above Git in the system PATH. package.py and the development scripts fix the order for cargo themselves, but a manual cargo build does not.
Clone and prepare the repository
git config --global core.autocrlf false
git config --global core.longpaths true
New-Item -ItemType Directory -Force C:\dev
git clone https://github.com/rotki/rotki.git C:\dev\rotki
cd C:\dev\rotkiThe repository forces LF line endings through .gitattributes, and core.autocrlf false keeps Git from fighting it.
Rust
rustup toolchain install --no-self-update
cargo fetch --lockedPython
The develop branch uses free-threaded Python 3.14 (3.14t), like CI:
uv python install 3.14t
uv venv --python 3.14t
uv sync --lockedThis should print False, confirming the free-threaded build:
uv run python -c "import sys; print(sys._is_gil_enabled())"uv python install warns that .local\bin is not on PATH. Nothing here needs it.
A Python for node-gyp
The frontend install rebuilds two native modules for Electron with node-gyp, which needs a Python. On a clean machine the only python on PATH is the Microsoft Store stub, and pnpm install fails with gyp ERR! find Python and node-gyp failed to rebuild ... bufferutil. Point node-gyp at uv's interpreter through the PYTHON user variable. Run it from outside the repository, so uv reports the managed interpreter and not the virtual environment:
cd $HOME
[Environment]::SetEnvironmentVariable('PYTHON', (uv python find --system 3.14t), 'User')Open a new terminal so it picks up the variable.
Frontend
cd C:\dev\rotki\frontend
fnm install
fnm use
corepack enable
pnpm install --frozen-lockfileWith official Node.js instead of fnm, leave out fnm install and fnm use.
fnm install and fnm use read frontend\.nvmrc, which exists only in frontend\. corepack picks the pnpm version pinned in frontend\package.json. The Node version that fnm use selects belongs to the current terminal, so run the build from the same terminal, or cd frontend again in a new one.
Build an unsigned installer
From the repository root, as the release workflow does:
uv sync --locked --no-dev --group packaging
uv run --no-sync .\package.py --build fullThe output lands in dist\: the NSIS installer rotki-win32_x64-v<version>.exe with its .sha512 and .blockmap, the standalone backend rotki-core-<version>-windows.zip with its .sha512, and latest.yml. A cold full build takes about 20 minutes on 6 cores. electron-builder logs "no code signing certificate configured, signing is skipped" for every binary, which is expected: signing is a separate step.
Useful options:
--build backendbuilds only rotki-core, colibri and starling.--cleanwipes the build directory first.--debug-symbolskeeps debug info in the Rust binaries, for symbolizing crashes. Use it for test builds only.
uv sync --no-dev removes the development tools from the virtual environment. Run uv sync --locked again before going back to tests or development mode.
Sign
The release signing flow downloads the unsigned installer from the draft release, signs it with the YubiKey and uploads it again. It is described in packaging/SIGNING.md and automated by packaging\sign-release.ps1. Both use gh, so authenticate once first:
gh auth loginSign at the machine's console, not over SSH: the YubiKey's certificate only appears in the certificate store of an interactive session, and signtool asks for the PIN in a Windows dialog. With the YubiKey plugged in, check that Windows sees the certificate:
Get-ChildItem Cert:\CurrentUser\My -CodeSigningCertIf the list is empty, the minidriver is not installed (or the key was plugged in before it was installed, so replug it), or the Certificate Propagation service (CertPropSvc), which copies smart card certificates into the user store, is not running.
To rehearse the whole step without touching a release, run simple-sign.ps1 on a copy of a local build renamed to a release file name. It signs twice (SHA1, then SHA256 appended), timestamps both signatures, stops unless signtool verify /pa passes, and writes a rotki-<version>-signed folder with the signed installer, its .sha512 and latest.yml:
New-Item -ItemType Directory -Force C:\signtest | Out-Null
Copy-Item (Get-ChildItem .\dist\rotki-win32_x64-*.exe | Select-Object -First 1).FullName C:\signtest\rotki-win32_x64-v1.0.0.exe
.\packaging\simple-sign.ps1 -FilePath C:\signtest\rotki-win32_x64-v1.0.0.exeDelete C:\signtest afterwards, since it holds a properly signed development build.
simple-sign.ps1 only accepts release file names (rotki-win32_x64-vX.Y.Z.exe). To sign a local development build, whose version has a .devN+g<sha> suffix, call signtool directly:
$signtool = (Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\signtool.exe" | Sort-Object FullName -Descending | Select-Object -First 1).FullName
& $signtool sign /a /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /v .\dist\rotki-win32_x64-v<version>.exe
& $signtool verify /pa /v .\dist\rotki-win32_x64-v<version>.exe/a picks the code signing certificate from the store by itself.
Rehearse without the YubiKey
A throwaway self-signed certificate is enough to try the commands. verify then fails only with "terminated in a root certificate which is not trusted", which is expected. Remove the certificate afterwards:
$cert = New-SelfSignedCertificate -Type CodeSigningCert -Subject 'CN=rotki signing test' -CertStoreLocation Cert:\CurrentUser\My
Remove-Item "Cert:\CurrentUser\My\$($cert.Thumbprint)"Test
If you built the installer, restore the development tools first with uv sync --locked.
Rust
These are the Windows-only tests CI runs:
cargo test -p starling-core --locked --test windows_lifecycleThe process tree test needs a PyInstaller fixture bundle first. Use the PyInstaller version that package.py uses (PYINSTALLER_VERSION near the top of the file):
uv run --no-sync --with pyinstaller==<version> pyinstaller --onedir --noconfirm --clean --name fake_bootloader_pyi --distpath target/pyi/dist --workpath target/pyi/build --specpath target/pyi crates/starling-core/tests/support/fake_bootloader.py
cargo test -p starling-core --locked --test process_tree_python_bundle -- --ignoredRun windows_lifecycle from a plain console window, not inside an IDE terminal: it sends Ctrl+C to a process group, and a regression there takes the whole console down.
Python
The network tests replay VCR cassettes from the test-caching repository, which the test fixtures clone into %LOCALAPPDATA%\rotki\test-caching on first use. With -n, every pytest-xdist worker tries that clone at once, so on a fresh machine the first parallel run ends in hundreds of setup errors. Make the first run serial, for example with one test file that uses cassettes:
uv run pytest rotkehlchen/tests/unit/decoders/test_ens.py -qAfter that, parallel runs work:
uv run pytest rotkehlchen/tests/unit -n 4 -qSee Python Code Testing for more.
Frontend
cd frontend
pnpm run test:unitNode on Windows takes its locale from the region set in Windows, and a few tests expect US English date formats. If date formatting tests fail on a machine set to another region, that is the cause.
For end-to-end tests, install the Playwright browser once, then run them:
pnpm --filter rotki exec playwright install chromium
pnpm run test:e2eRun and debug
From frontend\, development mode syncs the Python dependencies, builds the Rust services with cargo and starts Electron:
pnpm run devpnpm run dev:web serves the UI in a browser instead, and is the one to use without a desktop session, for example over SSH. The first start compiles colibri and starling, which takes several minutes. When it is ready, these ports listen:
| Port | Service |
|---|---|
| 4141 | starling proxy, the single origin the UI talks to |
| 4242 | rotki-core REST API |
| 4343 | colibri |
| 8080 | Vite dev server (open http://localhost:8080) |
Where things are on Windows:
| What | Path |
|---|---|
| Logs of the installed app | %APPDATA%\rotki\logs |
| Logs in development mode | frontend\logs in the checkout |
| User data of the installed app | %LOCALAPPDATA%\rotki\data |
| Development mode data | %LOCALAPPDATA%\rotki\develop_data |
| Test data and the test-caching clone | %LOCALAPPDATA%\rotki\test_data and %LOCALAPPDATA%\rotki\test-caching |
Optional debugging tools, installed only when a problem needs them:
- Frontend and Electron: the built-in DevTools (
Ctrl+Shift+Iin the app). - Python backend:
breakpoint()with the backend running in a console, ordebugpyand any DAP client. - Process trees, leftover processes, locked files: Sysinternals Process Explorer and Process Monitor (
winget install --id Microsoft.Sysinternals.ProcessExplorer -e,winget install --id Microsoft.Sysinternals.ProcessMonitor -e). - Native crashes in colibri, starling or the PyInstaller bootloader: WinDbg (
winget install --id Microsoft.WinDbg -e). Build with--debug-symbolsso the.pdbfiles carry useful names.
Disk and time
Give a VM at least 80 GB of disk, 8 GB of RAM and as many cores as you can spare. On a 6 core VM with 12 GB of RAM, a fresh Windows 10 install used about 21 GB, and the disk held 46 GB after setting up, building, and running all the tests and development mode. The slow steps were the cold package.py build (about 20 minutes), the frontend unit tests (about 25 minutes) and the first dev:web start (about 10 minutes).
Driving a build VM over SSH
A headless VM can be driven entirely over SSH with Windows' own OpenSSH server. In an elevated PowerShell in the VM:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Set-Service sshd -StartupType Automatic; Start-Service sshd
New-ItemProperty -Path HKLM:\SOFTWARE\OpenSSH -Name DefaultShell -Value C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -PropertyType String -ForceFor an account in the Administrators group, sshd reads keys only from C:\ProgramData\ssh\administrators_authorized_keys, never from ~\.ssh\authorized_keys. Put your public key there:
Set-Content -Path C:\ProgramData\ssh\administrators_authorized_keys -Value 'ssh-ed25519 AAAA... you@host' -Encoding asciiThe new file inherits read access for Authenticated Users, and sshd silently ignores a key file that anyone else can read: the login falls back to a password prompt. Remove the inherited entries:
icacls C:\ProgramData\ssh\administrators_authorized_keys /setowner Administrators
icacls C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
Restart-Service sshdicacls C:\ProgramData\ssh\administrators_authorized_keys must then list only BUILTIN\Administrators:(F) and NT AUTHORITY\SYSTEM:(F). If the key is still refused, Get-WinEvent -LogName OpenSSH/Operational -MaxEvents 15 says why.
What behaves differently over SSH:
Prompts: an administrator's SSH session already runs elevated, so there is no UAC prompt, but anything that waits for a click hangs. Pass
--silent --accept-package-agreements --accept-source-agreements --disable-interactivitytowinget, and use--quietinstead of--passivein the Build Tools--override.winget: the
wingetcommand is an alias that only exists in interactive sessions. Over SSH, call the packaged executable:powershell$winget = Join-Path (Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation 'winget.exe' & $winget install --id Git.Git -e --silent --accept-package-agreements --accept-source-agreementsEnvironment: every SSH session gets the environment sshd started with, so
PATHentries and variables that installers add (and thePYTHONvariable above) only show up afterRestart-Service sshd, or after reloading them in the session:powershell$env:Path = [Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + [Environment]::GetEnvironmentVariable('Path', 'User')Quoting: the remote command line is parsed once more, which strips double quotes. Copy scripts over with
scpand run them withpowershell -NoProfile -ExecutionPolicy Bypass -File <script>.ps1instead of passing PowerShell inline.
