A Raspberry Pi home server combining media, IoT hub, and VPN is the ultimate single-device solution for Indian tech enthusiasts. Running on Rs 5,000-8,000 worth of hardware and drawing only 3-5W of power, a Raspberry Pi 4 can simultaneously serve as your Home Assistant IoT hub, personal media server (Plex/Jellyfin), Pi-hole ad blocker, WireGuard VPN server, and NAS file storage. This guide covers the complete setup of an all-in-one home server optimised for Indian conditions including frequent power cuts and ISP restrictions.
Table of Contents
- Why a Raspberry Pi Home Server for India?
- Hardware Requirements
- Base OS Setup
- Media Server: Jellyfin Setup
- Home Assistant Container
- Pi-hole Ad Blocker
- WireGuard VPN Server
- Power Reliability for Indian Conditions
- Frequently Asked Questions
Why a Raspberry Pi Home Server for India?
Running services in the cloud is convenient but has real drawbacks for Indian users:
- Data privacy: Your IoT data, media habits, and home network traffic stay local
- No subscription fees: Plex Premium (Rs 800/month), NordVPN (Rs 600/month), HA Cloud (Rs 500/month) — all replaced by one Pi
- Internet outage resilience: Media server and IoT automation work without internet
- Electricity cost: Pi 4 uses 5W vs always-on desktop (60-150W) — saves Rs 100-400/month
- Learning: Setting up a home server teaches Linux, networking, and server administration
Hardware Requirements
- Raspberry Pi 4 (4GB RAM minimum, 8GB for media + IoT + VPN)
- 32GB+ Class A2 microSD card (OS) or better: 128GB USB 3.0 SSD
- External HDD (2TB+) for media storage — via USB 3.0 powered hub
- Ethernet cable for wired connection (more stable than WiFi for server use)
- Cooling: ICE Tower cooler or at minimum a case with fan (India’s heat is significant)
- 600VA+ UPS (keep the Pi running during power cuts)
Base OS Setup
Use Raspberry Pi OS (64-bit, Lite version — no desktop). Install with Raspberry Pi Imager:
- Flash Raspberry Pi OS 64-bit Lite to microSD or USB SSD
- Configure WiFi and SSH in the Imager settings (set hostname, enable SSH)
- Boot and SSH in:
ssh [email protected] - Update:
sudo apt update && sudo apt upgrade -y - Install Docker:
curl -fsSL https://get.docker.com | sh && sudo usermod -aG docker pi
Using Docker for all services provides isolation, easy updates, and the ability to move your entire setup to a new Pi just by copying docker-compose.yml and data volumes.
Docker Compose for All Services
version: '3.8'
services:
jellyfin:
image: jellyfin/jellyfin
ports:
- "8096:8096"
volumes:
- /opt/jellyfin/config:/config
- /mnt/media:/media
restart: unless-stopped
homeassistant:
image: homeassistant/home-assistant:stable
ports:
- "8123:8123"
volumes:
- /opt/homeassistant:/config
network_mode: host
restart: unless-stopped
pihole:
image: pihole/pihole:latest
ports:
- "53:53/udp"
- "80:80"
volumes:
- /opt/pihole/etc:/etc/pihole
- /opt/pihole/dnsmasq:/etc/dnsmasq.d
environment:
TZ: Asia/Kolkata
WEBPASSWORD: YOUR_ADMIN_PASSWORD
restart: unless-stopped
wireguard:
image: linuxserver/wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
ports:
- "51820:51820/udp"
volumes:
- /opt/wireguard:/config
environment:
SERVERURL: YOUR_DDNS_DOMAIN
PEERS: 5 # Number of VPN clients
TZ: Asia/Kolkata
restart: unless-stopped
Media Server: Jellyfin Setup
Jellyfin is a free, open-source media server — the alternative to Plex that requires no account or premium subscription.
Mount External Hard Drive
# Format and mount 2TB USB drive
sudo mkfs.ext4 /dev/sda1
sudo mkdir /mnt/media
sudo mount /dev/sda1 /mnt/media
# Add to /etc/fstab for auto-mount:
UUID=your-disk-uuid /mnt/media ext4 defaults,nofail 0 2
First-Time Jellyfin Setup
- Access http://pi-ip:8096 from any browser on your network
- Create admin account
- Add media libraries pointing to /media/movies, /media/tv, /media/music
- Enable automatic metadata download (fetches movie posters, descriptions)
Remote Access for Jellyfin
Access your media server from anywhere in India (or while travelling) via your WireGuard VPN. Jellyfin also supports direct internet access with proper port forwarding — useful when VPN clients are not configured on all family devices.
Home Assistant Container
Run Home Assistant in Docker alongside Jellyfin:
# After starting the container:
# Access at http://pi-ip:8123
# Complete onboarding (set to your city in India)
# Install add-ons: HACS, File Editor, Mosquitto, Zigbee2MQTT, ESPHome
# Zigbee USB dongle passthrough to container:
# Add to homeassistant service in docker-compose.yml:
devices:
- /dev/ttyUSB0:/dev/ttyUSB0 # Zigbee coordinator
Pi-hole Ad Blocker
Pi-hole is a DNS sinkhole that blocks ads at the network level — every device on your home network gets ad-blocking without installing browser extensions.
Configure Router to Use Pi-hole DNS
In your router settings (DHCP server configuration), set DNS server to your Pi’s IP address (e.g., 192.168.1.100). All devices on your network now use Pi-hole as their DNS resolver, blocking ads, tracking domains, and malware.
India-Specific Blocklists
Add these to Pi-hole’s blocklists for India-optimised blocking:
- OISD Big List — comprehensive ad blocking
- HaGeZi Multi Pro — includes Indian ad networks and trackers
- SmartTV blocklist — blocks Jio TV, Samsung TV, and LG Smart TV tracking
WireGuard VPN Server
WireGuard is the modern, fast, and secure VPN protocol. Connecting to your home WireGuard server from anywhere lets you:
- Access Home Assistant remotely without exposing it to the internet
- Stream from Jellyfin while travelling
- Use Pi-hole ad blocking on your phone even on 4G/5G networks
- Bypass ISP throttling of certain services
Dynamic DNS for Indian ISPs
Most Indian ISPs (Airtel, ACT, Jio fiber) provide dynamic IP addresses. Use a free DDNS service:
- DuckDNS (free, unlimited) — recommended
- No-IP (free tier available)
- Cloudflare DDNS (if you have a domain with Cloudflare)
# DuckDNS auto-update script (add to cron)
curl -k "https://www.duckdns.org/update?domains=YOUR_DOMAIN&token=YOUR_TOKEN&ip="
Power Reliability for Indian Conditions
UPS Sizing
The Pi 4 with USB HDD draws approximately 10-15W under load. A 600VA UPS provides 30-40 minutes of runtime — sufficient for most Indian power cuts. A 1000VA UPS provides 60-90 minutes, covering most scheduled outages.
Graceful Shutdown Script
Detect power loss (via UPS USB interface or voltage sensor) and shut down gracefully before battery depletes:
#!/bin/bash
# /usr/local/bin/power-monitor.sh
# Runs as a service, shuts down Pi when power is cut
apcaccess STATUS 2>/dev/null | grep -q "ONBATT"
if [ $? -eq 0 ]; then
logger "UPS on battery - preparing for shutdown"
sleep 300 # Wait 5 minutes
apcaccess STATUS | grep -q "ONBATT"
if [ $? -eq 0 ]; then
logger "Still on battery - shutting down"
sudo shutdown -h now
fi
fi
Frequently Asked Questions
Can Raspberry Pi 4 handle 4K media streaming in India?
Raspberry Pi 4 can transcode Full HD (1080p) but struggles with 4K transcoding. For 4K, direct play (no transcoding, sending the raw file) works if the client device supports the codec. Most Smart TVs in India (2020+) support direct play of common 4K codecs (HEVC/H.265). Jellyfin’s direct play mode bypasses transcoding and the Pi 4 handles this easily.
How much storage do I need for an Indian family’s media?
A typical Indian family’s media collection — 100-200 Hindi and English movies (averaging 5GB each in 1080p), 5-10 TV series (2-10GB per season) — requires 1-2TB. Add regional language content and music and 4TB is a comfortable starting point. Western Digital 4TB USB drives are available in India for Rs 7,000-9,000.
Does WireGuard work with Airtel and Jio fiber connections?
Yes. WireGuard uses UDP port 51820. While some ISPs do deep packet inspection, WireGuard traffic is not commonly blocked by Indian ISPs as of 2026. Jio and Airtel fiber users report WireGuard working reliably for home VPN use. Port forwarding must be configured on your ISP router.
Is a Raspberry Pi 4 enough for all these services simultaneously?
With 4GB RAM: Yes, for typical home use. Pi-hole and WireGuard use minimal resources. Home Assistant uses 500MB-1GB RAM. Jellyfin uses 200MB at rest (more during active streaming/transcoding). Total at rest: 1-2GB RAM used, leaving headroom. The 8GB model is recommended for comfort and future expansion.
Add comment