Podman Quick Start#
This guide covers Podman-specific deployment of FleetMesh meshnode: pulling or building the container image, running a local rootless container, managing production services with Podman Quadlets (systemd), and handling Podman networking and upgrades.
For general production operations that apply across every runtime—Caddy TLS setup, fleet enrollment, meshctl watch monitoring, key hygiene, and node retirement—see the Operator Guide.
Prerequisites#
Podman 4.4+ (includes Quadlet support for native
systemdintegration)Linux (recommended for production Quadlets) or macOS (
podman machine init && podman machine start)Optional:
meshctlon your operator workstation—either native via Cargo or containerized viadocker.io/fleetmesh/meshctl:0.5.0-alpha.1(Install)
1. Pull (or Build) the meshnode Container Image#
Official multi-arch images (linux/amd64 and linux/arm64) are published to Docker Hub under docker.io/fleetmesh/meshnode (built from mesh-py/meshnode/Containerfile on a hardened multi-stage Chainguard Wolfi python-3.13 base with python3 -m fleetmesh_node.meshnode as the entrypoint):
podman pull docker.io/fleetmesh/meshnode:0.5.0a1
For PostgreSQL storage support (fleetmesh-node[postgres]), pull the -postgres variant:
podman pull docker.io/fleetmesh/meshnode:0.5.0a1-postgres
Verify the image responds cleanly:
podman run --rm docker.io/fleetmesh/meshnode:0.5.0a1 --help
To run meshctl alongside Podman without installing Rust, pull the official distroless CLI image (docker.io/fleetmesh/meshctl:0.5.0-alpha.1) and mount your node’s state directory or working directory:
podman run --rm --read-only \
-v ~/.local/share/fleetmesh/node-1:/var/lib/meshnode:ro \
docker.io/fleetmesh/meshctl:0.5.0-alpha.1 status --dir /var/lib/meshnode
Optional: Build Locally from Containerfile#
If you need custom extras (such as [postgres,p2p]) or an offline build:
podman build \
-t localhost/fleetmesh/meshnode:0.5.0a1-custom \
--build-arg FLEETMESH_NODE_VERSION=0.5.0a1 \
--build-arg FLEETMESH_STRFRY_VERSION=0.5.0a1 \
--build-arg FLEETMESH_EXTRAS='[postgres]' \
mesh-py/meshnode
2. Run Your First Node (Rootless Quick Start)#
Create a host state directory with strict permissions so your identity (keys.json), config.json, and SQLite stores persist across container rebuilds:
mkdir -p ~/.local/share/fleetmesh/node-1
chmod 700 ~/.local/share/fleetmesh/node-1
Initialize the node in a one-shot container. In rootless bridge mode, bind --face-host 0.0.0.0 inside the container and publish only to host loopback (127.0.0.1). Append --endpoint wss=wss://node-1.example.org if publishing behind a public TLS reverse proxy.
SELinux (
:Z): Keep:Zon Fedora, RHEL, Rocky, and AlmaLinux. On Debian/Ubuntu or macOS without SELinux, you may omit:Z.
podman run --rm \
-v ~/.local/share/fleetmesh/node-1:/var/lib/meshnode:Z \
docker.io/fleetmesh/meshnode:0.5.0a1 \
init /var/lib/meshnode \
--name node-1 \
--class edge \
--face-host 0.0.0.0 \
--face-port 7777 \
--relay wss://relay.fleetmesh.org
Run pre-flight validation (check exits 0 when ready) and start the hardened container:
podman run --rm \
-v ~/.local/share/fleetmesh/node-1:/var/lib/meshnode:Z \
docker.io/fleetmesh/meshnode:0.5.0a1 \
check /var/lib/meshnode
podman run -d \
--name meshnode-1 \
--restart=on-failure \
-p 127.0.0.1:7777:7777 \
-v ~/.local/share/fleetmesh/node-1:/var/lib/meshnode:Z \
--read-only \
--tmpfs /tmp:rw,noexec,nosuid,size=64m \
--cap-drop=ALL \
--security-opt=no-new-privileges \
docker.io/fleetmesh/meshnode:0.5.0a1 \
run /var/lib/meshnode
Inspect logs and run any meshnode CLI command inside the container via podman exec:
podman logs -f meshnode-1
podman exec meshnode-1 python3 -m fleetmesh_node.meshnode health /var/lib/meshnode
3. Production Services with Podman Quadlets (systemd)#
Podman Quadlets let systemd natively manage, restart, journal, and auto-start meshnode containers across reboots.
Option A: Rootless User Quadlet#
Enable lingering so user services start at boot without an active login session:
loginctl enable-linger "$USER"
mkdir -p ~/.config/containers/systemd
Create ~/.config/containers/systemd/meshnode-1.container:
[Unit]
Description=FleetMesh meshnode (node-1)
After=network-online.target
Wants=network-online.target
[Container]
Image=docker.io/fleetmesh/meshnode:0.5.0a1
ContainerName=meshnode-1
Exec=run /var/lib/meshnode
Volume=%h/.local/share/fleetmesh/node-1:/var/lib/meshnode:Z
PublishPort=127.0.0.1:7777:7777/tcp
ReadOnly=true
Tmpfs=/tmp:rw,noexec,nosuid,size=64m
DropCapability=ALL
NoNewPrivileges=true
HealthCmd=python3 -m fleetmesh_node.meshnode whoami /var/lib/meshnode --json
HealthInterval=30s
HealthTimeout=5s
HealthRetries=3
HealthStartPeriod=15s
[Service]
Restart=on-failure
RestartSec=5
TimeoutStopSec=20
[Install]
WantedBy=default.target
Reload systemd and start the generated unit (Quadlets wire [Install] automatically on daemon-reload; do not run systemctl enable):
systemctl --user daemon-reload
systemctl --user start meshnode-1.service
journalctl --user -u meshnode-1.service -f
Option B: Rootful Multi-Instance Template (meshnode@.container)#
For dedicated Linux hosts running one or more nodes under a non-privileged system user with Network=host (matching ops/roles/meshnode/templates/meshnode@.container.j2):
Create the dedicated host user and initialize
/var/lib/mesh-aas that UID/GID (--face-host 127.0.0.1when usingNetwork=host):sudo useradd --system --home-dir /var/lib/mesh-a --shell /usr/sbin/nologin meshnode sudo mkdir -p /var/lib/mesh-a && sudo chown meshnode:meshnode /var/lib/mesh-a && sudo chmod 700 /var/lib/mesh-a sudo podman run --rm \ --user "$(id -u meshnode):$(id -g meshnode)" \ -v /var/lib/mesh-a:/var/lib/mesh-a:Z \ docker.io/fleetmesh/meshnode:0.5.0a1 \ init /var/lib/mesh-a \ --name mesh-a \ --class anchor \ --face-host 127.0.0.1 \ --face-port 7777 \ --relay wss://relay.fleetmesh.org \ --endpoint wss=wss://node-a.example.org
Install
/etc/containers/systemd/meshnode@.container(replacing999:999with$(id -u meshnode):$(id -g meshnode)):[Unit] Description=FleetMesh meshnode %i (Podman) After=network-online.target Wants=network-online.target [Container] Image=docker.io/fleetmesh/meshnode:0.5.0a1 ContainerName=meshnode-%i Network=host User=999:999 Volume=/var/lib/%i:/var/lib/%i:Z Exec=run /var/lib/%i ReadOnly=true Tmpfs=/tmp:rw,noexec,nosuid,size=64m DropCapability=ALL NoNewPrivileges=true [Service] Restart=on-failure RestartSec=5 TimeoutStopSec=20 [Install] WantedBy=multi-user.target
Reload and start the instance:
sudo systemctl daemon-reload sudo systemctl start meshnode@mesh-a.service
Declarative export (experimental):
meshctl export --target quadletcan generate Quadlet units fromMeshNodeYAML manifests; see Manifests: export.
4. Podman Networking, Enrollment & Upgrades#
Bridge-Mode Proxy Trust#
Put a TLS reverse proxy (such as Caddy) in front of 127.0.0.1:7777 as shown in Networking, TLS & Relays. In rootless bridge mode (PublishPort=127.0.0.1:7777:7777), proxy connections enter the container from Podman’s virtual gateway subnet rather than 127.0.0.1, so add Podman’s bridge CIDRs to --trusted-proxy:
podman exec meshnode-1 python3 -m fleetmesh_node.meshnode relay-limits /var/lib/meshnode \
--trusted-proxy 127.0.0.1 \
--trusted-proxy ::1 \
--trusted-proxy 10.0.2.0/24 \
--trusted-proxy 10.88.0.0/16
Fleet Enrollment via podman exec#
Follow the enrollment and roster workflow in Keys, Fleets & Access, running the two node-side steps via podman exec:
# 1. Read the container's pubkey, then mint TOKEN on your operator workstation
podman exec meshnode-1 python3 -m fleetmesh_node.meshnode whoami /var/lib/meshnode
# 2. Apply the node-bound enrollment token inside the running container
podman exec meshnode-1 python3 -m fleetmesh_node.meshnode enrol /var/lib/meshnode "$TOKEN"
Quadlet Upgrades & Snapshots#
Upgrade: Pull the new pinned image tag, update
Image=in your.containerQuadlet file, then runsystemctl --user daemon-reload && systemctl --user restart meshnode-1.service. Follow the canary-first rollout checklist in Upgrades, Backups & Retirement.Backup: Stop the Quadlet briefly (
systemctl --user stop meshnode-1.service), archive~/.local/share/fleetmesh/node-1encrypted at rest, and restart.
5. Podman Troubleshooting#
Symptom |
Likely Cause |
Fix |
|---|---|---|
|
Missing SELinux label or UID/GID mismatch |
Add |
Reverse proxy returns |
Node bound to |
Re-bind |
|
|
Run the one-shot |
Rootless Quadlet does not start after reboot |
User lingering not enabled |
Run |
For protocol, relay, enrollment, and digest troubleshooting, see Troubleshooting & Opt-In Features.