Skip to content

Commit dbd4514

Browse files
committed
add a new post (install pihole)
1 parent 9b3ff3f commit dbd4514

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

posts/homelab-1-additional-configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ slug: homelab-1-additional-configuration
44
publishDate: 24 Nov 2025
55
description: My homelab setup journey and documentation
66
prevPost: homelab-0-getting-started
7+
nextPost: homelab-2-install-pihole
78
tags: ["homelab"]
89
---
910

posts/homelab-2-install-pihole.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Homelab - Install Pi-hole
3+
slug: homelab-2-install-pihole
4+
publishDate: 29 Nov 2025
5+
description: My homelab setup journey and documentation
6+
prevPost: homelab-1-additional-configuration
7+
tags: ["homelab"]
8+
---
9+
10+
![Pi-hole Dashboard](../src/assets/blog/media/pihole-dashboard.png)
11+
12+
## Install Pi-hole
13+
14+
We will use Docker and Docker Compose to set up Pi-hole and other services.
15+
16+
1. In the home directory, create a `docker` directory and `pihole` inside `docker`.
17+
18+
```sh
19+
cd ~
20+
mkdir -p docker/pihole
21+
```
22+
2. Create the `docker-compose.yml` file
23+
24+
```sh
25+
cd docker/pihole
26+
vim docker-compose.yml
27+
```
28+
3. Enter the contents
29+
30+
```sh
31+
services:
32+
pihole:
33+
container_name: pihole
34+
image: pihole/pihole:latest
35+
ports:
36+
- 53:53/tcp
37+
- 53:53/udp
38+
- 8081:80/tcp
39+
- 8443:443/tcp
40+
environment:
41+
TZ: Asia/Kolkata
42+
FTLCONF_webserver_api_password: <Admin panel Password>
43+
FTLCONF_dns_listeningMode: all
44+
volumes:
45+
- /mnt/data/docker-data/pihole/etc-pihole:/etc/pihole
46+
- /mnt/data/docker-data/pihole/etc-dnsmasq.d:/etc/dnsmasq.d
47+
restart: unless-stopped
48+
cap_add:
49+
- SYS_NICE
50+
- NET_ADMIN
51+
```
52+
53+
Port 53 is for the DNS resolver, 8081 and 8443 are for the admin dashboard. Set the admin panel dashboard accordingly.
54+
4. Start the container
55+
56+
```sh
57+
docker compose up -d
58+
```
59+
60+
This will pull the Pi-hole Docker image and start the container.
61+
5. Once the service is up, we can verify by launching the admin panel from `192.168.0.153:8081/admin`. If everything is okay, we can see the login page.
62+
63+
## Set Pi-hole as the DNS resolver
64+
65+
In the router admin page, we need to set the DNS endpoint to our Pi-hole server.
66+
67+
![Pi-hole server as DNS](../src/assets/blog/media/pihole-server-as-dns.png)
68+
69+
After applying, all the DNS queries will be handled by our Pi-hole server.
607 KB
Loading
23.5 KB
Loading

0 commit comments

Comments
 (0)