Skip to content

Windows desktop

The Windows app runs Nod's workspace and browser inside WSL 2, the Linux system built into Windows. You can't run it on a Mac or on Linux, so you build, test, and debug it on GitHub's Windows runners.

Word Meaning
Profile Nod's data folder, %APPDATA%\nod\profiles\local.
Background service Nod's server, which runs as its own process. The code calls it the engine.
Private computer Nod's own WSL distribution, named nod-<id>. Docker runs the workspace and browser containers inside it.
Runtime pack nod-Runtime-win32-x64.tar.gz, the Linux system, tools, and container images that Nod installs as the private computer.
flowchart TD
  app[nod.exe]:::accent --> db[(PostgreSQL)]
  db --> engine[Background service]
  db --> wsl{{WSL 2 ready?}}
  engine --> chat[Chat]:::go
  wsl -- no --> install[Install WSL]:::stop
  wsl -- yes --> computer[Private computer]
  computer --> containers[Workspace and browser]:::go
  1. The database opens first. PostgreSQL runs on Windows itself, in the profile's database folder, and listens only on 127.0.0.1.
  2. The background service starts. On a profile that's already set up, chat opens when it's ready. The first start after an install or update is the slowest, because Microsoft Defender scans each file the service loads.
  3. The private computer gets ready at the same time. Nod checks WSL, then locks the profile folder so only the user, SYSTEM, and Administrators can open it. On first setup, Nod installs the runtime pack as the private computer. Later starts reuse it. Docker then starts the workspace and browser containers. Tools that need them wait until they're ready.
  4. Without WSL, chat still works. The installer offers to install WSL and restart. If it's still missing after setup, Nod starts installing it once by itself. A profile from an earlier version, where that attempt already happened, gets one more question the next time a chat window opens. Windows asks for administrator approval, and the PC must restart. If that fails or the user declines, the error screen offers Install WSL. With usage sharing on, Nod records each attempt's progress and result as wsl_install_changed.

Nod downloads the new installer, plus the runtime pack if it changed, and checks that n8n GmbH signed the installer. The update installs when the user selects Restart to update, quits Nod, or leaves it idle. Nod quits, a hidden PowerShell runs the installer silently over the current install, and Nod opens again after Restart to update.

The profile and the private computer stay. A changed runtime pack updates the private computer on the next start.

What Where Code
App %LOCALAPPDATA%\Programs\nod, by default windows-installer.nsi
Profile %APPDATA%\nod\profiles\local protect-profile.ps1
Startup log logs\startup.log in the profile main.mjs
Database database in the profile database.mjs
PostgreSQL programs resources\engine\postgres\bin in the app folder build-windows.mjs
Private computer Its disk, ext4.vhdx, is under desktop-runtime in the profile, or in the folder the user chose windows.mjs and windows-guest.py
Downloaded updates %LOCALAPPDATA%\nod\updates windows-update.mjs

The <id> in nod-<id> is the first 12 characters of a hash of the profile path, so each profile gets its own private computer.