Skip to content

Instantly share code, notes, and snippets.

@dsculptor
Last active June 6, 2022 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsculptor/2e17822c22a313ffa03e3f963a4bcb65 to your computer and use it in GitHub Desktop.
Save dsculptor/2e17822c22a313ffa03e3f963a4bcb65 to your computer and use it in GitHub Desktop.
# File: docker-compose.yml
# A minimal docker-compose stack to have adguardhome running on a machine with docker installed.
version: "3.9"
volumes:
adguard:
services:
adguard:
restart: always
image: adguard/adguardhome:latest
container_name: adguard
volumes:
- adguard:/opt/adguardhome
ports:
- 53:53/tcp
- 53:53/udp
# If server is remote: DO NOT ADMIN PORTS
- 127.0.0.1:3000:3000/tcp
- 127.0.0.1:80:80/tcp
# Only if server is inside home:
# - 3000:3000/tcp
# - 80:80/tcp
# This is optional: to keep the adguardhome always up-to-date
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
environment:
- WATCHTOWER_CLEANUP=true

Step-1: Install docker with convenient one-liner script

from: https://github.com/docker/docker-install

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Step-2: Download & place the attached minimal docker-compose file on server.

Change some params to your liking: Reference

Step 3: Start & configure via web

# Start the docker compose stack & forget about it!
docker compose up -d

goto http://<machine-IP>:3000 to configure the installation over web. If server is outside home - use port forwarding over ssh -L 3000:localhost:3000.

Step 4: Configure DNS: On your router's settings set the DNS to the machine-IP.

If this does not work, then individually goto wifi settings on phone/computer to set manual DNS. Google how to change DNS for your device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment