Skip to content
runpocketsPublic

About

Open-source, local-first platform for building, running and managing personal web apps on macOS, Linux and homelabs.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Pockets

A home for the personal software you build.

Pockets is an open-source, local-first platform for building, running and managing personal web apps on macOS, Linux and homelabs.

Build with any coding agent or editor, preview changes in an isolated live-reloading environment, and install your apps with persistent storage, local secrets, backups, version history and optional private access from other devices via Tailscale.

Each Pocket is a standalone containerised web app with its own data volume. Your code, your data, your infrastructure, without having to manage containers yourself.

Pockets dashboard showing a Pocketized Glance instance alongside its live preview workspace

Example: "Pocketizing" the open-source Glance dashboard, with live preview and local container management side by side.


Install

Pockets installs Podman alongside the pockets binary so you can get started in one command.

macOS (Homebrew)

brew install runpockets/tap/pockets
brew services start pockets
pockets
  1. Installs the prebuilt pockets binary (works with either Docker or Podman; if neither is installed yet, run brew install podman).
  2. Runs Pockets in the background (brew services) and detects your container runtime automatically.
  3. Opens http://pockets.localhost:18786/ in your default browser already signed in.

Bookmark http://pockets.localhost:18786/ (or use Safari File → Add to Dock… / Chrome Install App). From then on, your saved URL just works.

