[PR #6030] [client] Add SteamOS install script for rootless deployment #27360

Open
opened 2026-08-05 07:08:37 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6030
Author: @shuuri-labs
Created: 4/29/2026
Status: 🔄 Open

Base: mainHead: add-steamos-support


📝 Commits (8)

  • c400d57 feat(client): add SteamOS install script for rootless deployment
  • 94657c1 style(client): use for bash conditionals in SteamOS installer
  • 9938da9 fix(client): add checksum verification and atomic updates to SteamOS installer
  • 051d17d fix(client): auto-add ~/.local/bin to PATH in SteamOS installer
  • dbd0142 fix(client): export NB_DAEMON_ADDR and NB_CONFIG in shell rc
  • 76838e9 fix(client): remove NB_ENABLE_NETSTACK_LOCAL_FORWARDING default
  • 1e11b93 refactor(client): switch SteamOS installer to TUN mode with file capabilities
  • b3cf615 fix(client): check sha256sum dependency and validate deps on update

📊 Changes

1 file changed (+440 additions, -0 deletions)

View changed files

release_files/install-steamos.sh (+440 -0)

📄 Description

Describe your changes

Adds a standalone installer script (release_files/install-steamos.sh) for deploying NetBird on SteamOS/Bazzite as a user-level service optimized for game streaming.

SteamOS (or other SteamOS-like distros) uses an immutable A/B partition scheme with a read-only rootfs, which breaks traditional installation methods. This script takes a different approach from the systemd-sysext pattern (used by e.g. Tailscale) by keeping everything in /home and using Linux file capabilities instead of running as root:

  • User-level service — runs as the deck user with systemctl --user, binary and config live under /home
  • Real kernel TUN interface — uses userspace WireGuard (wireguard-go) with a kernel TUN device for proper network performance (important for Moonlight/Sunshine game streaming)
  • File capabilities instead of rootsudo setcap cap_net_admin,cap_net_raw+eip grants the binary the network capabilities it needs without running as root (one-time sudo at install, reapplied per update)
  • No sysext / overlay — no version pinning, no extension-release files to break on OS updates
  • Survives all OS updates — nothing on the read-only rootfs
  • SHA-256 checksum verification — validates downloads against the release checksums.txt before installing
  • Atomic updates — downloads and verifies the new binary to a staging directory before stopping the running service, so failed downloads leave the existing installation untouched
  • Supports install, update, and uninstall via --update and --uninstall flags
  • Auto-connect with NB_SETUP_KEY environment variable for headless auth
  • FORCE=true escape hatch for other immutable Linux distros (e.g. Bazzite)

Why not netstack mode?

An earlier iteration used NB_USE_NETSTACK_MODE=true for a fully rootless install. However, netstack routes all traffic through a userspace gVisor network stack, which adds latency and jitter unsuitable for real-time game streaming. The TUN + file capabilities approach gives kernel-level routing performance while still keeping all files in /home.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Single install script with inline --help usage. Docs PR can follow once the approach is validated on hardware.

Summary by CodeRabbit

  • New Features
    • Added SteamOS installer script for automated setup, updates, and removal
    • Automatic service configuration with optional provisioning setup
    • Built-in checksum verification for secure installation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/6030 **Author:** [@shuuri-labs](https://github.com/shuuri-labs) **Created:** 4/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-steamos-support` --- ### 📝 Commits (8) - [`c400d57`](https://github.com/netbirdio/netbird/commit/c400d57079a82a93b813f4ed1d9575294a6f95bd) feat(client): add SteamOS install script for rootless deployment - [`94657c1`](https://github.com/netbirdio/netbird/commit/94657c1c805a9c6b340b5a03185fcfa5e68cef39) style(client): use [[ ]] for bash conditionals in SteamOS installer - [`9938da9`](https://github.com/netbirdio/netbird/commit/9938da9bbdff8ec37c055f7f0960e9c4199a9a03) fix(client): add checksum verification and atomic updates to SteamOS installer - [`051d17d`](https://github.com/netbirdio/netbird/commit/051d17d01b1b2353ea614ef9abaaa87fe43e22dd) fix(client): auto-add ~/.local/bin to PATH in SteamOS installer - [`dbd0142`](https://github.com/netbirdio/netbird/commit/dbd0142b1ece72b54eeecff7ba9d16860230033c) fix(client): export NB_DAEMON_ADDR and NB_CONFIG in shell rc - [`76838e9`](https://github.com/netbirdio/netbird/commit/76838e9170c762d7ac16650f97ea22d6f3ca9a18) fix(client): remove NB_ENABLE_NETSTACK_LOCAL_FORWARDING default - [`1e11b93`](https://github.com/netbirdio/netbird/commit/1e11b93e6b4086ee5a22abc0c728bb03ef638030) refactor(client): switch SteamOS installer to TUN mode with file capabilities - [`b3cf615`](https://github.com/netbirdio/netbird/commit/b3cf615e51c8c130f36783682bbfb61556a74275) fix(client): check sha256sum dependency and validate deps on update ### 📊 Changes **1 file changed** (+440 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `release_files/install-steamos.sh` (+440 -0) </details> ### 📄 Description ## Describe your changes Adds a standalone installer script (`release_files/install-steamos.sh`) for deploying NetBird on SteamOS/Bazzite as a user-level service optimized for game streaming. SteamOS (or other SteamOS-like distros) uses an immutable A/B partition scheme with a read-only rootfs, which breaks traditional installation methods. This script takes a different approach from the `systemd-sysext` pattern (used by e.g. Tailscale) by keeping everything in `/home` and using Linux file capabilities instead of running as root: - **User-level service** — runs as the `deck` user with `systemctl --user`, binary and config live under `/home` - **Real kernel TUN interface** — uses userspace WireGuard (wireguard-go) with a kernel TUN device for proper network performance (important for Moonlight/Sunshine game streaming) - **File capabilities instead of root** — `sudo setcap cap_net_admin,cap_net_raw+eip` grants the binary the network capabilities it needs without running as root (one-time sudo at install, reapplied per update) - **No sysext / overlay** — no version pinning, no extension-release files to break on OS updates - **Survives all OS updates** — nothing on the read-only rootfs - **SHA-256 checksum verification** — validates downloads against the release checksums.txt before installing - **Atomic updates** — downloads and verifies the new binary to a staging directory before stopping the running service, so failed downloads leave the existing installation untouched - **Supports install, update, and uninstall** via `--update` and `--uninstall` flags - **Auto-connect** with `NB_SETUP_KEY` environment variable for headless auth - **`FORCE=true` escape hatch** for other immutable Linux distros (e.g. Bazzite) ### Why not netstack mode? An earlier iteration used `NB_USE_NETSTACK_MODE=true` for a fully rootless install. However, netstack routes all traffic through a userspace gVisor network stack, which adds latency and jitter unsuitable for real-time game streaming. The TUN + file capabilities approach gives kernel-level routing performance while still keeping all files in `/home`. ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Single install script with inline `--help` usage. Docs PR can follow once the approach is validated on hardware. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added SteamOS installer script for automated setup, updates, and removal * Automatic service configuration with optional provisioning setup * Built-in checksum verification for secure installation <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:08:37 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#27360