Skip to content

Commit 67b4f00

Browse files
authored
Merge pull request #314 from Paraphraser/20210410-adguardhome-master
Adds service definition for AdGuard Home - master (1 of 2)
2 parents 00eaa07 + 4e35b94 commit 67b4f00

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

.templates/adguardhome/service.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
adguardhome:
2+
container_name: adguardhome
3+
image: adguard/adguardhome
4+
restart: unless-stopped
5+
environment:
6+
- TZ=Etc/UTC
7+
# enable host mode to activate DHCP server on ports 67/udp & 68/tcp+udp
8+
# note that you must also disable all other ports if you enable host mode
9+
# network_mode: host
10+
ports:
11+
# regular DNS
12+
- "53:53/tcp"
13+
- "53:53/udp"
14+
# administration port (http)
15+
# note: external and internal ports MUST be the same
16+
# not active until defined via setup port
17+
- "8089:8089/tcp"
18+
# HTTPS/DNS-over-HTTPS
19+
# - "443:443/tcp"
20+
# DNS-over-QUIC
21+
# - "784:784/udp"
22+
# DNS-over-TLS
23+
# - "853:853/tcp"
24+
# setup (http)
25+
# note: only active until port 8089 becomes active
26+
- "3001:3000/tcp"
27+
# DNSCrypt
28+
# - "5443:5443/tcp"
29+
# - "5443:5443/udp"
30+
volumes:
31+
- ./volumes/adguardhome/workdir:/opt/adguardhome/work
32+
- ./volumes/adguardhome/confdir:/opt/adguardhome/conf
33+
networks:
34+
- iotstack_nw
35+
- vpn_nw

docs/Containers/AdGuardHome.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# AdGuard Home
2+
3+
## References
4+
5+
* [AdGuard Home GitHub](https://github.com/AdguardTeam/AdGuardHome)
6+
* [AdGuard Home DockerHub](https://hub.docker.com/r/adguard/adguardhome)
7+
8+
## Either *AdGuard Home* or *PiHole*, but not both
9+
10+
AdGuard Home and PiHole perform similar functions. They use the same ports so you can **not** run both at the same time. You must choose one or the other.
11+
12+
## <a name="quickStart"> Quick Start </a>
13+
14+
When you first install AdGuard Home:
15+
16+
1. Use a web browser to connect to it using port 3001. For example:
17+
18+
```
19+
http://raspberrypi.local:3001
20+
```
21+
22+
2. Click "Getting Started".
23+
24+
3. Change the port number for the Admin Web Interface to be "8089". Leave the other settings on the page at their defaults and click "Next".
25+
4. Enter a username and password and click "Next".
26+
5. Click "Open Dashboard". This redirects to port 8089.
27+
6. After the initial setup, you connect to AdGuard Home via port 8089:
28+
29+
```
30+
http://raspberrypi.local:8089
31+
```
32+
33+
## About port 8089
34+
35+
Port 8089 is the default administrative user interface for AdGuard Home running under IOTstack.
36+
37+
Port 8089 is not active until you have completed the [Quick Start](#quickStart) procedure. You must start by connecting to port 3001.
38+
39+
Because of AdGuard Home limitations, you must take special precautions if you decide to change to a different port number:
40+
41+
1. The internal and external ports **must** be the same; and
42+
43+
2. You **must** convince AdGuard Home that it is a first-time installation:
44+
45+
```
46+
$ cd ~/IOTstack
47+
$ docker-compose stop adguardhome
48+
$ docker-compose rm -f adguardhome
49+
$ sudo rm -rf ./volumes/adguardhome
50+
$ docker-compose up -d adguardhome
51+
```
52+
53+
3. Repeat the [Quick Start](#quickStart) procedure, this time substituting the new Admin Web Interface port where you see "8089".
54+
55+
## About port 3001:3000
56+
57+
Port 3001 (external, 3000 internal) is only used during [Quick Start](#quickStart) procedure. Once port 8089 becomes active, port 3001 ceases to be active.
58+
59+
In other words, you need to keep port 3001 reserved even though it is only ever used to set up port 8089.
60+
61+
## About Host Mode
62+
63+
If you want to run AdGuard Home as your DHCP server, you need to put the container into "host mode". You need edit the AdGuard Home service definition in `docker-compose.yml` to:
64+
65+
1. add the line:
66+
67+
```
68+
network_mode: host
69+
```
70+
71+
2. remove the `ports:` directive and **all** of the port mappings.
72+
73+
Note:
74+
75+
* It is not really a good idea to offer DHCP services from a container. This is because containers generally start far too late in a boot process to be useful. If you want to use AdGuard Home for DHCP, you should probably consider a native installation.

0 commit comments

Comments
 (0)