Get a Quote     (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode
Edit this page

Adding Pi-Hole Using Docker Image

  3 minute read.

Last Modified 2022-09-29 14:34 -0400

SCALE includes the ability to run Docker containers using Kubernetes.

Docker is an open platform for developing, shipping, and running applications. Docker enables the separation of applications from infrastructure through OS-level virtualization to deliver software in containers.
Kubernetes is a portable, extensible, open-source container-orchestration system for automating computer application deployment, scaling, and management with declarative configuration and automation.

Always read through the Docker Hub page for the container you are considering installing so that you know all of the settings that you need to configure. To set up a Docker image, first determine if you want the container to use its own dataset. If yes, create a dataset for host volume paths before you click Launch Docker Image.

When you are ready to create a container, open the APPS page and click Launch Docker Image.

AvailableApplicationsScreen

Fill in the Application Name and click Next. Add the github repository URL in Image Repository for the docker container are setting up. For the PiHole project enter pihole/pihole.

LaunchDockerImagePiholeContainerImage

Click Next to move to the Container Environment Variables. For Pi-Hole, click Add then enter TZ for timezone, and then America/NewYork for the value. Click Add again and enter WEBPASSWORD and then a secure password like the example used, s3curep4$$word. Always refer to the docker hub page for information on what the docker container requires.

LaunchDockerImagePiHoleContainerEnvironmentVariables

Click Next to open Networking. If the container needs special networking configuration, enter it here. Click Next to open Port Forwarding to add the Pi-Hole ports.

The PiHole Docker Hub page lists a set of four ports and the node port you need to set. Adjust these values if your system configuration requires changes. TrueNAS SCALE requires setting all Node Ports above 9000.

LaunchDockerImagePiHolePortForwarding

Click Next after configuring all the ports to open Storage.

Click Add twice to add two blocks of host path settings. Browse to the dataset and directory paths you created before beginning the container deployment. PiHole uses volumes store your data between container upgrades.

You need to create these directories in a dataset on SCALE using System Settings > Shell before you begin installing this container.

LaunchDockerImagePiHoleStorageHostPaths

You can add more volumes to the container if needed. When all the settings are entered, click Next until you reach Confirm Options. Verify the the information on the screen and click Save.

LaunchDockerImagePiHoleConfirmOptions

TrueNAS SCALE deploys the container. If correctly configured, the Pi-Hole widget displays on the Installed Applications screen.

When the deployment is completed the container becomes active. If the container does not autostart, click Start on the widget.

PiHoleWidget

Clicking on the App card reveals details.

SCALE App Status

With PiHole as our example we navigate to the IP of our TrueNAS system with the port and directory address :9080/admin/.

PiHoleRunning

Related Content

Related Apps Articles