Install Docker
Update the repo to get latest versions
sudo apt update
Install the latest version
sudo apt install docker.io
Set Docker to start on startup
sudo systemctl enable --now docker
Give your user permissions to docker, replacing user
with your username
sudo usermod -aG docker user
Once you have run this command close and reopen your session if you accessing remotely. This is to apply the permissions in the above step
Test it has installed correctly by getting the docker version
docker --version
Docker Compose
I also install docker-compose as some dockers need you to compose from a yml file. This downloads v2.16.0, just change this if the version updates to a later version
sudo curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Give permissions to this
sudo chmod +x /usr/local/bin/docker-compose
Test it has installed correctly by getting the docker-compose version
docker-compose --version
Install AdGuard Home
I keep all my dockers in a dockers folder in my home directory. If it doesn’t exist already, create this folder:-
mkdir ~/dockers
Now create a folder for adguardhome to live in.
mkdir ~/dockers/adguardhome
Change directory to this folder
cd ~/dockers/adguardhome
Create 2 directories, conf and work, for adguardhome to save to:-
mkdir conf work
Create a docker-compose.yml file
nano docker-compose.yml
Paste the following. If you want to save the data to another directory change the volumes to point to the directories you want to. I’m using port 80 for other software so I am mapping port 83 for the webui. If you want a different port, just change the number 83 to whatever port you wanted.
version: "2"
services:
adguardhome:
image: adguard/adguardhome
container_name: adguardhome
ports:
- 53:53/tcp
- 53:53/udp
- 784:784/udp
- 853:853/tcp
- 3000:3000/tcp
- 83:80/tcp
volumes:
- ./work:/opt/adguardhome/work
- ./conf:/opt/adguardhome/conf
Save the file with ctl + x, then y to save.
Run the docker-compose file with the following:-
docker-compose up -d
First run
Browse to http://serverip:3000 and you will get the wizard screen, accept the defaults and create your admin user. Once complete, browse to http://serverip:83 and sign in with the user created.