AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

AdGuard Home Installer on Raspberry Pi Allows Installation Into /tmp

Open GlenBod opened this issue 5 months ago • 5 comments

Prerequisites

Platform (OS and CPU architecture)

Custom (please mention in the description)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.107.77

Action

I debugged and corrected this with the help of CoPilot and it generated this summary for me. It's all entered into the Action block rather tan broken across the multiple fields - hope that's OK.

AdGuard Home Installer on Raspberry Pi Allows Installation Into /tmp, Producing a Non Persistent, Non Functional Systemd Service

Environment • Device: Raspberry Pi 4 • OS: Raspberry Pi OS Lite (Debian 12 / Bookworm, 64 bit) • AdGuard Home Version: Latest release (June 2026) • Install Method: AdGuardHome -s install from extracted tarball

Summary The AdGuard Home installer successfully completes when run from a temporary filesystem (/tmp), but the resulting installation is: • non persistent • non functional • unable to start via systemd • missing configuration directories • silently broken after reboot

The installer does not warn the user that /tmp is an invalid installation location, and the systemd service is created pointing to paths that disappear on reboot. Additionally, the installer does not detect or warn about missing IPv6 Router Advertisement capability, which results in IPv6 DNS failures unless the user manually deploys an external RA daemon.

What Happened

  1. Installer placed AdGuard Home into /tmp The tarball was extracted in /tmp, and the installer was run from there: /tmp/AdGuardHome/AdGuardHome -s install

The installer: • created a systemd service • reported success • started the service (temporarily) But because /tmp is a volatile tmpfs, the entire installation vanished on reboot.

Symptoms • systemctl status AdGuardHome → service failed • service pointed to non existent paths • config file missing • working directory missing • binary missing • logs missing This left the system in a broken state with no clear error message.

  1. Systemd service silently failed The generated service file referenced: /tmp/AdGuardHome/AdGuardHome /tmp/AdGuardHome/AdGuardHome.yaml

After reboot, these paths no longer existed.

Systemd reported: • “file not found” • “permission denied” • “failed to start AdGuard Home”

But the installer did not warn about the invalid installation path.

  1. Manual execution of the binary failed Running: /home/pimaster/AdGuardHome/AdGuardHome produced: • missing config file • missing working directory • permission errors

This confirmed the installation was incomplete and non persistent.

  1. IPv6 Related Installer Shortcomings AdGuard Home relies on IPv6 DNS, but the installer: • does not check whether the host is advertising IPv6 prefixes • does not warn when IPv6 DNS will fail due to missing Router Advertisements • does not detect that the router (Telus NH20A) cannot advertise custom DNS • does not provide guidance for IPv6 only or dual stack environments

As a result, IPv6 DNS queries failed until we manually deployed a separate RA daemon (dnsmasq) to advertise a ULA prefix and the Pi’s IPv6 DNS address. This is a common scenario on ISP locked routers, and the installer should detect or warn about it.

What We Had To Do To Fix It

  1. Remove the broken systemd service sudo systemctl stop AdGuardHome sudo systemctl disable AdGuardHome sudo rm /etc/systemd/system/AdGuardHome.service sudo systemctl daemon-reload

  2. Delete the incomplete installation rm -rf /tmp/AdGuardHome rm -rf ~/AdGuardHome

  3. Reinstall from a persistent directory mkdir ~/adguard cd ~/adguard tar -xvf AdGuardHome_linux_arm64.tar.gz sudo ./AdGuardHome/AdGuardHome -s install

This produced a correct, persistent installation.

  1. Required Configuration File Fixes The installer created an incomplete or incorrect config directory structure. We had to manually correct:

AdGuardHome.yaml paths The service expected: /opt/AdGuardHome/AdGuardHome.yaml

But the installer placed it elsewhere. We had to manually move or recreate the directory structure so that: /opt/AdGuardHome/ AdGuardHome AdGuardHome.yaml data/ work/ existed and matched the systemd service’s expectations.

Permissions We had to ensure: sudo chown -R adguard:adguard /opt/AdGuardHome so the service could read/write logs and config.

  1. IPv6 Fixes Required Outside AdGuard Home Because the router could not advertise custom DNS or ULA prefixes, IPv6 DNS failed until we manually deployed:

dnsmasq RA configuration port=0 interface=eth0 interface=wlan0 enable-ra dhcp-range=fd00:1:1::,fd00:1:1::ffff,ra-only dhcp-option=option6:dns-server,[fd00:1:1::10]

This allowed all LAN devices to: • auto configure ULAs • route IPv6 correctly • reach AdGuard Home via IPv6

AdGuard Home itself does not provide RA capability, but the installer should warn when IPv6 DNS will not function without it.

Recommendations for the AdGuard Team

  1. Block installation from /tmp or any tmpfs If $PWD is a volatile filesystem, the installer should: • refuse to install • or warn explicitly • or prompt for a safe installation directory This would prevent the entire failure.

  2. Validate systemd service startup After installation, the script should: • verify the service starts • verify the binary path exists • verify the config directory exists • report errors clearly

  3. Validate IPv6 environment The installer should detect: • missing Router Advertisements • missing IPv6 DNS reachability • routers that cannot advertise custom DNS • lack of ULA prefix And warn the user that IPv6 DNS will not function without external RA support.

  4. Improve documentation Documentation should include: • recommended installation paths • warnings about /tmp • IPv6 requirements • troubleshooting steps for systemd failures

Closing Notes Once installed outside /tmp and with proper IPv6 RA support, AdGuard Home works flawlessly on Raspberry Pi. The issues encountered were entirely due to the installer allowing installation into a volatile directory and not validating IPv6 prerequisites. A few small improvements to the installer would prevent this class of failure entirely.

Expected result

See details above

Actual result

See details above

Additional information and/or screenshots

See details above

GlenBod avatar Jun 09 '26 20:06 GlenBod

Or - don't install it from tmp to begin with?

Dynamic5912 avatar Jun 10 '26 06:06 Dynamic5912

Thank you for your feature request. We'll consider implementing your suggestions.

sofvaskina avatar Jun 22 '26 09:06 sofvaskina

Understood about scope and variety of platforms.

It is true though that anyone getting a zip/tar file would usually expand it in to some temporary space and run the install from there. And if the install assumes that you want to install into the “current directory” then (as I found) that can be problematic.

Can I suggest instead that the installer offer a choice and express the implications of each.

You can install into temporary/ephemeral storage and that implies …

Or you can create a stable directory with the following permissions and install to there and that implies ….

What caused me trouble is that I expanded into /tmp and didn’t realize it had therefore installed into /tmp and it took a while to figure out why the install didn’t seem persistent. Look, I’m not hugely experienced in *nixes so just doing fairly typical things left me in a non-functional place. I guess I kind of expected that if I needed to create a directory to install this into then there would be a question or option … but it never asked.

If you make system check that then that eliminates that issue, but had the app been installed in the “appropriate” place then that would have been OK.

Regards – Glen C Bodie

Web: http://bodie.ca http://bodie.ca

Snail Mail: 46 Georgia Wynd, Delta, BC, Canada V4M 1A5

