🧅 onion-boxDocs › Architecture DEEN
☰ Pages & contents

Architecture#

Architecture: CLI · Starter · Box · Page#

 you (your user)                        │  box user “onionpod” (no login)              │  network
────────────────────────────────────────┼──────────────────────────────────────────────┼──────────
 🪟 Starter  (double-click)             │                                              │
 ⌨️ CLI      (onionpod …)               │  🧅 Box (box program, /opt/onionpod)         │
        │                               │     start · stop · status · test …           │
        └── sudo, ONLY these calls ─────┼──►  └─ pod: workspace · tor · fw · probe ────┼──► Tor only
            (no password prompt)        │        Tor Browser · Session · ~/Transit     │
        setup.sh / update / config ─────┼──► root (sudo once): user, /opt, /etc        │
 🌐 Page  (website + docs, separate, knows nothing about your computer)                │

The box in detail#

 your computer (Ubuntu)
 ┌───────────────────────────────────────────────────────────────────────────────┐
 │  TigerVNC viewer ◄── pixels · 127.0.0.1 · one-time password ───┐   🧅 top bar │
 │                                                                │              │
 │  ┌──────────── Pod "onionpod" · rootless · user IDs rolled ─────────────────┐ │
 │  │  workspace ──TCP/DNS──► fw (nftables) ──► tor ──Tor──► Internet          │ │
 │  │  Tor Browser             only Tor may exit     SOCKS · TransPort ·       │ │
 │  │  openbox · menu          rest → Tor or DROP    DNSPort · .onion          │ │
 │  │  probe: leak-test container — deliberately tries to get past Tor         │ │
 │  └──────────────────────────────────────────────────────────────────────────┘ │
 │  ✕ unreachable from the box: router · home network · host · IPv6 · UDP        │
 └───────────────────────────────────────────────────────────────────────────────┘

The containers#

ContainerJob
fwsets up the firewall (nftables) in the pod's shared network: only the Tor process may reach the network; everything else is redirected to Tor or dropped — and counted
torTor with SOCKS, TransPort (transparent redirection), DNSPort and .onion automap; the ControlPort is blocked for apps
workspaceTor Browser (without its own Tor), openbox, bar, start menu, Xvnc
probeshort-lived, during the leak test: deliberately tries to get past Tor

Rootless and rolled#

Everything runs under the dedicated user onionpod (no login, home with 700). Every start picks a different one of 16 user ID ranges — the box's processes never run under your ID or a fixed one.

No bridge to the computer#

Where things live#

LocationContentOwner
your sourcesetup.sh and components (for updates)you
/opt/onionpodprograms, launcher, top bar icon, textsroot
/var/lib/onionpodimages, Tor state, browser profile (bookmarks)onionpod
/etc/onionpod/configversion, user, languageroot
/etc/onionpod/locklock password (hash)root
/etc/sudoers.d/onionpodyou may only run start/stop/status/build/test as onionpodroot
~/.config/onionpod/starterdesktop icon yes/noyou
~/.local/state/onionpod/setup.sh logsyou

Why root for programs and rules? Because otherwise any program running under your user could silently change a firewall entry — a leak past Tor.

Versions#

One version for everything (VERSION): setup.sh, launcher and box image (label). The launcher refuses to run if the image and the programs do not match, and points to onionpod update.

docs/en/architecture.md · Updated: 2026-10-06As JSON As Markdownonionpod v1.2.1Independent, not affiliated with The Tor Project. “Tor” is a trademark of The Tor Project.