Skip to content

Commit dbffb48

Browse files
committed
Set up new services
1 parent 39eb596 commit dbffb48

File tree

5 files changed

+537
-20
lines changed

5 files changed

+537
-20
lines changed

.gitignore

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
# Environment variables
1+
# Environment files
22
.env
33

4-
# Node.js
5-
node_modules/
6-
.pnpm-store/
4+
# Docker volumes and data
5+
pihole/
6+
syncthing/
7+
jellyfin/
8+
traefik/letsencrypt/
9+
media/
710

8-
# Docker
9-
.docker/
10-
docker-compose.override.yml
11+
# Homepage config (contains personal data)
12+
homepage/config/
1113

12-
# Traefik
13-
traefik/acme.json
14-
15-
# Service data
16-
service-configs/
17-
homepage/data/
18-
19-
# IDE
20-
*.swp
21-
*.swo
22-
23-
# OS
14+
# OS files
2415
.DS_Store
25-
Thumbs.db
16+
Thumbs.db

README.md

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
# Home Network Setup
2+
3+
A centralized Docker Compose configuration for managing your home network services, including Pi-hole, Syncthing, Jellyfin, and Homepage, all accessible through a unified dashboard with Traefik as the reverse proxy.
4+
5+
## Services Included
6+
7+
- **Homepage** - Unified dashboard to access all services
8+
- **Pi-hole** - DNS ad-blocker and network-wide tracker blocker
9+
- **Syncthing** - Continuous file synchronization
10+
- **Jellyfin** - Media server for movies, TV shows, and music
11+
- **Traefik** - Reverse proxy and load balancer (no need to remember port numbers!)
12+
13+
## Prerequisites
14+
15+
- Docker and Docker Compose installed on your server
16+
- Basic knowledge of Docker and networking
17+
- A domain name (optional - can use local domain like `home.local`)
18+
19+
## Quick Start
20+
21+
1. **Clone or download this repository** to your server
22+
23+
2. **Run the setup script** (optional but recommended):
24+
```bash
25+
./setup.sh
26+
```
27+
This will create necessary directories and help you get started.
28+
29+
3. **Create environment file** (if not done by setup script):
30+
```bash
31+
cp env.example .env
32+
```
33+
Edit `.env` and set your domain, timezone, media path, and Pi-hole password:
34+
```bash
35+
DOMAIN=home.local
36+
TZ=America/New_York
37+
MEDIA_PATH=/path/to/your/media
38+
PIHOLE_PASSWORD=your_secure_password
39+
```
40+
41+
4. **Start all services**:
42+
```bash
43+
docker compose up -d
44+
```
45+
46+
5. **Configure DNS/hosts file**:
47+
48+
For local network access, add entries to your router's DNS or your device's `/etc/hosts` file:
49+
```
50+
192.168.1.100 home.local
51+
192.168.1.100 homepage.home.local
52+
192.168.1.100 pihole.home.local
53+
192.168.1.100 syncthing.home.local
54+
192.168.1.100 jellyfin.home.local
55+
192.168.1.100 traefik.home.local
56+
```
57+
Replace `192.168.1.100` with your server's IP address.
58+
59+
## Accessing Services
60+
61+
Once everything is running, you can access:
62+
63+
- **Homepage Dashboard**: `https://homepage.home.local` or `https://home.local`
64+
- **Pi-hole**: `https://pihole.home.local`
65+
- **Syncthing**: `https://syncthing.home.local`
66+
- **Jellyfin**: `https://jellyfin.home.local`
67+
- **Traefik Dashboard**: `https://traefik.home.local:8080` (or via Homepage)
68+
69+
All services are also accessible through the Homepage dashboard, so you don't need to remember individual URLs!
70+
71+
## Initial Setup for Each Service
72+
73+
### Pi-hole
74+
75+
1. Access `https://pihole.home.local` (or `http://YOUR_SERVER_IP:8053`)
76+
2. Log in with the password set in your `.env` file (default: `changeme`)
77+
3. **Configure your router to use Pi-hole as DNS server:**
78+
- Log into your router's admin panel (usually `192.168.1.1` or `192.168.0.1`)
79+
- Find the DNS settings (usually under "Network", "DHCP", or "Internet" settings)
80+
- Set the primary DNS server to your server's IP address (e.g., `192.168.1.100`)
81+
- Optionally set a secondary DNS (like `1.1.1.1` or `8.8.8.8`) as a backup
82+
- Save and apply the changes
83+
- **Important:** After changing DNS on the router, devices may need to renew their DHCP lease or reconnect to WiFi to pick up the new DNS settings
84+
85+
4. **Verify it's working:**
86+
- Check the Pi-hole dashboard - you should see DNS queries from devices on your network
87+
- Visit a website with ads - they should be blocked
88+
- Check the Pi-hole logs to see blocked queries
89+
90+
**Why this setup:** By configuring your router to use Pi-hole as the DNS server, ALL devices on your network (phones, tablets, computers, smart TVs, etc.) will automatically have ads blocked without needing to configure each device individually.
91+
92+
### Syncthing
93+
94+
1. Access `https://syncthing.home.local` (or `http://YOUR_SERVER_IP:8384`)
95+
2. Set up your first folder to sync
96+
3. Add devices you want to sync with
97+
4. Configure sharing settings
98+
99+
### Jellyfin
100+
101+
1. Access `https://jellyfin.home.local` (or `http://YOUR_SERVER_IP:8096`)
102+
2. Complete the initial setup wizard
103+
3. Add your media libraries
104+
4. Configure users and permissions
105+
106+
### Homepage
107+
108+
1. Access `https://homepage.home.local` (or `http://YOUR_SERVER_IP:3000`)
109+
2. The services should already be configured in `homepage/config/services.yaml`
110+
3. Customize the appearance in `homepage/config/settings.yaml`
111+
112+
## Configuration Files
113+
114+
- `docker-compose.yml` - Main service definitions
115+
- `.env` - Environment variables (create from `env.example`)
116+
- `homepage/config/` - Homepage configuration files
117+
- `pihole/etc/` - Pi-hole configuration and blocklists
118+
- `traefik/letsencrypt/` - SSL certificates (auto-generated)
119+
120+
## Ports Used
121+
122+
- **80** - HTTP (Traefik)
123+
- **443** - HTTPS (Traefik)
124+
- **53** - DNS (Pi-hole)
125+
- **3000** - Homepage (direct access)
126+
- **8053** - Pi-hole Web UI (direct access)
127+
- **8096** - Jellyfin (direct access)
128+
- **8384** - Syncthing (direct access)
129+
- **8080** - Traefik Dashboard (direct access)
130+
131+
## SSL Certificates
132+
133+
Traefik is configured to automatically obtain SSL certificates from Let's Encrypt. For local networks:
134+
135+
- If using a real domain, ensure it points to your server and ports 80/443 are accessible
136+
- If using a local domain (like `home.local`), you may need to use self-signed certificates or disable SSL verification in your browser
137+
138+
## Troubleshooting
139+
140+
### Docker Permission Denied Error
141+
142+
If you see `permission denied while trying to connect to the Docker daemon socket`, you need to add your user to the docker group:
143+
144+
```bash
145+
sudo usermod -aG docker $USER
146+
```
147+
148+
Then log out and log back in, or run:
149+
```bash
150+
newgrp docker
151+
```
152+
153+
After this, you should be able to run `docker compose` commands without `sudo`.
154+
155+
**Note:** Avoid using `sudo` with docker compose as it can cause permission issues with volume mounts.
156+
157+
### Services not accessible via Traefik
158+
159+
1. Check that services are running: `docker compose ps`
160+
2. Verify Traefik labels are correct in `docker-compose.yml`
161+
3. Check Traefik logs: `docker compose logs traefik`
162+
163+
### DNS not working / Ad blocking not working
164+
165+
1. **Verify router DNS configuration:**
166+
- Check that your router's DNS settings point to your server's IP address
167+
- Ensure devices have renewed their DHCP lease (disconnect/reconnect WiFi or restart devices)
168+
169+
2. **Check Pi-hole is running:**
170+
- Access Pi-hole dashboard and check for DNS queries
171+
- If no queries appear, devices aren't using Pi-hole as DNS
172+
173+
3. **Verify port 53 is accessible:**
174+
- Ensure port 53 is not blocked by firewall: `sudo ufw allow 53/tcp && sudo ufw allow 53/udp`
175+
- If you see "port 53 already in use" errors, configure systemd-resolved:
176+
- Edit `/etc/systemd/resolved.conf`: `sudo nano /etc/systemd/resolved.conf`
177+
- Add: `DNSStubListener=no` under `[Resolve]`
178+
- Restart: `sudo systemctl restart systemd-resolved`
179+
180+
4. **Test DNS manually:**
181+
- From a device, run: `nslookup google.com YOUR_SERVER_IP`
182+
- Should return results if Pi-hole is working
183+
184+
### Can't access services
185+
186+
1. Check firewall rules allow ports 80, 443, and service-specific ports
187+
2. Verify DNS/hosts file entries are correct
188+
3. Try accessing services directly via IP:port (e.g., `http://192.168.1.100:3000`)
189+
190+
## Updating Services
191+
192+
To update all services to their latest versions:
193+
194+
```bash
195+
docker compose pull
196+
docker compose up -d
197+
```
198+
199+
## Stopping Services
200+
201+
To stop all services:
202+
203+
```bash
204+
docker compose down
205+
```
206+
207+
To stop and remove all volumes (⚠️ **WARNING**: This deletes all data):
208+
209+
```bash
210+
docker compose down -v
211+
```
212+
213+
## Backup
214+
215+
Important data is stored in the following directories:
216+
- `pihole/etc/` - Pi-hole configuration and blocklists
217+
- `syncthing/` - Syncthing configuration and data
218+
- `jellyfin/` - Jellyfin configuration
219+
- `homepage/config/` - Homepage configuration
220+
221+
Regularly backup these directories to preserve your settings.
222+
223+
## Security Notes
224+
225+
⚠️ **Important**: This setup does not include authentication by default. For security:
226+
227+
1. Deploy behind a VPN for remote access
228+
2. Use a reverse proxy with authentication (e.g., Authelia, Authentik)
229+
3. Keep services updated regularly
230+
4. Use strong passwords for all services
231+
5. Consider firewall rules to restrict access
232+
233+
## License
234+
235+
This configuration is provided as-is for personal use.
236+
237+
## Contributing
238+
239+
Feel free to submit issues or pull requests if you have improvements or find bugs.
240+

0 commit comments

Comments
 (0)