Installation
Install podspawn on the server and optionally on client machines
Podspawn is a single binary that works as both server and client. Same install, different commands. Install it once and it handles both roles.
Requirements
Server:
- Linux (any distro -- Ubuntu, Debian, RHEL, Alpine all tested)
- Docker installed and running
- OpenSSH 7.4+ (for the
restrictkeyword) - Root access
Client:
- Any SSH client on any OS works without podspawn
- Install the podspawn binary for
.podnamespace routing (optional but recommended)
There is no separate server package or client package. The same podspawn binary runs server-setup on the server and connect/setup on the client. Install it on both.
Interactive setup (recommended)
One command installs the binary, configures sshd, registers your SSH keys, and runs diagnostics:
curl -sSf https://podspawn.dev/up | bashThe script auto-detects whether you're on a server (sshd + Docker present) or a client machine and walks you through setup interactively.
On a server, it will:
- Download and install the podspawn binary
- Run
podspawn server-setupto configure sshd - Ask how you want to register SSH keys (GitHub, existing key, generate new, or paste)
- Run
podspawn doctorto verify everything works - Enable the cleanup timer if systemd is available
On a client, it will:
- Download and install the podspawn binary
- Add the
.podnamespace block to~/.ssh/config - Ask for your default server hostname
Manual server setup
If you prefer step-by-step control:
Step 1: Install the binary
curl -sSf https://podspawn.dev/install.sh | shOr from source:
go install github.com/podspawn/podspawn@latestOr via package manager:
# Homebrew (macOS/Linux)
brew install podspawn/tap/podspawn
# Debian/Ubuntu (.deb)
# Download from GitHub releases:
# https://github.com/podspawn/podspawn/releases
sudo dpkg -i podspawn_*.deb
# RHEL/Fedora (.rpm)
sudo rpm -i podspawn_*.rpmStep 2: Configure sshd
sudo podspawn server-setupThis appends AuthorizedKeysCommand to /etc/ssh/sshd_config, creates directories, and reloads sshd. It's idempotent -- safe to run multiple times.
Step 3: Register a user
Import keys from GitHub:
sudo podspawn add-user alice --github aliceOr use a local key file:
sudo podspawn add-user alice --key-file ~/.ssh/id_ed25519.pubOr paste a key directly:
sudo podspawn add-user alice --key "ssh-ed25519 AAAA... alice@laptop"Step 4: Verify
sudo podspawn doctorThis checks Docker, sshd, permissions, disk space, and image cache. Fix any failures before proceeding.
Step 5: Test
ssh alice@localhostYou should land in a container. Type exit to leave.
Client setup
The client binary is optional. Without it, you SSH directly to the server hostname. With it, you get the .pod namespace:
ssh alice@backend.pod # requires client binary
ssh alice@yourserver.com # works with any SSH clientmacOS / Linux
curl -sSf https://podspawn.dev/up | bashOr install manually:
# Install binary
curl -sSf https://podspawn.dev/install.sh | sh
# Configure SSH client
podspawn setupWindows
No installer needed. Add this to ~/.ssh/config (or C:\Users\you\.ssh\config):
Host *.pod
ProxyCommand podspawn connect %r %h %p
UserKnownHostsFile /dev/null
StrictHostKeyChecking noDownload the binary from GitHub releases and place it in your PATH.
Configure server routing
Create ~/.podspawn/config.yaml:
servers:
default: devbox.company.com
mappings:
gpu.pod: gpu-server.company.com
personal.pod: homelab.ddns.netNow ssh alice@backend.pod routes to devbox.company.com, and ssh alice@gpu.pod routes to gpu-server.company.com.
localhost.pod always resolves to 127.0.0.1 without any config.
Updating
podspawn updateThis checks GitHub for the latest release, downloads it, and replaces the binary. Existing SSH sessions are not affected.
Check for updates without installing:
podspawn update --checkWhat gets installed
| Path | Purpose |
|---|---|
/usr/local/bin/podspawn | Single binary for both server and client |
/etc/podspawn/ | Server config directory (created by server-setup) |
/etc/podspawn/keys/ | Per-user SSH public key store |
/etc/podspawn/config.yaml | Server configuration |
/etc/podspawn/emergency.keys | Break-glass access keys |
/var/lib/podspawn/ | State directory (SQLite database, lock files) |
~/.ssh/config | Client: .pod namespace block (appended by setup) |
~/.podspawn/config.yaml | Client: server routing configuration |