January 9, 2022

AdGuard Home on Ubiquiti Cloud Key: Update

I have noticed that a couple of things has changed since those original installation instructions were written in the reddit post I have referred to earlier:

  • If you have SD card installed, it is now mounted under /sdcard;
  • If you disable systemd-resolved service as recommended, CloudKey wouldn't boot. More specifically, the unifi-core service would go fail to launch.

Here are the updated steps which take these two issues into account.

# 1: Download and unpack adguard
cd /tmp
wget https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_armv7.tar.gz
tar -xzf AdGuardHome_linux_armv7.tar.gz
mv /tmp/AdGuardHome /opt/adguard
rm AdGuardHome_linux_armv7.tar.gz

# 2: Make var directory
mkdir /var/opt/adguard
ln -s /var/opt/adguard data

# 3: Turn off systemd-resolved
cp /etc/resolv.conf /tmp
systemctl stop systemd-resolved
systemctl disable systemd-resolved.service
unlink /etc/resolv.conf
mv /tmp/resolv.conf /etc

# 4: Run initial setup
./AdGuardHome
# Open http://[ip]:3000, change admin port, hit Ctrl+C when done

# 5: Setup as a service
./AdGuardHome -s install
systemctl status AdGuardHome.service
# Done. Open http://[ip]:[port].

# 6: Backup config
mkdir /sdcard/backup
cp /opt/adguard/AdGuardHome.yaml /sdcard/backup/AdGuardHome.yaml
Posted by Vadim at 12:41 PM | Comments (0) | TrackBack