From: Cheddoleum @.> Sent: Thursday, June 25, 2026 07:27 To: AdguardTeam/AdGuardHome @.> Cc: GlenBod @.>; Author @.> Subject: Re: [AdguardTeam/AdGuardHome] AdGuard Home Installer on Raspberry Pi Allows Installation Into /tmp (Issue #8422)

https://avatars.githubusercontent.com/u/6296075?s=20&v=4 Cheddoleum left a comment (AdguardTeam/AdGuardHome#8422) https://github.com/AdguardTeam/AdGuardHome/issues/8422#issuecomment-4800388572

This kind of guardrailing seems out of scope to me. /tmp is a platform convention, but not a rule. To hard code a list of "directories ordinarily considered temporary" seems out of scope for an application and it makes assumptions that impede what may be valid cases for experienced users.

If the problem is that systemd should reject creation of a nonpersistent service due to the directory being nonpersistent, that strikes me as in-scope for systemd: systemd is in a position to know which directories are temporary per-distro and per installation, where an application not, without special case coding.

— Reply to this email directly, view it on GitHub https://github.com/AdguardTeam/AdGuardHome/issues/8422?email_source=notifications&email_token=BOGH36ZTNMKN6YUDRRXQW7L5BUZDRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBQGAZTQOBVG4ZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4800388572 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BOGH36YXGS5KZTUO5H767Z35BUZDRAVCNFSNUABEKJSXA33TNF2G64TZHM3DENZRGI4DSOJ3JFZXG5LFHM2DMMRVGQZDSNJRGOQXMAQ . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BOGH366BMWWQNZZ5KVI5CL35BUZDRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBQGAZTQOBVG4ZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/BOGH36ZOY75ZBYPNMMN6LV35BUZDRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBQGAZTQOBVG4ZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA . Download it today! You are receiving this because you authored the thread. https://github.com/notifications/beacon/BOGH367HCBSNJDQUZU53GQL5BUZDRBFCNFSM6AAAAAC2BQDYTSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTYAAAAACHRADXOKM4TFMFZW63VGMF2XI2DPOI.gif Message ID: @.*** @.***> >

GlenBod avatar Jun 25 '26 19:06 GlenBod

Verified on current master at 369d4761: the persistence hazard is real. Installation uses the executable directory as the work directory and service path, so installing from /tmp persists that volatile path into the service.

The narrower claim that installation silently ignores an immediate service start failure is not supported by the current service flow: Start is called and synchronous errors are returned.

The smallest nonbreaking improvement is therefore a prominent warning, not a hard refusal, when the resolved executable/work directory is under the OS temporary directory. Continuing must remain possible for intentional ephemeral installations.

Tests should cover resolved and symlinked temporary paths, persistent paths, an explicit continue path, and unchanged propagation of install/start errors. IPv6 router-advertisement detection is a separate network-deployment concern and should stay out of this installer change.

Sil3ntVip3r avatar Aug 05 '26 01:08 Sil3ntVip3r

Agreed

Regards - Glen Bodie @.***

On Tue, Aug 4, 2026, 18:59 Sil3ntVip3r @.***> wrote:

Sil3ntVip3r left a comment (AdguardTeam/AdGuardHome#8422) https://github.com/AdguardTeam/AdGuardHome/issues/8422#issuecomment-5186656845

Verified on current master at 369d4761: the persistence hazard is real. Installation uses the executable directory as the work directory and service path, so installing from /tmp persists that volatile path into the service.

The narrower claim that installation silently ignores an immediate service start failure is not supported by the current service flow: Start is called and synchronous errors are returned.

The smallest nonbreaking improvement is therefore a prominent warning, not a hard refusal, when the resolved executable/work directory is under the OS temporary directory. Continuing must remain possible for intentional ephemeral installations.

Tests should cover resolved and symlinked temporary paths, persistent paths, an explicit continue path, and unchanged propagation of install/start errors. IPv6 router-advertisement detection is a separate network-deployment concern and should stay out of this installer change.

— Reply to this email directly, view it on GitHub https://github.com/AdguardTeam/AdGuardHome/issues/8422?email_source=notifications&email_token=BOGH3662AN7RR5GPZPIJWVL5IKIIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJYGY3DKNRYGQ22M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5186656845, or unsubscribe https://github.com/notifications/unsubscribe-auth/BOGH365JTSAPZIGJALTEAS35IKIIHAVCNFSNUABEKJSXA33TNF2G64TZHM3DENZRGI4DSOJ3JFZXG5LFHM2DMMRVGQZDSNJRGOQXMAQ . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BOGH366L6W6FG7NAYZWHT5L5IKIIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJYGY3DKNRYGQ22M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/BOGH3636VK6HGWRQCJCEOSD5IKIIHA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJYGY3DKNRYGQ22M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.***>

GlenBod avatar Aug 05 '26 02:08 GlenBod