service adguardhome not starting at boot

Started by neek, November 26, 2025, 07:13:51 PM

Previous topic - Next topic
I've installed the adguardhome plugin from mimugmail. It was all working well. Some time ago, I think maybe when I upgraded from 25.1 -> 25.7, the plugin stopped loading at boot time. Every time after a reboot, I now need to ssh into the box and manually start it with 'service adguardhome start'. After that, it stays running and all is well. Is there some magic I need to do to force it to always run at boot? I learned recently that opnsense uses a mechanism other than /etc/rc.d to start its services. Any suggestions?

Uninstall & reinstall via System > Firmware > Plugins?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

December 08, 2025, 12:11:22 AM #2 Last Edit: December 08, 2025, 06:16:18 AM by neek Reason: formatting
Thanks. I finally had time to try this, and unfortunately, it did not help. When I uninstalled the adguardhome plugin, it did correctly delete /usr/local/AdGuardHome. I reinstalled, restored my AdGuardHome.yaml, and rebooted, but the service didn't start.

Manually running the service after boot starts fine.

Is there some kind of facility to write boot / service logs to a file?

Is it possible some service at boot time incorrectly takes port 53, adguardhome fails to load, then the other service moves to a different port?

any clues in /var/log/AdGuardHome/AdGuardHome.log ?
You might need to search around the time of the attempted start i.e. boot of OPN, because the log is noisy.
Only one service can use a port at any given time, so if your manual start succeeds, then there won't be another service using it. Your manual start would simply fail.

It looks like when it tries to create the UDP bind on my openvpn interface, that fails (192.168.99.x, below). My guess is the system is bringing up adguardhome before openvpn has had a chance to start and create that interface. In my config, I only see interfaces where I want adguardhome to run. I don't see an option for disabling just UDP on one of the interfaces. When I temporarily disabled adguardhome on the whole VPN network, it did come up successfully.

Piece of the log from the failed launch at boot
2025/12/10 18:54:33.531933 [info] dnsproxy: creating udp server socket addr=192.168.40.1:53
2025/12/10 18:54:33.531976 [info] dnsproxy: listening to udp addr=192.168.40.1:53
2025/12/10 18:54:33.531992 [info] dnsproxy: creating udp server socket addr=192.168.41.1:53
2025/12/10 18:54:33.532060 [info] dnsproxy: listening to udp addr=192.168.41.1:53
2025/12/10 18:54:33.532076 [info] dnsproxy: creating udp server socket addr=192.168.80.1:53
2025/12/10 18:54:33.532124 [info] dnsproxy: listening to udp addr=192.168.80.1:53
2025/12/10 18:54:33.532140 [info] dnsproxy: creating udp server socket addr=192.168.99.1:53
2025/12/10 18:54:33.532196 [info] dnsproxy: warning: binding attempt=1 err="listen udp 192.168.99.1:53: bind: can't assign requested address"
2025/12/10 18:54:33.533087 [error] closing query log: flushing log buffer: nothing to write to a file
2025/12/10 18:54:33.533120 [fatal] starting dns server: configuring listeners: listening on udp addr 192.168.99.1:53: listening to udp socket: listen udp 192.168.99.1:53: bind: can't assign requested address

seems that way. In my setup I don't have this problem, probably because I don't bother with selecting interfaces for AdG. That is where the firewall rules come into their own. So my AdGuard has in its config
dns:
  bind_hosts:
    - 0.0.0.0
  port: 53