Porto

Docs Develop and release

Porto desktop app

A native Porto host around the daemon's web UI. It does not implement any Porto functionality itself — it opens a window pointed at http://127.0.0.1:37623 (the Porto daemon's default address) and starts porto daemon start unless the address exposes a compatible API and confirms that its dashboard assets are ready.

Security

  • contextIsolation: true and nodeIntegration: false (plus sandbox: true) on the desktop window, so the loaded page has no access to Node or desktop runtime APIs.
  • preload.js exposes only narrow desktop-preference and application-update operations. The main process rejects calls from pages outside the local Porto dashboard origin.
  • Update downloads come only from the stable release returned by GitHub's porto-containers/porto Releases API. Porto selects the exact installer for the current OS and architecture and verifies it against the release's SHA256SUMS entry before offering a restart.
  • The daemon is started detached and un-ref'd. Closing the window never stops it — Porto keeps managing projects, containers, clusters, and VMs in the background exactly as it does when driven from a browser tab.

Run

npm install   # installs the desktop runtime; only needed once
npm start

Development runs require the daemon binary (porto) on PATH. Release packages bundle the daemon and portable runtime clients, so users do not need a separate Porto, Docker CLI, Compose, Buildx, Dive, Lima, kubectl, or kind installation. Windows packages also bundle QEMU for the managed container runtime and virtual machines. Windows ARM64 excludes KinD because upstream does not publish a native binary; Porto builds Docker CLI from its pinned official source and bundles native Compose and Buildx plugins.

Package

From the repository root, build the dashboard and a matching Porto binary, then package the branded Porto application:

npm --prefix ui run build
go build -o ui/electron/porto ./cmd/porto
bash scripts/bundle-desktop-runtime.sh darwin arm64 runtime
npm --prefix ui run desktop:package -- \
  --platform=darwin \
  --arch=arm64 \
  --porto-release-version=1.0.0 \
  --extra-resource=porto \
  --extra-resource=../dist \
  --extra-resource=../../runtime

Release automation performs this for every supported operating system and architecture. Native macOS and Windows hosts can build the final DMG or NSIS EXE package with:

bash scripts/package-desktop-installer.sh darwin arm64 1.0.0 dist
# Use: windows amd64 1.0.0 dist on Windows.

macOS installer packaging ad-hoc seals the final app and its nested Electron code before creating the DMG and desktop archive. This is not Developer ID signing or notarization. See release signing and verification for the credentialed signing path and read-only DMG checks.

The assisted Windows installer leaves the desktop-shortcut option unchecked by default. Silent installs do not create a desktop shortcut.

Packaged apps compare the bundled daemon's SHA-256 identity with the identity cached by the running process and replace it when they differ, including same-version rebuilds installed at the same path. They automatically provision the bundled Porto container runtime on first launch and reconcile its provisioning on later launches, including QEMU/binfmt setup for multi-platform builds in already-running managed engines. Packaged apps always start the daemon executable embedded in their resources; they never require PORTO_BINARY or a separate porto executable on PATH.

scripts/bundle-desktop-runtime.sh creates the runtime directory used by releases. Packaged apps resolve the bundled binary and tools from Porto's resources directory before falling back to PORTO_BINARY or PATH. Packages also contain a statically linked Linux porto-runtime-helper; Porto installs it only inside the Porto-owned Lima instance and uses it for guest-local CNI operations and runtime capability probes.

Updates

Installed builds check GitHub Releases shortly after launch and every 12 hours. Help > Check for updates, the tray's Check for updates, and the Settings button request an immediate check through the same updater. Native menu checks show a result/error, respect automatic downloads, and let users reopen a prompt they dismissed earlier. Checks are disabled while checking, downloading, or installing, and in unsupported source builds. When a newer stable version exists, Porto prompts before downloading it. The Settings page can enable automatic downloads; installation still waits for the user to choose Restart and update.

The restart replaces only the packaged desktop application and, when required, its detached daemon. It does not delete or recreate VMs, Kubernetes clusters, containers, images, or volumes. After the updated app launches, the existing daemon is reused when its bundled binary identity still matches, or replaced so the new dashboard can reconnect to the same managed resources.

Windows updates stop the Porto-owned container engine cleanly before replacing the bundled runtime, then startup reconnects it to the same containers, images, and volumes. The installer helper refuses to force-kill QEMU; if another Porto VM or Kubernetes cluster is still using the bundled runtime, stop it before retrying the update.

Updates require Porto to run from a user-writable installation. The standard installers use ~/Applications/Porto.app, %LOCALAPPDATA%\Programs\Porto, and ~/.local/opt/porto, which satisfy that requirement. A read-only or administrator-owned installation reports an error and leaves the downloaded package available instead of quitting.