Podman
Run the Pllan Gateway in a rootless Podman container. Uses the same image as Docker (built from the repo Dockerfile).Prerequisites
- Podman (rootless mode)
- sudo access for one-time setup (creating the dedicated user and building the image)
Quick start
One-time setup
From the repo root, run the setup script. It creates a dedicated This also creates a minimal config at (Or set
pllan user, builds the container image, and installs the launch script:~pllan/.pllan/pllan.json (sets gateway.mode to "local") so the Gateway can start without running the wizard.By default the container is not installed as a systemd service — you start it manually in the next step. For a production-style setup with auto-start and restarts, pass --quadlet instead:PLLAN_PODMAN_QUADLET=1. Use --container to install only the container and launch script.)Optional build-time env vars (set before running scripts/podman/setup.sh):PLLAN_DOCKER_APT_PACKAGES— install extra apt packages during image build.PLLAN_EXTENSIONS— pre-install extension dependencies (space-separated names, e.g.diagnostics-otel matrix).
Systemd (Quadlet, optional)
If you ran./scripts/podman/setup.sh --quadlet (or PLLAN_PODMAN_QUADLET=1), a Podman Quadlet unit is installed so the gateway runs as a systemd user service for the pllan user. The service is enabled and started at the end of setup.
- Start:
sudo systemctl --machine pllan@ --user start pllan.service - Stop:
sudo systemctl --machine pllan@ --user stop pllan.service - Status:
sudo systemctl --machine pllan@ --user status pllan.service - Logs:
sudo journalctl --machine pllan@ --user -u pllan.service -f
~pllan/.config/containers/systemd/pllan.container. To change ports or env, edit that file (or the .env it sources), then sudo systemctl --machine pllan@ --user daemon-reload and restart the service. On boot, the service starts automatically if lingering is enabled for pllan (setup does this when loginctl is available).
To add quadlet after an initial setup that did not use it, re-run: ./scripts/podman/setup.sh --quadlet.
The pllan user (non-login)
scripts/podman/setup.sh creates a dedicated system user pllan:
-
Shell:
nologin— no interactive login; reduces attack surface. -
Home: e.g.
/home/pllan— holds~/.pllan(config, workspace) and the launch scriptrun-pllan-podman.sh. -
Rootless Podman: The user must have a subuid and subgid range. Many distros assign these automatically when the user is created. If setup prints a warning, add lines to
/etc/subuidand/etc/subgid:Then start the gateway as that user (e.g. from cron or systemd): -
Config: Only
pllanand root can access/home/pllan/.pllan. To edit config: use the Control UI once the gateway is running, orsudo -u pllan $EDITOR /home/pllan/.pllan/pllan.json.
Environment and config
- Token: Stored in
~pllan/.pllan/.envasPLLAN_GATEWAY_TOKEN.scripts/podman/setup.shandrun-pllan-podman.shgenerate it if missing (usesopenssl,python3, orod). - Optional: In that
.envyou can set provider keys (e.g.GROQ_API_KEY,OLLAMA_API_KEY) and other Pllan env vars. - Host ports: By default the script maps
18789(gateway) and18790(bridge). Override the host port mapping withPLLAN_PODMAN_GATEWAY_HOST_PORTandPLLAN_PODMAN_BRIDGE_HOST_PORTwhen launching. - Gateway bind: By default,
run-pllan-podman.shstarts the gateway with--bind loopbackfor safe local access. To expose on LAN, setPLLAN_GATEWAY_BIND=lanand configuregateway.controlUi.allowedOrigins(or explicitly enable host-header fallback) inpllan.json. - Paths: Host config and workspace default to
~pllan/.pllanand~pllan/.pllan/workspace. Override the host paths used by the launch script withPLLAN_CONFIG_DIRandPLLAN_WORKSPACE_DIR.
Storage model
- Persistent host data:
PLLAN_CONFIG_DIRandPLLAN_WORKSPACE_DIRare bind-mounted into the container and retain state on the host. - Ephemeral sandbox tmpfs: if you enable
agents.defaults.sandbox, the tool sandbox containers mounttmpfsat/tmp,/var/tmp, and/run. Those paths are memory-backed and disappear with the sandbox container; the top-level Podman container setup does not add its own tmpfs mounts. - Disk growth hotspots: the main paths to watch are
media/,agents/<agentId>/sessions/sessions.json, transcript JSONL files,cron/runs/*.jsonl, and rolling file logs under/tmp/pllan/(or your configuredlogging.file).
scripts/podman/setup.sh now stages the image tar in a private temp directory and prints the chosen base dir during setup. For non-root runs it accepts TMPDIR only when that base is safe to use; otherwise it falls back to /var/tmp, then /tmp. The saved tar stays owner-only and is streamed into the target user’s podman load, so private caller temp dirs do not block setup.
Useful commands
- Logs: With quadlet:
sudo journalctl --machine pllan@ --user -u pllan.service -f. With script:sudo -u pllan podman logs -f pllan - Stop: With quadlet:
sudo systemctl --machine pllan@ --user stop pllan.service. With script:sudo -u pllan podman stop pllan - Start again: With quadlet:
sudo systemctl --machine pllan@ --user start pllan.service. With script: re-run the launch script orpodman start pllan - Remove container:
sudo -u pllan podman rm -f pllan— config and workspace on the host are kept
Troubleshooting
- Permission denied (EACCES) on config or auth-profiles: The container defaults to
--userns=keep-idand runs as the same uid/gid as the host user running the script. Ensure your hostPLLAN_CONFIG_DIRandPLLAN_WORKSPACE_DIRare owned by that user. - Gateway start blocked (missing
gateway.mode=local): Ensure~pllan/.pllan/pllan.jsonexists and setsgateway.mode="local".scripts/podman/setup.shcreates this file if missing. - Rootless Podman fails for user pllan: Check
/etc/subuidand/etc/subgidcontain a line forpllan(e.g.pllan:100000:65536). Add it if missing and restart. - Container name in use: The launch script uses
podman run --replace, so the existing container is replaced when you start again. To clean up manually:podman rm -f pllan. - Script not found when running as pllan: Ensure
scripts/podman/setup.shwas run so thatrun-pllan-podman.shis copied to pllan’s home (e.g./home/pllan/run-pllan-podman.sh). - Quadlet service not found or fails to start: Run
sudo systemctl --machine pllan@ --user daemon-reloadafter editing the.containerfile. Quadlet requires cgroups v2:podman info --format '{{.Host.CgroupsVersion}}'should show2.
Optional: run as your own user
To run the gateway as your normal user (no dedicated pllan user): build the image, create~/.pllan/.env with PLLAN_GATEWAY_TOKEN, and run the container with --userns=keep-id and mounts to your ~/.pllan. The launch script is designed for the pllan-user flow; for a single-user setup you can instead run the podman run command from the script manually, pointing config and workspace to your home. Recommended for most users: use scripts/podman/setup.sh and run as the pllan user so config and process are isolated.