Podman on debian How to fix podman no services after restart
Piotr

Piotr @finloop

About: Software Engineer @software-mansion with 3 years of experience | C++, Python, Data Science | Open Source Contributor

Location:
Lublin, Poland
Joined:
Sep 20, 2021

Podman on debian How to fix podman no services after restart

Publish Date: Apr 12
0 1

I noticed that with static build of podman, services didn’t start after I restarted my server, even though they had Restart=Always policy.

This is an issue that can popup when installing podman from a static build installation on debian.

Turns out that this issue is due to missing podman-restart.service that starts all the services after boot.

This file was originally from github repo, but with static podman build it is not present.

Create directory for

mkdir -p ~/.config/systemd/user/

Enter fullscreen mode Exit fullscreen mode

Create file podman-restart.service:

[Unit]
Description=Podman Start All Containers With Restart Policy Set To Always
Documentation=man:podman-start(1)
StartLimitIntervalSec=0
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
RemainAfterExit=true
Environment=LOGGING="--log-level=info"
ExecStart=/usr/local/bin/podman $LOGGING start --all --filter restart-policy=always
ExecStop=/usr/local/bin/podman $LOGGING stop --all --filter restart-policy=always

[Install]
WantedBy=default.target

Enter fullscreen mode Exit fullscreen mode

Reload units:

systemctl --user daemon-reload; journalctl -f

Enter fullscreen mode Exit fullscreen mode

Enable service and timer:

systemctl --user enable podman-restart.service

Enter fullscreen mode Exit fullscreen mode

Comments 1 total

  • Brigitte Hams
    Brigitte HamsApr 17, 2025

    Dearest, with all due respect and humanity, I am writing to you for humanitarian reasons. My husband is the late Mr. John Smith, founder of J.P. Smith Industries in France and a member of the European Union. Before my husband passed away last year, he left me an inheritance of $10 million. Unfortunately, shortly after receiving my inheritance, my doctor told me that I only had six months to live. After accepting my condition, I decided to give the money to a kind man. He will use it to help the disadvantaged and spread the word of God. Since I have no children or heirs, I would like to leave my money to you. I hope to hear from you. Tell us about your plans. God bless you. Mrs. Brigitte Hams. Email: hamsbrigitte600@gmail.com

Add comment