Open EntropySmoke opened 3 years ago
Since we don't have any experience with Podman Container, I'll mark this as "help wanted".
If anyone could suggest a guide, we'd be happy to add it to AGH wiki.
replace 'docker' in official adguardhome docs with 'podman' - that's pretty much all the difference there is. Not worth any effort from adguardhome developers
@EntropySmoke That same GitHub user has decent instructions on how to set this up. Have you seen this? https://github.com/boostchicken/udm-utilities/tree/master/AdguardHome
Here's the gist of how I got it working on my UDM Pro.
Enabled SSH
Backed up settings
Created a new corporate network via unifi.ui.com for AdGuardHome
Prepared the UDMP for the AdGuard boot script by following these steps https://github.com/boostchicken/udm-utilities/tree/master/on-boot-script
ssh root@[UDMPRO IP Address]
unifi-os shell
curl -L https://raw.githubusercontent.com/boostchicken/udm-utilities/master/on-boot-script/packages/udm-boot_1.0.2_all.deb -o udm-boot_1.0.2_all.deb
dpkg -i udm-boot_1.0.2_all.deb
mkdir /mnt/data/AdGuardHome-Conf
and mkdir /mnt/data/AdGuardHome-Work
exit
Created the 10-dns.sh file: touch /mnt/data/on_boot.d/10-dns.sh
vi /mnt/data/on_boot.d/10-dns.sh
i
VLAN=[VLAN for AdGuardHome]
IPV4_IP="[IP Address of the AdGuardHome app]”
IPV4_GW="[Gateway address in CIDR format]”
FORCED_INTFC=[list of VLANs for AdGuardHome to protect prefixed with br and enclosed in double-quotes--ie "br35 br63 br 491" for VLANs 35, 63, 491. If this is not configured, all traffic will look like it comes from the adguardhome gateway]
CONTAINER=adguardhome
[Esc]
:wq
Inspected the permissions for the 10-dns.sh script and saw root had RW, but not X permissions: ls -l /mnt/data/on_boot.d/10-dns.sh
chmod u=rwx /mnt/data/on_boot.d/10-dns.sh
ls -l /mnt/data/on_boot.d/10-dns.sh
/mnt/data/on_boot.d/10-dns.sh
Created the 20-dns.conflist file: touch /mnt/data/podman/cni/20-dns.conflist
vi /mnt/data/podman/cni/20-dns.conflist
i
"master": "br####",
- Deleted the “mac” section
"address": "[CIDR range for the AdGuardHome network configured above]”,
"gateway": "[AdGuardHome gateway IP address]”
[Esc]
:wq
Ran this command to execute
podman run -d --network dns --restart always \
--name adguardhome \
-v "/mnt/data/AdGuardHome-Conf/:/opt/adguardhome/conf/" \
-v "/mnt/data/AdGuardHome-Work/:/opt/adguardhome/work/" \
--dns=127.0.0.1 --dns=1.1.1.1 \
--hostname adguardhome \
adguard/adguardhome:latest
Disconnected from UDM PRO SSH session: logout
Disabled SSH
I got this error: “Error: error creating container storage: the container name "adguardhome" is already in use by "[buncha numbers and letters]". You have to remove that container to be able to reuse that name.: that name is already in use” BUT accessing AdGuardHome via the specified IP in the browser works.
If you mess up you can remove the container: Podman rm adguardhome
Might need to rerun the 10 script again if it doesn’t work.
AdGuardHome doesn't auto-update. I started this discussion here to see if someone might be so kind as to assist: https://github.com/boostchicken/udm-utilities/discussions/287
Some routers support Podman Container that can run Pi-Hole and/or AdGuard Home. For example, UniFi Dream Machine (UDM) and UniFi Dream Machine Pro (UDM-Pro) from Ubiquiti are supposed by these tools that can allow you to run AdGuard Home in Podman Container - https://github.com/boostchicken/udm-utilities/tree/master/on-boot-script .
AGH does an incredible job explaining how to install AGH on Raspberry Pi and OpenWRT with step-by-step instructions. A similar guide or maybe even a plugin on how to make AGH run on UDM/UDM-Pro in a Podman Container are greatly desired!