Pihole Docker Portainer can be easily set up with this quick guide by your side.
At Bobcares, we offer solutions for every query, big and small, as a part of our Docker Hosting Support Services.
Let’s take a look at how our Docker Support Team is ready to help customers with setting up Pihole Docker Portainer.
What is Pihole Docker Portainer
Pihole offers adblocking services for home as well as small networks. In other words, it blocks known ad serving domains. Furthermore, it can block network requests to untrustworthy domains, especially if the domain name is present in any block list.
It also puts together statistics to offer a better perspective of what is going on in our network. Usually, we do not have access to their information since it is hidden in the router’s web interface. Even if we have access to the router logs, the data is not in a user-friendly format.
Originally, Pihole was meant to run on Raspberry Pi. However, currently, it is supported on different hardware platforms. Today we are going to install Pi-hole on Raspberry Pi via Docker and Portainer. Pihole Docker Portainer installation involves the following steps:
- Install Docker on Raspberry Pi
- Install Portainer on Docker
- Set up Pi-hole via Portainer
Step 1: Install Docker on Raspberry Pi
To begin with, we have to run the following command:
curl -sSL https://get.docker.com | sh
Alternatively, we can run docker without the above command via sudo by adding default Raspberry Pi user pi to the docker group.
sudo gpasswd -a pi docker
Then, we have to log out and reboot Raspberry PI to allow the group change to take place.
Step 2: Install Portainer on Docker
- Run the following commands to install Portainer:
docker volume create portainer_data docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --restart always portainer/portainer
- Then verify if Portainer is running with this command:
docker ps
- Then head to the Portainer web administration page. For example, if Raspberry Pi is at 192.168.1.10, head to http://192.168.1.10:9000.
- Next, set up an admin user when we open Portainer for the first time.
- After logging in, we have to select Local and choose Connect as seen below:
Step 3: Set up Pi-hole via Portainer
- First, click Containers and then select the Add Container button in the left navigation panel.
- Next, enter a name for the new Pihole container and specify the Docker image as pihole/pihole:4.1_armhf.
- After that, stick to the default bridge network mode and add 80, 443, 53 as TCP, and 53 as UDP ports manually.
- Then, click the Volume tab under Advanced Container Settings.
- Next, do not change the values in the Container field.
- After that, head to Network options. Here the default is bridge mode. We can also enter a hostname for the device.
- Then, enter the DNS server as the Docker container and localhost as the primary DNS server.
- At this point we have to set the following environment variables:
- Now, we have to select the Restart Policy tab and click Unless Stopped.
- Then, select Deploy the container. This will cause Pihole to be up and running in a short while.
According to our Support experts, we can view the admin page by heading to http://192.168.1.10/admin (depending on the location of the Pihole server) . We can easily log in via the web admin password we set above.
[Need assistance with a different issue? We are available 24/7.]
Conclusion
In a nutshell, our skilled Support Engineers at Bobcares took us through the Pihole Docker Portainer installation.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments