Home

Awesome

Pihole + Dokku - Installation Guide

<p> <a href="https://github.com/Rikj000/Pihole-Dokku-Installation/blob/master/README.md"> <img src="https://img.shields.io/badge/Docs-Pihole+Dokku-blue?logo=libreoffice&logoColor=white" alt="The current place where you can find Pihole Dokku Installation Documentation!"> </a> <a href="https://github.com/Rikj000/Pihole-Dokku-Installation/blob/master/LICENSE.md"> <img src="https://img.shields.io/github/license/Rikj000/Pihole-Dokku-Installation?label=License&logo=gnu" alt="GNU General Public License"> </a> <a href="https://www.iconomi.com/register?ref=zQQPK"> <img src="https://img.shields.io/badge/Join-ICONOMI-blue?logo=bitcoin&logoColor=white" alt="ICONOMI - The world’s largest crypto strategy provider"> </a> <a href="https://www.buymeacoffee.com/Rikj000"> <img src="https://img.shields.io/badge/-Buy%20me%20a%20Coffee!-FFDD00?logo=buy-me-a-coffee&logoColor=black" alt="Buy me a Coffee as a way to sponsor this project!"> </a> </p>

I've struggled quite a bit to host pihole in a dokku container,
accessible over my LAN network and over the web through an allocated sub-domain name.

Due to no clear documentation for this being available on the web,
I've decided to write out some of my own after finally succeeding with my own setup.

Prerequisites

Following prerequisites fall out of the scope of this installation guide:

Network Properties

DeviceFixed-IP Address
Router / Gateway192.168.0.1
Dokku Server192.168.0.101 (Yours may be different)
Pihole App192.168.0.212

Domain Names

(Yours will likely be different)

DeviceValue
Dokku Servermy-dokku-server.com
Pihole Apppihole.my-dokku-server.com

macvlan0 Network Properties

PropertyValue
Network / DHCP scope reservation192.168.0.210/28
Host Min192.168.0.211
Host Max192.168.0.224
Hosts/Net14

Installation

1. Setup persistent macvlan0 network with systemd

2. Create a macvlan-pihole Docker network using eth0

docker network create \
    --driver=macvlan \
    --gateway=192.168.0.1 \
    --subnet=192.168.0.0/24 \
    --ip-range=192.168.0.210/28 \
    -o parent=eth0 \
    macvlan-pihole

3. Create a pihole Dokku app using macvlan-pihole

Updates

dokku ps:stop pihole; docker pull pihole/pihole:latest; dokku ps:rebuild pihole

Used Sources