Skip to main content
podbox/docs/getting-started.md
On this page

Getting Started

Installation

bash
curl -fsSL https://bethropolis.github.io/podbox/install.sh | sh
Other install options

mise

bash
# Install as a mise tool (Linux only)mise use -g github:bethropolis/podbox

Homebrew

bash
# Homebrew (Linux only)brew install bethropolis/homebrew-tap/podbox

Arch Linux, via AUR

bash
# Arch Linux, via AUR (binary, fast)paru -S podbox-bin # ...or build from sourceparu -S podbox

From crates.io (supports prebuilt images only)

bash
# From crates.io (supports prebuilt images only)cargo install podbox-cli

Source install (builds CLI and guest daemon)

bash
# Source install (builds CLI & guest daemon)git clone https://github.com/bethropolis/podboxcd podbox && scripts/install.sh   # installs to ~/.local/bin

The crates.io build supports prebuilt images only. Custom image builds need a full source build.

Before you start

podbox needs three things:

  • Podman 5.5 or newer. Use 5.6+ if you want SSH agent passthrough.
  • A systemd user session. podbox hands the container lifecycle to systemd.
  • Linux with a Wayland compositor. X11 apps still work through Xwayland.

Optionally, install xdg-dbus-proxy to get filtered D-Bus access instead of an open session bus.

For X11 applications, also install the host dependencies xwayland-satellite and Xwayland. Enable them per container with integration.x11 = true.

If any of that is missing, podbox doctor will tell you.

Two Ways to Create a Container

podbox supports two workflows depending on how much control you need:

MethodUse caseHow it works
PrebuiltTrying things out, gamingPull a ready-made image. Everything is baked in — just create and enter.
CustomYour own packages and setupStart from a distro image and declare the rest in TOML. podbox generates the build.

Prebuilt (Quick Start)

Prebuilt profiles come with Wayland, audio, GPU, and common packages ready to go. They're the fastest way to get a working container.

Available profiles

ProfileBaseUse case
cachyCachyOS (Arch-based)Gaming, general purpose
fedoraFedoraDevelopment, general purpose
devFedoraDevelopment tooling, focused toolset

Run podbox profile list to see the full list.

Non-interactive

bash
# Create a gaming-ready containerpodbox create cachy # Or a Fedora-based one with a custom namepodbox create fedora --name dev

Interactive

bash
# Launch the wizard and pick a profilepodbox init -i # After the wizard finishes, create the containerpodbox create dev

Verify it works

bash
1# List all podbox containers2podbox list3 4# Check status5podbox status cachy6 7# Run diagnostics8podbox doctor

What happens

  1. podbox init creates a config file at ~/.config/podbox/profiles/<name>.toml
  2. podbox create pulls the prebuilt image, writes Quadlet systemd files, and starts the container
  3. The guest daemon (podbox-guest) starts inside and connects to the host for notifications, clipboard, and URI forwarding
  4. The container is running and ready — podbox enter <name> drops you into a shell

Custom (Build from Base)

Build a container from a plain distro image with your own packages, shell, and configuration.

Non-interactive

bash
1# Create a config from a base image2podbox init fedora:44 --name myenv3 4# Build the image, enable Quadlet, and start5podbox create myenv6 7# Jump in8podbox enter myenv

Or in one step with create:

bash
# podbox create works with any OCI image referencepodbox create myenvpodbox create ubuntu:26.04 --name dev

Interactive

bash
1# Launch the interactive wizard2podbox init -i3 4# Select "Custom (from scratch)" at the top of the list5# Choose: base image, packages to install, extra RUN commands6# Complete the wizard (shell, XDG dirs, GPU, lifecycle)7 8# Build and start9podbox create myenv

Container naming

When podbox init <image> is called without --name, the container name is derived from the image tag:

Image refContainer name
fedora:44fedora-44
fedora:latestfedora
ubuntu:26.04ubuntu-26-04
ghcr.io/user/img:v1img-v1

This avoids name conflicts when creating containers from different tags of the same base image. Use --name to override explicitly.

Custom config example

toml
1# ~/.config/podbox/myenv.toml2[image]3base = "fedora:44"4name = "myenv"5 6[image.packages]7install = ["git", "neovim", "gcc", "ripgrep"]8 9[container]10name = "myenv"11home = "~/containers/myenv"12shell = "/bin/bash"13 14[integration]15wayland = true16audio = true17gpu = "auto"18 19[integration.xdg_dirs]20documents = true21downloads = true22projects = true

Inspect what was generated

bash
1# View the resolved TOML config2podbox inspect myenv --toml3 4# View the generated Quadlet systemd units5podbox inspect myenv --quadlet6 7# View the computed environment8podbox inspect myenv --env

