Update Adguard package and persistent logs [Tutorial]

This guide assumes you installed and configured the opkg release of Adguard home from the software packages repo, and as such are running an out of date version, and don’t feel like a full reinstall.
The opkg version installs to /etc/adguardhome for the config files and /tmp for filters, logs. These get lost upon boot so we will optionally fix this. You will need a mounted disk on /srv setup already.

I took some great hints from this post.

  1. Make a backup of your configuration files
    cp /usr/bin/AdGuardHome /usr/bin/AdGuardHome.old
    cp /etc/adguardhome.yaml /etc/adguardhome.yaml.backup

  2. Make temp directory for working with our files and download and prep files for replacement
    mkdir /overlay/tmp
    cd /overlay/tmp

wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_armv7.tar.gz

tar -xzvf ./AdGuardHome_linux_armv7.tar.gz

cd AdGuardHome

  1. Stop AGH service
    /etc/rc.d/K89adguardhome stop

  2. Replace the binary
    cp ./AdGuardHome /usr/bin/

  3. Start AGH service
    /etc/rc.d/K89adguardhome start

  4. Log back into your AGH console and check your settings.
    You should now be on Version: v0.107.38 at the time of this writing or newer.

Optional working directory change for /srv instead of /tmp so you retain logs:
‘mkdir /srv/adguardhome’
‘chmod 755 /srv/adguardhome’

  1. Edit /etc/config/adguardhome
    to match mine:
config adguardhome config
	# Where to store persistent data by AdGuard Home
	#option workdir /var/adguardhome
	option workdir /srv/adguardhome
  1. Restart adguardhome
    /etc/rc.d/K89adguardhome restart

  2. You should see files start to populate:

Now you are not multiple versions behind on the stable release, and can keep records for much longer.

I hope this helps somebody out there.


Thanks for your help. It’s work for me. Great job.

1 Like