this post was submitted on 05 Jan 2026
5 points (100.0% liked)

Podman

175 readers
3 users here now

founded 2 years ago
MODERATORS
 

With docker-compose, containers would start on boot. It was maybe because I had restart: always on.

Is there a way something similar with podman-compose?

I see mentions of creating custom systemd scripts to run podman-compose to start containers, but is there something already baked in podman-compose that I can use?

all 12 comments
sorted by: hot top controversial new old
[–] hosaka@programming.dev 5 points 1 week ago (1 children)

Podman Quadlets is what you're after, I think.

[–] dudesss@lemmy.ca 1 points 12 hours ago (1 children)

I implemented these, but my containers are not starting on system boot. I even set restart: always

[–] hosaka@programming.dev 2 points 56 minutes ago* (last edited 55 minutes ago) (1 children)

Might be obvious but did you enable the Quadlets? So systemctl enable quadlet.service or whatever the equivalent is. I think the quadlet is just a regular systemd unit.

Edit: I noticed you already got an answer!

[–] dudesss@lemmy.ca 1 points 42 minutes ago

No need to enable, it won't work nor do anything. Do need to systemctl --user daemon-reload

[–] lambalicious@lemmy.sdf.org 4 points 1 week ago

Not something baked-in, no, since the entire point of podman is that it's server- (service-)less.

However they do have a command to manually launch the respective user's podman manager, which IIRC is podman system service -t0 (note: runs in the foreground) so if you add that to a service entry (eg.: via runit user units or systemd user scopes) or just launch it via your user crontab's @reboot, it should work without issues.

This is literally my runit user unit for podman:

#!/bin/sh
export XDG_RUNTIME_DIR=/run/user/1000
exec podman system service -t0 
[–] Feyd@programming.dev 2 points 1 week ago (2 children)

You're looking for podlets

[–] dudesss@lemmy.ca 1 points 8 hours ago (1 children)

Any idea how I can get Quadlet to start on system boot?

[–] Feyd@programming.dev 2 points 7 hours ago (1 children)
[–] dudesss@lemmy.ca 1 points 4 hours ago* (last edited 4 hours ago) (1 children)

This worked! I searched through so many threads trying to find an answer, and this was the answer. Thank you so much. I only needed the below text added to my ~/.config/containers/systemd/my-custom-quadlet.container. Nice and simple:

[Install]
WantedBy=default.target
[–] Feyd@programming.dev 2 points 3 hours ago

Happy to help! Arch wiki is often a great resource even when using other distros

[–] dudesss@lemmy.ca 2 points 1 week ago* (last edited 1 week ago)

This looks great! But I'm seeing here that it hasn't been updated since November 2024.

https://github.com/containers/podlet