Check for drift

After installing packages manually inside the container, see what differs from your config:

bash
podbox diff myenv

Use --apply to update the config TOML's install list to match the running container:

bash
podbox diff myenv --apply

What happens

  1. podbox init creates a config file at ~/.config/podbox/profiles/<name>.toml
  2. podbox build auto-generates a Containerfile from the config, copies in the guest binary (podbox-guest), and runs podman build
  3. podbox enable writes Quadlet files (<name>.container, <name>.build) to ~/.config/containers/systemd/ and custom units (<name>.socket, <name>-host.service) to ~/.config/systemd/user/
  4. podbox start starts the container — the guest daemon connects to the host socket
  5. podbox enter <name> opens an interactive shell

Daily Usage

Active context

Set a default container so bare commands "just work":

bash
1# Set myenv as the active context2podbox use myenv3 4# All commands now target myenv5podbox status6podbox logs7podbox exec -- htop

To target a different container, pass the name explicitly:

bash
podbox status fedorapodbox enter fedora

Open a shell

bash
podbox enter myenvpodbox shell myenv

Both work. shell is an alias for enter.

Run commands

bash
1# Run interactively inside the container2podbox exec -- htop3podbox exec -- cargo build4 5# Run as root6podbox exec --root -- apt update7 8# Launch a GUI app (detached)9podbox run firefox10podbox run gedit ~/notes.txt

Export to host

Make container apps and binaries available on the host:

bash
1# Add Firefox to your host launcher2podbox export app firefox3 4# Make ripgrep available as a host command5podbox export bin rg6 7# Remove all exports for the current container8podbox export clean

Resource usage

bash
1# Show real-time resource usage2podbox stats3 4# Single snapshot, no streaming5podbox stats --no-stream6 7# JSON output for scripting8podbox stats --output json

Snapshots

Commit the current container state and roll back if needed:

bash
1# Tag the current state (defaults to timestamp tag)2podbox snapshot create myenv3 4# Tag with a custom name5podbox snapshot create myenv --tag before-upgrade6 7# List snapshots8podbox snapshot list myenv9 10# Restore to a previous state (tag first, then name)11podbox restore before-upgrade myenv

Path translation

Find the equivalent path between host and container:

bash
# Host → containerpodbox translate-path --to-container ~/Projects/myapp # Container → hostpodbox translate-path --to-host /home/user/Projects/myapp

Troubleshoot

bash
1# Run diagnostics2podbox doctor3 4# Auto-fix common issues (Wayland socket ownership, etc.)5podbox doctor --fix6 7# Non-interactive: accept every fix8podbox doctor --fix --yes

Lifecycle Management

Understanding the chain

podbox uses four stages:

bash
podbox build    # Build the container image from the TOML configpodbox enable   # Write Quadlet systemd files (~/.config/containers/systemd/)podbox start    # Start the containerpodbox enter    # Open a shell

podbox create runs all of these in one command.

Preview without side effects

bash
# See what would happen without executing anythingpodbox build --dry-runpodbox enable --dry-run

Quadlet persistence

When Quadlet is enabled ([lifecycle] quadlet = true), systemd manages the container:

  • It starts automatically on login (WantedBy=default.target)
  • It restarts on crash (Restart=on-failure)
  • The socket is created before the container and persists across restarts

Start and stop

bash
1# Start2podbox start myenv3 4# Stop (container stays, can be started again)5podbox stop myenv6 7# Disable and remove Quadlet files8podbox disable myenv9 10# Force-disable without loading the config11podbox disable myenv --force

Remove

bash
1# Remove the container only (config stays)2podbox remove myenv3 4# Remove container and home directory5podbox remove myenv --home6 7# Force-remove without confirmation8podbox remove myenv --home --force9 10# Also delete the TOML config file11podbox remove myenv --remove-config12 13# Clean up orphaned/failed containers14podbox remove --stale

Update and rebuild

bash
1# Rebuild the image (picks up config changes automatically)2podbox build3 4# Force a full rebuild from scratch5podbox build --rebuild6 7# Pull latest image and restart (prebuilt containers)8podbox update myenv9 10# Pull without restarting11podbox update myenv --no-restart

Edit config interactively

bash
# Open the config in your editorpodbox edit myenv # After saving, rebuild if the image config changedpodbox edit myenv --rebuild

Commands at a Glance

Profiles

CommandDescription
podbox profile listList all available profiles (bundled + custom)
podbox profile show <name>Show the TOML configuration of a profile
podbox profile export <name>Print a profile's TOML (--output <file> to write it)
podbox profile import <file>Install a TOML file into profiles/ (--name, --force)

