QNAP: Running Pi-hole using Container Station

Pi-hole is another application which you might want to run on your QNAP device to filter out all the ads coming in your network. It also provides other features like DNS and stuff, but you can already do that QNAP device control panel, what you can do is block ads.

Pi-hole makes network wide ad block a easy task, along with collecting statistics for all network request, device list in the network, act as an DHCP server in the network and can also act as an DNS server. There are many more features Pi-Hole has which you can explore while using it with the following yaml:

version: "3.8"

name: pihole

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: piholevm
    restart: unless-stopped
    environment:
      HOSTNAME: "Qnap"
      WEBPASSWORD: <password>                       <-- Set the desired password here
      WEBTHEME: "default-darker"
    volumes:
      - data:/etc/pihole
      - dnsmasq:/etc/dnsmasq.d
    networks:
      piholenet:
          ipv4_address: 192.168.101.50                    <-- Might need to be updated as per your LAN settings
          
volumes:
  data:
  dnsmasq:
    
networks:
  piholenet:
    driver: qnet
    driver_opts:
      iface: "eth0"                                                    <-- Update this with the active ethernet port
    ipam:
      driver: qnet
      options:
        iface: "eth0"                                                  <-- Update this with the active ethernet port
      config:
        - subnet: 192.168.101.0/24

you need to use the web address<ip-address>/admin/ for login as the default page on port 80 is blank.

There is just admin interface to the application, so you just enter the password from the environment variable and you are good to go.

Leave a Comment