A collection of bash scripts to automate the setup of a complete home server environment using Docker containers. This project supports both Ubuntu and Raspberry Pi platforms, providing a modular approach to deploying essential home server services.
This project automates the installation and configuration of a complete home server stack including Docker, Portainer, AdGuard Home, Jellyfin media server, WireGuard VPN, and Dynamic DNS management.
- Multi-Platform Support: Ubuntu and Raspberry Pi
- Modular Design: Individual scripts for each component
- All-in-One Setup: Complete automation scripts
- Docker-Based: Containerized services for easy management
- Network Isolation: Docker macvlan networking
- Persistent Storage: Proper volume management
- Auto-Start Services: Systemd integration for reliability
Service | Port | Purpose | Default IP |
---|---|---|---|
Portainer | 9000 | Docker management GUI | 192.168.0.190 |
AdGuard Home | 3000 | DNS ad-blocking & protection | 192.168.0.191 |
Jellyfin | 8096 | Media streaming server | 192.168.0.192 |
WireGuard | 51820 | VPN server | Dynamic |
DDClient | - | Dynamic DNS updates | - |
simple-bash/
βββ ubuntu-setup/ # Ubuntu-specific scripts (modular)
β βββ 1-install-docker-ubuntu.sh
β βββ 2-set-docker-network-portainer.sh
β βββ 3-install-ddclient.sh
β βββ 4-install-adguard.sh
β βββ 5-install-jellyfin.sh
β βββ 6-install-wireguard.sh
βββ raspi-setup/ # Raspberry Pi-specific scripts (modular)
β βββ 1-install-docker-pi.sh
β βββ 2-set-docker-network-portainer.sh
β βββ 3-install-ddclient.sh
β βββ 4-install-adguard.sh
β βββ 5-install-jellyfin.sh
β βββ 6-install-wireguard.sh
βββ script-ubuntu-all-in-one.sh # Complete Ubuntu setup
βββ script2-6-ubuntu.sh # Ubuntu setup (steps 2-6)
βββ script2-6-pi.sh # Raspberry Pi setup (steps 2-6)
βββ install-docker-ubuntu.sh # Docker-only for Ubuntu
βββ install-docker-pi.sh # Docker-only for Raspberry Pi
βββ LICENSE # MIT License
For Ubuntu:
wget https://raw.githubusercontent.com/yourusername/simple-bash/main/script-ubuntu-all-in-one.sh
chmod +x script-ubuntu-all-in-one.sh
sudo ./script-ubuntu-all-in-one.sh
For Raspberry Pi:
wget https://raw.githubusercontent.com/yourusername/simple-bash/main/script2-6-pi.sh
chmod +x script2-6-pi.sh
sudo ./script2-6-pi.sh
Ubuntu Setup:
# Clone the repository
git clone https://github.com/yourusername/simple-bash.git
cd simple-bash
# Run scripts in order
sudo ./ubuntu-setup/1-install-docker-ubuntu.sh
sudo ./ubuntu-setup/2-set-docker-network-portainer.sh
sudo ./ubuntu-setup/3-install-ddclient.sh
sudo ./ubuntu-setup/4-install-adguard.sh
sudo ./ubuntu-setup/5-install-jellyfin.sh
sudo ./ubuntu-setup/6-install-wireguard.sh
Raspberry Pi Setup:
# Clone the repository
git clone https://github.com/yourusername/simple-bash.git
cd simple-bash
# Run scripts in order
sudo ./raspi-setup/1-install-docker-pi.sh
# Log out and back in for Docker group changes
sudo ./raspi-setup/2-set-docker-network-portainer.sh
sudo ./raspi-setup/3-install-ddclient.sh
sudo ./raspi-setup/4-install-adguard.sh
sudo ./raspi-setup/5-install-jellyfin.sh
sudo ./raspi-setup/6-install-wireguard.sh
For Ubuntu:
sudo ./install-docker-ubuntu.sh
For Raspberry Pi:
sudo ./install-docker-pi.sh
- Ubuntu 18.04 or later
- Internet connection
- Sudo privileges
- At least 2GB RAM (4GB recommended)
- 20GB free disk space
- Raspberry Pi 3 or 4 (recommended)
- Raspberry Pi OS (formerly Raspbian)
- Internet connection
- Sudo privileges
- At least 2GB RAM (4GB recommended)
- 32GB+ microSD card
The scripts automatically configure:
- Docker macvlan network for container isolation
- Static IP assignment for each service
- Promiscuous mode on network interface
- Dynamic DNS updates for external access
- Subnet: 192.168.0.0/24
- Gateway: 192.168.0.1
- Portainer: 192.168.0.190
- AdGuard: 192.168.0.191
- Jellyfin: 192.168.0.192
The scripts create the following directory structure:
/home/pi/ (or /home/docker/)
βββ docker/
β βββ docker-network/
β βββ imanmacvlan/
βββ portainer/
βββ ddclient/
βββ adguard/
β βββ workdir/
β βββ confdir/
βββ jellyfin/
β βββ library/
β βββ tvseries/
β βββ movies/
βββ wireguard/
βββ appdata/
βββ config/
- DNS-level ad blocking with AdGuard Home
- VPN server for secure remote access
- Container isolation with Docker macvlan
- Dynamic DNS for secure external access
- Persistent storage with proper volume management
-
Portainer: http://192.168.0.190:9000
- Docker management interface
- Monitor and manage all containers
-
AdGuard Home: http://192.168.0.191:3000
- DNS ad-blocking dashboard
- Network protection settings
-
Jellyfin: http://192.168.0.192:8096
- Media streaming interface
- Add your movies and TV shows
-
WireGuard: Port 51820
- VPN server for remote access
- Configure clients for secure connection
- Portainer: Create admin account on first access
- AdGuard Home: Complete initial setup wizard
- Jellyfin: Add media libraries and configure users
- WireGuard: Generate client configurations
Edit the scripts to modify static IP assignments:
# In the network setup scripts, change:
--ip 192.168.0.190 # Portainer
--ip 192.168.0.191 # AdGuard
--ip 192.168.0.192 # Jellyfin
Update the macvlan network configuration:
# Change subnet and gateway in network setup scripts
--subnet=192.168.0.1/24
--gateway=192.168.0.1
Follow the pattern in existing scripts to add new Docker services:
- Create directory structure
- Configure network settings
- Set up volume mounts
- Configure auto-restart
Docker not starting:
sudo systemctl status docker
sudo systemctl enable docker
sudo systemctl start docker
Network issues:
# Check network interface
ip addr show
# Restart network
sudo systemctl restart networking
Permission issues:
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back in
Port conflicts:
# Check what's using a port
sudo netstat -tulpn | grep :9000
View container logs:
docker logs portainer
docker logs adguardhome
docker logs jellyfin
docker logs wireguard
Check container status:
docker ps -a
This project is licensed under the MIT License - see the LICENSE file for details.
- Docker - Container platform
- Portainer - Docker management
- AdGuard Home - DNS ad-blocking
- Jellyfin - Media server
- WireGuard - VPN solution
Note: This project is designed for home use and educational purposes and with personally specific configurations.