Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Repository files navigation

Simple Bash - Docker Home Server Setup

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.

🏠 Project Overview

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.

✨ Features

  • 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

πŸš€ Services Included

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 -

πŸ“ Project Structure

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

πŸ› οΈ Installation Options

Option 1: All-in-One Setup (Recommended for Beginners)

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

Option 2: Modular Setup (Recommended for Advanced Users)

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

Option 3: Docker Only

For Ubuntu:

sudo ./install-docker-ubuntu.sh

For Raspberry Pi:

sudo ./install-docker-pi.sh

πŸ”§ Prerequisites

Ubuntu Requirements

  • Ubuntu 18.04 or later
  • Internet connection
  • Sudo privileges
  • At least 2GB RAM (4GB recommended)
  • 20GB free disk space

Raspberry Pi Requirements

  • Raspberry Pi 3 or 4 (recommended)
  • Raspberry Pi OS (formerly Raspbian)
  • Internet connection
  • Sudo privileges
  • At least 2GB RAM (4GB recommended)
  • 32GB+ microSD card

🌐 Network Configuration

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

Default Network Settings

  • 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

πŸ“‚ Storage Structure

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/

πŸ” Security Features

  • 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

🎯 Usage After Installation

Accessing Services

  1. Portainer: http://192.168.0.190:9000

    • Docker management interface
    • Monitor and manage all containers
  2. AdGuard Home: http://192.168.0.191:3000

    • DNS ad-blocking dashboard
    • Network protection settings
  3. Jellyfin: http://192.168.0.192:8096

    • Media streaming interface
    • Add your movies and TV shows
  4. WireGuard: Port 51820

    • VPN server for remote access
    • Configure clients for secure connection

Initial Setup

  1. Portainer: Create admin account on first access
  2. AdGuard Home: Complete initial setup wizard
  3. Jellyfin: Add media libraries and configure users
  4. WireGuard: Generate client configurations

πŸ”§ Customization

Changing IP Addresses

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

Modifying Network Settings

Update the macvlan network configuration:

# Change subnet and gateway in network setup scripts
--subnet=192.168.0.1/24
--gateway=192.168.0.1

Adding Custom Services

Follow the pattern in existing scripts to add new Docker services:

  1. Create directory structure
  2. Configure network settings
  3. Set up volume mounts
  4. Configure auto-restart

πŸ› Troubleshooting

Common Issues

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

Logs and Debugging

View container logs:

docker logs portainer
docker logs adguardhome
docker logs jellyfin
docker logs wireguard

Check container status:

docker ps -a

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Note: This project is designed for home use and educational purposes and with personally specific configurations.

About

A (one of my personal newcomer/noob project) bash scripts that automate the complete setup of a home server using Docker containers. Supports Ubuntu and Raspberry Pi with modular deployment of Portainer, AdGuard Home, Jellyfin media server, WireGuard VPN, and Dynamic DNS management.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages