Repository navigation
Start containers with a restart policy at boot - #48
Merged
Merged
Conversation
Podman has no daemon, so restart: unless-stopped did nothing after a reboot, and the media stack stayed down. Enable the podman-restart.service user unit for every user. It starts containers whose policy is always or unless-stopped. The Quadlet containers have no restart policy, so systemd alone starts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
After the reboot on 2026-11-08, the media stack and
heathen-trainer-1stayed down, although their restart policy isunless-stopped. Podman has no daemon. At boot, only thepodman-restart.serviceuser unit starts containers by their restart policy, and that unit was disabled for thesibyluser.The change
os/Containerfileaddspodman-restart.servicetosystemctl --global enable. The unit runspodman start --all --filter should-start-on-boot=true. That starts containers withalwaysorunless-stopped, but not anunless-stoppedcontainer that its owner stopped.noon the box, so the unit does not start them a second time.Verification
/etc/systemd/user/default.target.wants/podman-restart.servicepoints to/usr/lib/systemd/user/podman-restart.service.bootc container lintpasses 14 checks.🤖 Generated with Claude Code