Adguardhome in a container.
Variables in /etc/adguardhome.conf
(on the host server) allow these settings to be customised:
- adguardhome version
- directories to mount from the host
- timezone setting
- ports - different DNS and DHCP options - see https://hub.docker.com/r/adguard/adguardhome
The AdGuard Home service is found on: http://127.0.0.1:3000/
$ adguardhome-docker settings
...
$ adguardhome-docker pull
$ adguardhome-docker create
...
$ adguardhome-docker start
$ adguardhome-docker logs
...
$ adguardhome-docker stop
...
$ adguardhome-docker delete
The first time AdGuard Home starts, logs similar to this will be seen:
$ adguardhome-docker logs
2021/10/08 16:25:55.806120 [info] AdGuard Home, version v0.106.3
2021/10/08 16:25:55.806232 [info] This is the first time AdGuard Home is launched
2021/10/08 16:25:55.806241 [info] Checking if AdGuard Home has necessary permissions
2021/10/08 16:25:55.806404 [info] AdGuard Home can bind to port 53
2021/10/08 16:25:55.807264 [info] Initializing auth module: /opt/adguardhome/work/data/sessions.db
2021/10/08 16:25:55.810938 [info] auth: initialized. users:0 sessions:0
2021/10/08 16:25:55.810947 [info] Initialize web module
2021/10/08 16:25:55.810967 [info] This is the first launch of AdGuard Home, redirecting everything to /install.html
2021/10/08 16:25:55.811008 [info] AdGuard Home is available on the following addresses:
2021/10/08 16:25:55.811123 [info] Go to http://127.0.0.1:3000
2021/10/08 16:25:55.811128 [info] Go to http://172.17.0.3:3000
...
After installing or updating adguardhome-docker
:
- adguardhome-docker stop
- adguardhome-docker pull
- docker rename adguardhome adguardhome-0.106.3 # renames the old container
- adguardhome-docker create
- adguardhome-docker start
Optional - to remove an old container and/or image:
- docker rm adguardhome-0.106.3
- docker rmi adguard/adguardhome:v0.106.3
To have the container start automatically:
rc-config add adguardhome
The default docker "json-file" logging driver does not do log rotation.
To select the "local" driver, with a max file size of 10MB and four files, add this to /etc/docker/daemon.json
:
{
"log-driver": "local",
"log-opts": {
"max-size": "10m",
"max-file": "4"
}
}