Your own profiles/<name>.toml always wins over a bundled profile of the same name, so podbox create dev builds your file — never the template. To inherit from the template you shadowed, extend builtin:<name> (e.g. extends = "builtin:dev"): profile:<name> would resolve back to your own file and fail as circular.

Creating and building

CommandDescription
podbox initScaffold a config from the default base image (fedora:44)
podbox profile listList available profiles (bundled + custom)
podbox init <image>Scaffold a custom config from a base image
podbox init -iInteractive wizard (custom or profile)
podbox init --profile <name>Scaffold from a prebuilt profile
podbox create <name>Init → build → enable → start in one step (on-disk config wins over bundled profile)
podbox create <image> --name <n>Pull + create config + enable + start
podbox create --import <file>Install a TOML file into profiles/ and create from it
podbox create --edit <name>Open the config in your editor first, then create from what you saved
podbox build [<name>]Build or rebuild the container image
podbox pull [<image>]Pull a prebuilt image without building (target via -C/active context)

Running and entering

CommandDescription
podbox enter [<name>]Enter a running container (auto-starts)
podbox shell [<name>]Open an interactive shell
podbox exec -- <cmd>Execute a command
podbox run <app>Launch a GUI app (detached)

Managing state

CommandDescription
podbox enable [<name>]Install Quadlet systemd files
podbox disable [<name>] [--force]Remove Quadlet files
podbox start [<name>]Start the container
podbox stop [<name>]Stop the container
podbox remove [<name>] [--home]Remove the container (and home with --home)
podbox remove --staleClean up orphaned/failed containers
podbox snapshot create [<name>] [--tag <t>]Commit container state as an OCI image
podbox snapshot list [<name>]List snapshots for a container
podbox snapshot prune [<name>] [--keep N] [--yes]Delete old snapshots after confirmation
podbox restore <tag> [<name>]Roll back to a previous snapshot
podbox rollback [<name>]Restore the image captured before the last update or rebuild
podbox clone <src> <dst>Copy a config for a variant
podbox update [<name>]Pull latest image and restart

Exporting

CommandDescription
podbox export app <name>Export a .desktop file to the host launcher
podbox export bin <name>Create a binary shim in ~/.local/bin
podbox export cleanRemove all exported shims and .desktop files

Diagnostics and utilities

CommandDescription
podbox status [<name>]Show container state
podbox logs [<name>] [-f] [--since <time>]Show container logs
podbox stats [<name>]Show resource usage
podbox diff [<name>]Compare installed packages against config
podbox doctor [--fix]Diagnose and fix common issues
podbox use [<name>] [--clear]Set or show the active context
podbox find-definition [<name>]Print path to the matching config TOML
podbox listList all podbox-managed containers
podbox inspect [<name>]Show resolved config, Quadlet, or environment
podbox edit [<name>]Open the config in your editor
podbox translate-path --to-container <path>Translate a host path to container path
podbox translate-path --to-host <path>Translate a container path to host path
podbox completions <shell>Generate shell completions
podbox dotfiles sync [<name>]Update dotfiles and rerun their install command
podbox dotfiles status [<name>]Show dotfiles provisioning state
podbox provision sync [<name>]Run incomplete provisioning steps
podbox provision status [<name>]Show the state of each provisioning step

Publishing

CommandDescription
podbox publish [<key>...]Build definitions from images.toml (or envs/*.toml / podbox.toml) into prebuilt OCI images and optionally push them with --push (GHCR by default). Skips images whose inputs haven't changed. Supports --manifest, --dir, --registry, --containerfile, --push/--no-push, --force, --list, --dry-run, `--engine buildx

Most commands support --dry-run to preview without side effects. export (except export list) refuses because it writes host files directly.

podbox publish resolves base image digests by reading the registry: install skopeo (tested with 1.24.1; --config must accept tag and digest refs) or use podman, which is the fallback. With neither probe tool installed it exits 5 (registry_probe_unavailable); a probe failure other than a missing image exits 6 (registry_probe_failed).

Build context file name

podbox publish writes the generated Containerfile into a temporary build context and passes it to the engine with an explicit --file, so neither podman build nor docker buildx build relies on its default. The name is configurable, resolved in this order (first match wins):

PrioritySourceScope
1podbox publish --containerfile <NAME>every image
2[images.<key>] containerfile = "<NAME>"one image
3top-level containerfile = "<NAME>" in images.tomlevery image
4default Containerfile—
toml
1# images.toml2containerfile = "Dockerfile"3 4[images.dev]5config = "envs/dev.toml"6containerfile = "Dockerfile.custom"

A name must be a single path component using only letters, digits, ., _, + or - (at most 128 bytes). An invalid name fails with containerfile_name_invalid before any registry probe or build.

Next Steps