First, make sure you have Ubuntu container template in Proxmox.
Create container using Ubuntu container template
Setup the Container
Do updates in container:
apt update
apt upgrade
Follow this documentation to install Docker inside your Ubuntu:
https://docs.docker.com/engine/install/ubuntu/
Remove the built in DNS service
This is the command to remove the Ubuntu built in DNS service:
- Create the directory
sudo mkdir -p /etc/systemd/resolved.conf.d
- Create configuration file
sudo nano /etc/systemd/resolved.conf.d/adguardhome.conf
- Paste this into the file
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
- Create symbolic link
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
- Restart the service
sudo systemctl reload-or-restart systemd-resolved
Run AdGuard Home
Create a directory where you want to store the docker compose file and AdGuard Home configurations, then move to that directory.
Create docker-compose.yml file:
services:
adguardhome:
container_name: adguardhome
image: adguard/adguardhome
restart: unless-stopped
network_mode: host
volumes:
- ./work:/opt/adguardhome/work
- ./conf:/opt/adguardhome/conf
Run the script:
docker compose up -d
The AdGuard Home management will run on port 3000.
Make sure you set this container as DNS server for your future VM / Container inside Proxmox that want to use this custom DNS server.
Top comments (0)