I run 2 copies of AdGuard Home for ad-blocking on my local network. I didn't want to have to duplicate settings across the 2 instances I run.
I discovered adguardhome-sync which allows settings to be synchronised to replica instances. Neat!
But I hit a problem with the instance I had running as a Home Assistant Addon.
The instance I run as a replica is via a Home Assistant Addon and I wasn't sure how to get the config to work properly.
The base docker image for the sync app (bakito/adguardhome-sync) shows a yaml config file. So I started to create it:
cron: "*/10 * * * *" runOnStart: true origin: url: http://nuc.brunty.local:3000 username: [insert your own username here] password: [insert your own password here] replica: # url of the replica instance url: [insert your own replica URL here] username: [insert your own username here] password: [insert your own password here]
origin instance running via
nuc.brunty.local was easy enough, I'd set that up myself in Portainer. So I configured the port, credentials etc.
But the instance running as a
replica via I hadn't setup myself. I'd just clicked some buttons in a UI within Home Assistant.
I'd installed it via the addon. And I needed to know the port that the web interface ran on. I also needed a username and password.
I searched online, and tweeted out asking if anyone had done it before.
Anyone running @AdGuard via the @home_assistant addon know of the credentials it uses?— Matt Brunt (@Brunty) May 5, 2022
I'd like to see if I can use https://t.co/1B0P5ns5gz to sync settings between the two instances I'm running (the other is on a separate system under portainer)
It seems like no-one had posted anything anywhere.
So, I searched the addon issues and found this: https://github.com/hassio-addons/addon-adguard-home/issues/201
It is the Home Assistant credentials, assuming you have exposed the web interface on a port.
Oh, it uses Home Asssitant credentials? Neat.
I went back to the addon page and noticed that there was an option to "Show disabled ports"
So I turned that option on and a "Web interface" option appeared. So I configured that there. Neat!
I also disabled SSL as I don't need it locally (this isn't accessible outside of my local network).
Now, I didn't want to use my main Home Assistant user account for this as that's an owner (principle of least privilege yo!)
So I setup a new user as a regular user, no admin permissions or anything. I can now use that username and password to access AdGuard Home!
So, here's my config for the sync setup:
cron: "*/10 * * * *" runOnStart: true origin: url: http://nuc.brunty.local:3000 username: [insert your own username here] password: [insert your own password here] replica: # url of the replica instance url: http://homeassistant.brunty.local:3000 username: [insert your own username here] password: [insert your own password here]