This repository automates the setup and management of my home server using Docker and Docker Compose.
-
Operating System: Ubuntu/Debian Linux
-
Git: Required to clone the repository. Install Git with:
sudo apt install git
To quickly set up the script, use the following commands:
-
Clone the repository:
git clone https://github.com/HASANALI117/home-server.git
-
Navigate to the
scripts
directory:cd home-server/scripts
-
Make the script executable and run it:
chmod +x udms.sh ./udms.sh
Follow the prompts to provide configuration details. Examples of the prompts are:
-
Enter Time Zone (TZ):
Enter TZ: Europe/London
This prompt asks for your server's time zone. You should enter the appropriate time zone for your location. For a list of time zones, refer to the Wikipedia Time Zone List.
-
Enter Server IP (SERVER_IP):
Enter SERVER_IP: 192.168.1.100
This prompt asks for the IP address of your server. Enter the local IP address where you want to access your services.
-
Enter Plex Claim (PLEX_CLAIM):
Enter PLEX_CLAIM: YOUR_PLEX_CLAIM_TOKEN
This prompt asks for a Plex claim token. If you’re using Plex, you’ll need to enter your Plex claim token to connect your server to your Plex account. You can keep it empty initially, and add the Plex claim token to the
plex_claim
file in theSECRETS
directory when you have it. If you don't know what your Plex claim is, you can find it at Plex Claim.
These prompts will help configure essential aspects of your home server setup. Make sure to provide accurate details to ensure that the script configures your environment correctly.
The udms.sh
script performs the following tasks:
-
Installs Docker and Docker Compose: Ensures Docker and Docker Compose are installed on your system.
-
Verifies Installation: Checks that Docker and Docker Compose are installed correctly.
-
Sets Up Directories: Creates the following directories:
APPDATA
: Stores application-specific data for Docker services.COMPOSE
: Contains Docker Compose files for different services.LOGS
: Holds log files for Docker services.SCRIPTS
: Stores additional scripts related to Docker and server management.SECRETS
: Keeps sensitive data like Plex claim tokens and other secrets.SHARED
: Directory for shared resources between containers.
-
Configures Permissions: Sets appropriate permissions for directories and files to ensure secure access.
-
Downloads Docker Compose Files: Retrieves Docker Compose files for various services from remote sources.
-
Starts Docker Containers: Launches Docker containers based on the provided configuration.
-
Service Configuration: Applies specific configurations to services like qbittorrent and homepage.
-
Adds Docker Aliases: Adds useful Docker and bash aliases to your bash configuration for easier management of Docker services and other tasks. For a full list of aliases and usage examples, refer to the Bash Aliases & Shortcuts section.
The script sets up Docker Compose files for the following services:
-
socket-proxy
: A reverse proxy for managing access to multiple services running on the server. Documentation -
portainer
: A lightweight management UI that allows you to easily manage Docker environments. Documentation -
dozzle
: A real-time log viewer for Docker containers, providing a web interface to view logs. Documentation -
homepage
: A customizable homepage service that provides quick access to various other services. Documentation -
plex
: A media server that organizes and streams your personal media collection. Documentation -
jellyfin
: An open-source media server software for managing and streaming your media library. Documentation -
qbittorrent
: A popular torrent client with a built-in web interface for managing torrents. Documentation -
sonarr
: A TV series manager that automatically downloads and organizes TV shows. Documentation -
radarr
: A movie collection manager that automates the process of downloading and organizing movies. Documentation -
prowlarr
: A Usenet and torrent indexer that integrates with various other services for managing downloads. Documentation -
bazarr
: A companion application to Sonarr and Radarr, providing subtitle management for your media library. Documentation -
docker-gc
: A garbage collection tool that automatically cleans up unused Docker containers and images to free up disk space. Documentation
There are 75+ apps in the compose/
directory. For more information on these apps, refer to the README in the compose directory. The script is a work in progress for adding all of them, for now to add more services, follow these steps:
- Add Service Configuration: Copy the desired service's Docker Compose YAML file from the
compose/
directory. - Update
master-compose.yml
: Add the path to the copied service YAML file in themaster-compose.yml
file under the appropriate section.
Example of adding a new service in master-compose.yml
:
include:
########################### SERVICES
# PREFIX udms = Ultimate Docker Media Server
# HOSTNAME=udms - defined in .env
# CORE
- compose/socket-proxy.yml
- compose/portainer.yml
- compose/dozzle.yml
- compose/homepage.yml
# MEDIA
- compose/plex.yml
- compose/jellyfin.yml
# DOWNLOADERS
- compose/qbittorrent.yml
# PVRS
- compose/radarr.yml
- compose/sonarr.yml
- compose/prowlarr.yml
# COMPLEMENTARY AP
PS
- compose/bazarr.yml
# MAINTENANCE
- compose/docker-gc.yml
# Add your new service here
- compose/new-service.yml
Special thanks to @anandslab for his amazing guides and resources. The Docker Compose files were taken from his repository docker-traefik. For more information, check out his guide on setting up a Docker media server here.