Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For that Podman provides a nifty little trick: `podman generate systemd`[0] which allows you to generate systemd unit files for your pods and/or containers.

Once generated and enabled, your pods/containers act as systemd services that can be started, stopped etc.

[0]: https://docs.podman.io/en/latest/markdown/podman-generate-sy...



This is no longer necessary as of Podman 3.3 or so--there's a single Podman systemd unit that will launch all containers that have restart=always.


Interesting! Do you have by any chance a link the documentation about it, because so far all I could find are links to information about `podman generate systemd`.


That's awesome, I didn't know about that.

Looks like the service is called podman-restart.service on my system.


Yup. I use this for all my home server services like Plex, Adguard, etc.

I reboot my machine after kernel updates and everything comes up flawlessly.


This generator has even better systemd integration: https://github.com/containers/quadlet




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: