AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
23.62k stars 1.74k forks source link

Feature Request: Guide for Podman Container #2809

Open EntropySmoke opened 3 years ago

EntropySmoke commented 3 years ago

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!

ameshkov commented 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.

foxyroxyrooster commented 3 years ago

replace 'docker' in official adguardhome docs with 'podman' - that's pretty much all the difference there is. Not worth any effort from adguardhome developers

tackynugget commented 2 years ago

@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

Created the 10-dns.sh file: touch /mnt/data/on_boot.d/10-dns.sh

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

Created the 20-dns.conflist file: touch /mnt/data/podman/cni/20-dns.conflist

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