#1072225 nut-server.service fails to start if host is on DHCP

Package:
nut-server
Source:
nut-server
Description:
network UPS tools - core system
Submitter:
James Klaas
Date:
2026-10-04 23:03:02 UTC
Severity:
normal
#1072225#5
Date:
2024-05-30 17:27:25 UTC
From:
To:
I was puzzled that nut-server.service was not starting on my
workstation. I had
installed it to use with HomeAssistant.

I tracked it down to the service file not requiring
network-online.target, but
only network.target.

I replaced all the instances of network.target with
network-online.target and
now the nut server starts correctly every time.

I checked nut-server_2.8.1-3.1+b1_amd64.deb and nut-server.service still
only
uses network-online.target

This may slow some installations that have static IP assignments.

#1072225#10
Date:
2026-10-04 22:45:30 UTC
From:
To:
Dear Maintainer,

It does not fail to start, but simply doesn't listen on the IP address (since it's not there yet). It seems to be a deliberate choice from upstream since the service file has a comment saying:

# The `upsd` is a networked service (even if bound to a `localhost`)
# so it requires that the OS has some notion of networking already.
# Extending the unit does not require *this* file to be edited, you
# can instead drop in an additional piece of configuration, e.g. to
# require that NUT data server only starts after external networking
# is configured (usable IP addresses appear in the system) you can
# add a `/etc/systemd/system/nut-server.service.d/network.conf` with:
#   [Unit]
#   Requires=network-online.target
#   After=network-online.target

But this still feels like a bug here since that suggested configuration is required for the LISTEN configuration to be respected.