Login into server causes podman containers to restarts

It seems that anytime I log into my homeserver, podman containers are restarting:

❯ ssh [email protected]
[email protected]'s password:
Web console: https://homeserver.localdomain:9090/ or

Register this system with Red Hat Insights: insights-client --register
Create an account or view all your systems at
Last login: Wed Nov 22 21:38:24 2023 from ::ffff:
[podman@homeserver ~]$ podman ps
CONTAINER ID  IMAGE                                                 COMMAND               CREATED        STATUS                   PORTS                                                                                                                                             NAMES
6a4b5a1ca375                 node server/serve...  2 seconds ago  Up 3 seconds (starting)>3001/tcp                                                                                                                            uptime-kuma
3b97cda03874                        2 seconds ago  Up 2 seconds (starting)>8080/tcp,>8443/tcp,>8843/tcp,>8880/tcp,>3478/udp,>10001/udp  systemd-unifi_network_application
a6b35bd7ccd7                                              2 seconds ago  Up 3 seconds (starting)>53/udp,>53/tcp,>80/tcp                                                                                        systemd-pihole
e45ca3fde4bf                        mongod                2 seconds ago  Up 2 seconds (starting)>27017/tcp                                                                                                                          unifi_mongodb

The same happened yesterday at about 17:15 when I logged in via cockpit: all containers were created and restarted immediately after my login.

I'm using quadlet files to create systemd services and this is an example file:

Description=UniFi MongoDB

HealthCmd=CMD-SHELL mongo --eval 'db.runCommand({ping:1})'



I'm not sure if the latter is misconfigured or I'm missing something else.


  • Your containers don't restart, they just start at login time, because they stop when you log out. (Looking at system logs with journalctl -b will probably reveal this.)

    You're using quadlet to generate user services, not system services (hence systemctl --user), and those are managed by a "user service manager" instance that automatically starts on user login and stops on logout.

    Use loginctl enable-linger $USER to have your user service manager start on boot and remain running until system shutdown.