# 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](https://github.com/containers/podman/issues/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:

```ini
[Quadlet]
DefaultDependencies=false
```

This tells Quadlet not to automatically add `After=network-online.target` when generating the service file. After editing, run:

```bash
systemctl --user daemon-reload
```

Your 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:

```bash
sudo systemctl start network-online.target
```

This 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`:

```systemd
# /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.target
```

After creating the file, run:

```bash
sudo systemctl daemon-reload
sudo systemctl enable --now podman-network-online-dummy.service
```

This 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.


---

> Author: Nite  
> URL: https://www.nite07.com/en/posts/podman-stuck/  