Running headless on a Mac mini or accessing from another device? Enable private Tailscale HTTPS access with pockets tailscale on — it publishes the dashboard on your tailnet (https://<mac>.<tailnet>.ts.net:18786) and prints a one-time sign-in link.

Linux (Desktop, Raspberry Pi, Homelab, Cloud VM / VPS)

curl -fsSL https://raw.githubusercontent.com/runpockets/pockets/main/packaging/install.sh | sh
pockets

Installs Podman (via apt, dnf, or pacman if missing), installs the pockets binary, enables systemd --user with lingering so Pockets stays running after SSH disconnect (pass POCKETS_NO_SERVICE=1 to skip), and configures non-root Tailscale Serve access when Tailscale is installed. Containers run rootlessly with zero VM overhead on Linux.

Installing over SSH on a cloud VM? Use the exact same command above:

  • With Tailscale (recommended): Pockets automatically publishes the dashboard privately on your tailnet (https://<vm>.<tailnet>.ts.net:18786), prints your one-time sign-in link in SSH, and opens installed Pockets and live previews directly over Tailscale HTTPS. (If you install Tailscale afterward, run sudo tailscale set --operator=$USER and pockets tailscale on.)
  • Without Tailscale: Pockets prints the exact ssh -N -L 18786:127.0.0.1:18786 ... tunnel command, or pass --public-url https://pockets.example.com (or POCKETS_PUBLIC_URL) if you put your own reverse proxy in front of 127.0.0.1:18786.

Windows (WSL2)

Native Windows is not supported yet. On Windows, run Pockets inside WSL2 (with systemd enabled) using the Linux installer above:

curl -fsSL https://raw.githubusercontent.com/runpockets/pockets/main/packaging/install.sh | sh
pockets

WSL2 automatically forwards localhost ports to Windows, so http://pockets.localhost:18786/ and installed Pockets open in your regular Windows browser.


How It Works

1. Create, Pocketize, or wrap a Pocket

Choose New pocket in the dashboard (or run pockets new "My App", pockets init in an existing project folder, or pockets link . from your terminal). Pockets scaffolds a standalone starter (or non-destructively Pocketizes an existing folder) with pocket.yaml, Containerfile, tests, and AGENTS.md pointing your coding tool (Claude Code, Cursor, Codex, etc.) at the Pocket runtime contract in POCKETS.md. You can also pull ready-made Pockets from Pockets Hub, paste a Docker Compose snippet, or wrap any public GitHub repository as a pockets.dev/v1alpha2 Compose Pocket — with optional upstream release watching and one-click AI upgrade prompts when new releases ship.

2. Develop with Live Preview

Open the Pocket folder in your preferred coding tool and click Start in Workspace preview.

  • Saved edits refresh automatically (CSS swaps without restarting; code edits restart and reload after /health passes).
  • Preview runs in an isolated container with a disposable preview data volume and explicit per-host HTTPS API approvals (previewApis in pocket.yaml).
  • External edits never overwrite your installed app or its data until you click Build & start / Update.

3. Own it locally (and reach it from your phone)

  • Each installed Pocket gets a persistent loopback address (http://<name>.localhost:18788+) backed by a dedicated Podman named volume, with an optional Offline mode toggle (zero outbound internet, LAN, or DNS) and an installed container Logs viewer.
  • Store plain config and API secrets separately per environment (Preview vs Installed app) in an owner-only (0600) local vault inside Pockets' data directory.
  • Export and restore .tar data volume backups right from the browser (plus automatic pre-update data volume snapshots before every Update, up to 500 MiB, last 3 kept), inspect version diffs, roll back installed versions, and monitor per-Pocket CPU & memory.
  • Toggle Share on your tailnet to publish a Pocket privately over HTTPS via tailscale serve (plus a port 443 Pocket Launcher and scannable QR code). Containers stay strictly on 127.0.0.1 and tailscale funnel is never used.

CLI Quick Reference

pockets                     # Start daemon (if needed) and open dashboard in browser
pockets doctor [--json]     # Check Podman, Tailscale, data dir, and daemon status
pockets url [--rotate]      # Print a one-time sign-in URL for another browser (--rotate revokes old sessions)
pockets auth rotate         # Rotate the session key and revoke all existing browser sessions
pockets list [--json]       # List registered Pockets
pockets validate [path]     # Validate pocket.yaml, Containerfile, and folder hygiene (--json for agents)
pockets new <name>          # Create and register a new Pocket starter folder
pockets init [path]         # Pocketize an existing project folder in place and link it
pockets link [path]         # Link an existing Pocket folder (defaults to .)
pockets add <owner/repo>    # Clone and register a Pocket from GitHub
pockets start [id]          # Start an installed Pocket (defaults to current linked folder)
pockets stop [id]           # Stop a running Pocket (preserves data)
pockets status [id]         # Show status for an installed Pocket (--json for agents)
pockets logs [id]           # Show recent logs for an installed Pocket (or --preview, --json)
pockets service install     # Install & enable launchd (macOS) or systemd --user (Linux)
pockets service uninstall   # Stop & remove the background service
pockets tailscale on|off    # Enable/disable private Tailscale HTTPS access for the dashboard
pockets uninstall           # Uninstall Pockets (and optionally its data & Podman)

Uninstall

pockets uninstall

Stops the background service, cleans up any Pockets Tailscale Serve routes, uninstalls Pockets, and prompts before removing Pockets containers/volumes/data or uninstalling Podman (checking first for non-Pockets containers or volumes). Your Pocket source code folders are never touched.


Security Model

  • Authenticated loopback control plane: The daemon binds strictly to 127.0.0.1:18786, redirects ambiguous 127.0.0.1 / localhost browser visits to pockets.localhost so session cookies stay isolated from preview and app ports, enforces Host and Origin checks against DNS rebinding and cross-port attacks, and protects /api/* with a per-machine 256-bit HttpOnly; SameSite=Strict session token (0600).
  • Least-privilege, bounded containers: No privileged mode, no host networking, no arbitrary host directory mounts, dropped Linux capabilities, no-new-privileges, default memory/PID/CPU limits, optional offline internal-bridge networking, and no engine socket exposure to Pockets.
  • Explicit approval boundaries: Creating or linking source runs no code; previewing and building/installing are explicit user actions; secrets never enter snapshots, build contexts, or container CLI args; backup and rollback staging stays inside an owner-only (0700) directory under Pockets' data directory.

See SECURITY.md for vulnerability reporting and docs/architecture.md for architectural details.


Building from Source

Prerequisites: Node.js 22+, Rust (stable), and Podman.

npm ci
npm run build
./target/release/pockets

Development (hot-reload UI + local daemon)

# Terminal 1: run Rust daemon allowing Vite dev origin
npm run dev:daemon

# Terminal 2: run Vite dev server (proxies /api and /auth to daemon)
npm run dev:web

Running Tests

npm run format:check
npm run typecheck
npm run test:desktop
npm run test:gateway
npm run test:schema
npm run test:starter
npm test --prefix packages/pocket-tools
npm test --prefix examples/hello-pocket
node --test hub/scripts/validate-catalog.test.mjs
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

License

Licensed under the Apache License, Version 2.0.

About

Open-source, local-first platform for building, running and managing personal web apps on macOS, Linux and homelabs.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages