Podman Container Startup Delays: Network-Online.target Dependency Issue
Containers managed by Podman and Quadlet sometimes hang during startup, timing out after 90 seconds. The issue is typically not with Podman itself, but with its systemd service dependency network-online.target not being activated. This article presents three solutions.
Symptom
After configuring a container with Quadlet, running systemctl --user start my-container.service hangs for about 90 seconds before timing out. Related issues have been discussed in the community, for example Podman GitHub Issue #24796.
Root Cause
Quadlet-generated systemd service units typically include a dependency: After=network-online.target.
network-online.target is a systemd target indicating the network is fully ready. But on some distributions or network configurations, the network management component (NetworkManager or systemd-networkd) may not correctly notify systemd that the network is “online”, leaving network-online.target permanently inactive. All services depending on it—including Podman container services—wait indefinitely.
Solutions
Method 1: Modify the Quadlet File
If your container doesn’t require the network to be fully ready before starting, you can disable the default network dependency in the Quadlet file.
Add this to your .container file:
[Quadlet]
DefaultDependencies=falseThis tells Quadlet not to automatically add After=network-online.target when generating the service file. After editing, run:
systemctl --user daemon-reloadYour container will now start without waiting for network-online.target. This method affects only the specific container and persists across reboots.
Method 2: Manual Trigger
A temporary workaround if you don’t want to modify the Quadlet file:
sudo systemctl start network-online.targetThis manually marks network-online.target as active, unblocking all waiting services. But you’ll need to re-run it after each system restart.
Method 3: Dummy Service for Automatic Trigger
For a system-wide fix, create a dummy service to automatically activate network-online.target:
# /etc/systemd/system/podman-network-online-dummy.service
[Unit]
Description=Activate network-online.target for Podman containers
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/echo Activating network-online.target
[Install]
WantedBy=multi-user.targetAfter creating the file, run:
sudo systemctl daemon-reload
sudo systemctl enable --now podman-network-online-dummy.serviceThis service itself is just a placeholder, but its Wants=network-online.target and After=network-online.target directives will properly trigger network-online.target during boot, ensuring it gets activated.