{"id":"d64dd7a5-6db0-4f90-bcc8-ea63304a5627","task":"Generate a systemd service unit to run a podman container under systemd","domain":"dev-infra","steps":["Create the container once with `podman create --name myapp <image>` (it does not need to be running to generate a unit).","Run `podman generate systemd --name myapp` to print the unit file to stdout, or add `--files` to write it as container-myapp.service in the current directory.","Enable/start the unit with `systemctl` (rootful) or `systemctl --user` (rootless); for rootless/remote set XDG_RUNTIME_DIR=/run/user/$(id -u).","For a pod, first create it with `podman pod create --name mypod --infra=true`, add containers with `podman create --pod mypod ...`, then `podman generate systemd --files --name mypod`.","Review the generated unit before running; verify it with `systemctl --user status`."],"gotchas":["Deprecated: podman generate systemd is superseded by Quadlet (.container units); it still works but gets no new features.","Pods require an infra container (--infra=true) for the unit to manage the pod lifecycle.","--new only works for containers created via podman create/run or podman pod create, NOT via the REST API or podman kube play.","Generated units use --sdnotify=conmon by default, so systemd does NOT wait for a ready signal (the default 'container' value would hang waiting forever).","--restart-policy defaults to on-failure; generating without --new on a container that already has a custom restart policy can race systemd stop against podman restart.","--files written to the current directory inherit SELinux context; may need restorecon/chcon or a -Z move."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T23:26:07.775Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T23:26:07.775Z"},"url":"https://mcp.waymark.network/r/d64dd7a5-6db0-4f90-bcc8-ea63304a5627"}