User Podman containers in cockpit: Lingering and restart always

Hi all,

I’m new to Fedora, I know one of its strengths is Cockpit, so I tried using it to get Uptime Kuma running.

This was very easy, however, as soon as I log out the container stops (I know I have to configure “user lingering”). And, I can’t see any setting to get the container to restart on failure, or on reboot.

Are there “Cockpit native” ways to do this? Or is it now back to the command line (which is fine, I’m just curious how far Cockpit can take me).

Thank you.

Have you had a look on the Podman-Desktop application? It is available as a flatpak.

I do not know if this works for Fedora too … have you tested something like:
Configure User Lingering with Podman on Oracle Linux.

Thanx for responding, this concerns a headless box without a GUI, I was trying to see how far I can get with Cockpit.

I certainly can (and have in the past) configured User Lingering on the cli, I am just wondering if there is a Cockpit way.

I try to take this in consideration while responding you :wink:

The cockpit app is to control and verifier applications, services and logs on external systems, which gives you easy access to it. The description also mentions, to give you a web based access to it.

Lingering is a service configured for a specific user, which controls a container, to keep this service a live on, login/logout, reboot and any other interruptions.

Podman in Cockpit is available with an additional Application you have to install under Applications.

  • Did you do that?

If not please check it out and give feedback, if you see this option to configure such a service, including lingering.

  • Side note: The access to a terminal is available in cockpit too.
    Configure once in terminal and control always with cockpit …

As you can see from the link to the manual (Cockpit documentation — Cockpit Project) under “Usage,” it links to the RH customer portal. You may find the information there even without registering. If not, our only remaining option is to answer as many of the questions posed above as possible. This is the only way we can provide you with a well-founded answer from the community without conflicting with the services offered by the main sponsor.

P.S.
This answer is not AI generated :slight_smile:

I did indeed sudo dnf install cockpit-podman and podman is available, it is how I click-click installed and got running the Uptime Kuma container.

I guess I indeed can’t enable lingering from cockpit, logged in as the user I want lingering for then. I’ll do it via de CLI then: sudo loginctl enable-linger your-username

Also, the restart after reboot can be enabled in cockpit by setting “Restart policy” to “Always”, when making a container.

So now both issues are addressed.

Btw, I’m new to fedora (server), not new to Linux. I usually prefer infra-as-code but cockpit can be very fast to get things going and get an overview for one-off “pets” (forgive me the term).

(Btw2, I also have a bug in podman, in FireFox, some screens keeps flashing, presumably as they reload)

1 Like

I saw this also … however after updating, in cockpit before
using it solved the issue. It mentioned some security issues as reason for it.

Ok. Sorry if the explanations have been to long for you. I always considering that the OP is not the only one which is reading my comments. If you like you could mark your answer above as solution.

1 Like

I think the steps are turn on linger for the user.
Then add the container service to be started by the user’s systemd default.target.

No problem, thank you for your help. I also managed the restart after reboot now, it was just an option to tick (my bad). Thanx for the help!

1 Like