# Installing AdGuardHome in a container

**URL:** <https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914>\
**Category:** Configuration\
**Created:** [September 27, 2026, 10:04am UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914 "2026-09-27T10:04:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diabolo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/d78d45/32.png) [@Diabolo](https://community.gladysassistant.com/u/Diabolo)\
**Post date:** [September 27, 2026, 10:05am UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/1 "2026-09-27T10:05:00Z")

</div>

Hello, As a validation for my migration from HA to Gladys, I started installing a test platform.

I installed Ubuntu Server on a mini PC (I already have a file server with Ubuntu-server). I installed Docker and Gladys as indicated in: [Installation avec Docker | Gladys Assistant](https://gladysassistant.com/fr/docs/installation/docker/) I noted that it might be relevant to mention in this documentation that it is desirable for the base OS partitioning to create a separate partition for /var if possible large enough, on the other hand the /home partition does not need to be as large as a NAS. I was able to connect to Gladys and create my local account, thanks to the documentation!

I then installed AdGuardHome again following the instructions at: [adguard/adguardhome - Docker Image](https://hub.docker.com/r/adguard/adguardhome) Everything seems to have gone well but not entirely in fact.

When querying Docker:

`me@my_machine:~$ sudo docker ps`  
`CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES`  
`d9a23ec27f14 adguard/adguardhome "/opt/adguardhome/Ad…" 40 seconds ago Up 3 seconds adguardhome`  
`b21791a177ff gladysassistant/gladys:v5 "docker-entrypoint.s…" 18 hours ago Up 3 minutes gladys`

Everything seems to be going well but I cannot connect to http://my\_local\_ip:3000 (the browser can’t reach it).

Looking more closely at the installation logs, I find:

```auto
me@my_machine:~$ sudo docker run --name adguardhome
--restart unless-stopped
-v /my/own/workdir:/opt/adguardhome/work
-v /my/own/confdir:/opt/adguardhome/conf
-p 53:53/tcp -p 53:53/udp
-p 67:67/udp -p 68:68/udp
-p 80:80/tcp -p 443:443/tcp -p 443:443/udp -p 3000:3000/tcp
-p 853:853/tcp
-p 784:784/udp -p 853:853/udp -p 8853:8853/udp
-p 5443:5443/tcp -p 5443:5443/udp
-d adguard/adguardhome
d9a23ec27f14785f589c5e9e0ade5aa3c3f08bda22189492597d7857bedcc78a
docker: Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint adguardhome (6ba91471a3e357a25892af051cc5b96d43c30a1decaa09c0ca72bda48f6ce2f6): failed to bind host port 0.0.0.0:53/tcp: address already in use

Run 'docker run --help' for more information

```

There is an error message that seems to say that port 53 is already in use. A port redirection issue?

Thanks in advance for your insights.

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [September 27, 2026, 10:17am UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/2 "2026-09-27T10:17:08Z")

</div>

I’m not an expert, so I entrusted this to someone more skilled than me and here is the answer:

This is not a port redirection issue. Port 53 is already in use **on the machine itself** , and by fixing it you will encounter a second conflict, so it’s best to resolve them together.

**1. Port 53: systemd-resolved**

On Ubuntu Server, `systemd-resolved` runs a small local DNS server on `127.0.0.53:53`. Docker can therefore not reserve `0.0.0.0:53` for AdGuard. To check:

```auto
sudo ss -lntup | grep ':53 '

```

You should see `systemd-resolve`. The solution, which is also documented by AdGuard, is to disable this local server without disabling resolved:

```auto
sudo mkdir -p /etc/systemd/resolved.conf.d
sudo tee /etc/systemd/resolved.conf.d/adguardhome.conf <<EOF
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
EOF
sudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl reload-or-restart systemd-resolved

```

Note: with `DNS=127.0.0.1`, the machine uses AdGuard itself to resolve names. If the AdGuard container is stopped, it no longer has DNS, and a `docker pull` fails, for example. If you want a safety net, add a line `FallbackDNS=1.1.1.1` in the same file.

**2. Port 80: it’s Gladys**

Gladys is launched with `--network=host` and `SERVER_PORT=80`. It therefore already occupies port 80 of the machine, and that’s why the PORTS column is empty for it in your `docker ps`. Once port 53 is freed, your `docker run` will fail in the same way on `0.0.0.0:80`. You must therefore remove `-p 80:80/tcp` from the command.

Another important point: when first launched, the AdGuard configuration assistant (on port 3000) asks you on which port to place the administration interface, and it proposes 80 by default. **Choose 3000** : the interface will thus remain on `http://ip:3000` and will not interfere with Gladys.

**3. The other ports, unnecessary for home use**

The command from the Docker Hub page publishes everything AdGuard can do. For a simple DNS blocker on the local network:

- `67/68` are used for DHCP. Remove them, unless you want AdGuard to replace the DHCP of your box, which does not work well anyway with a container in bridge mode.
- `443`, `853`, `784`, `8853` and `5443` are used for encrypted DNS (DoH, DoT, DoQ, DNSCrypt). They are unnecessary as long as you do not expose your DNS on the Internet.

**4. Restarting cleanly**

Your `docker ps` shows the `adguardhome` container as started, but with no ports published. This is the trace of the failed attempt, and that’s why port 3000 does not respond. You need to delete it, then recreate it:

```auto
sudo docker rm -f adguardhome
sudo mkdir -p /opt/adguardhome/work /opt/adguardhome/conf

sudo docker run -d --name adguardhome \
  --restart unless-stopped \
  -v /opt/adguardhome/work:/opt/adguardhome/work \
  -v /opt/adguardhome/conf:/opt/adguardhome/conf \
  -p 53:53/tcp -p 53:53/udp \
  -p 3000:3000/tcp \
  adguard/adguardhome

```

Note: `/my/own/workdir` and `/my/own/confdir` in the Docker Hub example are paths to be replaced. As they are, they create a folder `/my` at the root of the disk. I replaced them above with `/opt/adguardhome/...`, but any path that makes sense to you will do.

Then, open `http://mini_pc_ip:3000`, follow the assistant (interface on port 3000, DNS on port 53), then indicate the IP of the mini PC as the DNS server in the DHCP of your box. All devices on the network will then go through AdGuard.

Regarding your comment on partitioning, you are right: Docker images live in `/var/lib/docker` and the Gladys database in `/var/lib/gladysassistant`. A too small `/var` eventually saturates.

Good luck with the migration!

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [September 27, 2026, 10:19am UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/3 "2026-09-27T10:19:08Z")

</div>

@guim31 said it all 👏  
The official doc [FAQ · AdguardTeam/AdGuardHome Wiki · GitHub](https://github.com/AdguardTeam/Adguardhome/wiki/FAQ#bindinuse)

---

<div class="post-metadata">

**Author:** ![Diabolo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/d78d45/32.png) [@Diabolo](https://community.gladysassistant.com/u/Diabolo)\
**Post date:** [September 27, 2026, 1:07pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/4 "2026-09-27T13:07:22Z")

</div>

> [@guim31](#):
>
> ```auto
> sudo docker run -d --name adguardhome \
> --restart unless-stopped \
> -v /opt/adguardhome/work:/opt/adguardhome/work \
> -v /opt/adguardhome/conf:/opt/adguardhome/conf \
> -p 53:53/tcp -p 53:53/udp \
> -p 3000:3000/tcp \
> adguard/adguardhome
> 
> ```

I’m making progress with Docker (that is to say: I’m making mistakes! 🤨 ).

For example, I know how to display active containers, how to stop one and then delete it…

In more detail:

```auto
moi@mamachine:~$ sudo docker rm -f adguardhome
adguardhome
moi@mamachine:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b21791a177ff gladysassistant/gladys:v5 "docker-entrypoint.s…" 21 hours ago Up 16 minutes gladys
moi@mamachine:~$ sudo mkdir -p /opt/adguardhome/work /opt/adguardhome/conf
moi@mamachinbe:~$ sudo docker run -d --name adguardhome 
--restart unless-stopped 
-v /opt/adguardhome/work:/opt/adguardhome/work 
-v /opt/adguardhome/conf:/opt/adguardhome/conf 
-p 53:53/tcp -p 53:53/udp 
-p 3000:3000/tcp 
adguard/adguardhome
8de09fe571412fc7b2dcb38b80eb1ca4d43c7c0fec3a4bfb03e1175fd26c6fd9
moi@mamachine:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8de09fe57141 adguard/adguardhome "/opt/adguardhome/Ad…" 11 seconds ago Up 10 seconds 80/tcp, 67-68/udp, 443/tcp, 443/udp, 853/udp, 0.0.0.0:53->53/tcp, [::]:53->53/tcp, 853/tcp, 3000/udp, 5443/tcp, 0.0.0.0:3000->3000/tcp, 0.0.0.0:53->53/udp, [::]:3000->3000/tcp, [::]:53->53/udp, 5443/udp, 6060/tcp adguardhome
b21791a177ff gladysassistant/gladys:v5 "docker-entrypoint.s…" 21 hours ago Up 19 minutes gladys

```

No frames on port 3000 in sight! 🫩 (i.e. nothing is displayed)

This sequence: deletion of adguardhome then installation, I’ve done several times… in vain.

But the first time I managed to access the AdGuard Home configuration pages. After entering the requested information, it stopped working! 😞 So close to the goal!

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [September 27, 2026, 1:17pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/5 "2026-09-27T13:17:59Z")

</div>

Bravo 🎉

When you arrived on this page, if you chose port 80 for the web administration interface, it won’t work (as it’s already used by Gladys). You can choose a different port like 81

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/e/c/ec74e6eccf46c400e5fa6b3d9d5221e649d328a1.png)

You can also check the AdGuard Home logs with the command `sudo docker logs adguardhome`

---

<div class="post-metadata">

**Author:** ![Diabolo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/d78d45/32.png) [@Diabolo](https://community.gladysassistant.com/u/Diabolo)\
**Post date:** [September 27, 2026, 1:42pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/6 "2026-09-27T13:42:40Z")

</div>

> [@cicoub13](#):
>
> sudo docker logs adguardhome

`moi@mamachine:~$ sudo docker logs adguardhome`  
`2026/09/27 12:53:37.880219 [info] starting adguard home version="AdGuard Home, version v0.107.79"`  
`2026/09/27 12:53:37.883114 [info] tls_manager: using default ciphers`  
`2026/09/27 12:53:37.886108 [info] webapi: initializing`  
`2026/09/27 12:53:37.906478 [info] dnsproxy: upstream mode is set mode=load_balance`  
`2026/09/27 12:53:37.906506 [info] dnsproxy: cache enabled size=4096`  
`2026/09/27 12:53:37.906520 [info] dnsproxy: max goroutines is set count=300`  
`2026/09/27 12:53:37.906573 [info] dnsproxy: server will refuse requests of type any`  
`2026/09/27 12:53:37.906582 [info] dnsproxy: upstream mode is set mode=load_balance`  
`2026/09/27 12:53:37.906588 [info] dnsproxy: cache enabled size=4194304`  
`2026/09/27 12:53:37.906595 [info] dnsproxy: max goroutines is set count=300`  
`2026/09/27 12:53:37.907516 [info] permcheck: warning: found unexpected permissions type=directory path=/opt/adguardhome/work perm=0755 want=0700`  
`2026/09/27 12:53:37.907585 [info] webapi: AdGuard Home is available at the following addresses:`  
`2026/09/27 12:53:37.907619 [info] addrproc: processing addresses`  
`2026/09/27 12:53:37.907758 [info] webapi: serving url=http://127.0.0.1:80`  
`2026/09/27 12:53:37.907765 [info] webapi: serving url=http://[::1]:80`  
`2026/09/27 12:53:37.907769 [info] webapi: serving url=http://172.17.0.2:80`  
`2026/09/27 12:53:37.907790 [info] starting plain server server=plain addr=0.0.0.0:80`  
`2026/09/27 12:53:38.130654 [info] dnsproxy: starting dns proxy server`  
`2026/09/27 12:53:38.130675 [info] dnsproxy: creating udp server socket addr=0.0.0.0:53`  
`2026/09/27 12:53:38.130787 [info] dnsproxy: listening to udp addr=[::]:53`  
`2026/09/27 12:53:38.130795 [info] dnsproxy: creating tcp server socket addr=0.0.0.0:53`  
`2026/09/27 12:53:38.130848 [info] dnsproxy: listening to tcp addr=[::]:53`  
`2026/09/27 12:53:38.131021 [info] dnsproxy: entering udp listener loop addr=[::]:53`  
`2026/09/27 12:53:38.131147 [info] dnsproxy: entering listener loop proto=tcp addr=[::]:53`

I don’t speak «&nbsp;adguardhome&nbsp;» fluently yet, but it seems to say that it keeps listening on port 80, which is already taken by Gladys…

I see a solution in the style of Attila: I reinstall Ubuntu Server by formatting all partitions, then I install Gladys, then I make a disk image of my /var partition (not suicidal, right?), then I try my luck again with Adguard, which seems to have decided to have fun with me…

Is there a «&nbsp;nuisance&nbsp;» badge?

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [September 27, 2026, 2:02pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/7 "2026-09-27T14:02:22Z")

</div>

No no you can just delete the adguardhome container (as you did earlier) and the configuration in `/opt/adguardhome/conf’

You then restart adguardhome and it will offer you the configuration assistant again (make sure to choose port 81).

---

<div class="post-metadata">

**Author:** ![Diabolo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/d78d45/32.png) [@Diabolo](https://community.gladysassistant.com/u/Diabolo)\
**Post date:** [September 27, 2026, 6:03pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/8 "2026-09-27T18:03:08Z")

</div>

Port 81 doesn’t seem like a good idea either… same result. I’m quite tired, I’ll let a good night’s sleep pass, and try again tomorrow with other ports. Thanks for your patient help.

---

<div class="post-metadata">

**Author:** ![Diabolo](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/d/d78d45/32.png) [@Diabolo](https://community.gladysassistant.com/u/Diabolo)\
**Post date:** [September 28, 2026, 11:03am UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/9 "2026-09-28T11:03:38Z")

</div>

Even though my night wasn’t excellent, I managed to get a bit of order back into my neurons.

Installation of gladys: ok

Installation of watchtower: ok

Installation of adguard on port 3000: ok!

Everything is working abnormally well! 😲

I configured my new adguard based on the old one integrated into HA.

Big thanks to everyone.

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [September 28, 2026, 12:36pm UTC](https://community.gladysassistant.com/t/installation-adguardhome-dans-un-container/10914/10 "2026-09-28T12:36:02Z")

</div>

> [@Diabolo](#):
>
> Everything is working abnormally well! 😲

🤣😂 It’s true that sometimes I have exactly the same thought!
