"We stand on the shoulders of giants" - Isaac Newton
This project exists thanks to John Wyles' groundbreaking work in home server automation.
Massive respect to the original docker-compose-media-center repository that inspired this evolution.
This repository contains the Docker compose files for standing up an entire Servarr stack along with other supporting tools and services best suited for an at-home NAS or media center, of course based on Linux and using Cloudflare tunnels to expose your services (if you were wondering why there isn't a reverse proxy in the stack).
Table of contents:
- docker-compose-media-center
Here are some useful resources to keep on hand as you go through the instuctions below for setting up the services contained in the Docker compose files in this repository:
- Servarr Wiki: Best place to start to get to understand some of the services that are setup in the set of Docker compose files in this repository, what they are, and how to set them up and troubleshoot them.
- LinuxServer.io: The How To section here is full of a lot of quick introductory material for not only Docker, Docker Compose, and other good material on what forms the foundation of many of the concepts you will need to understand utilizing the Docker compose files in this repository as well as following along with the instuctions below. Not only that but LinuxServer.io has built and maintains many of the Docker images and formed, to a large extent, the formatting and structure of the Docker compose files in this repository.
- TRaSH Guides: Collected here are a great set of documents that somewhat explain the services but is more of an excellent source for general best practices as well as offering tips and providing help for some edge cases you may encounter.
Below is a list of all the services available in the consolidated docker-compose.yml file. These services setup a complete Servarr stack with associated tools, media players, and miscellaneous self-hosted utilities. You can enable or disable specific services by editing the docker-compose.yml file. This section provides links to Docker image sources, GitHub repositories, and descriptions of each service.
- Portainer: Portainer for managing Docker containers and monitoring resource usage.
NOTE: These services are disabled by default in the compose file as they can be CPU intensive and may not be necessary for most users. Contact the project maintainer if you would like more information.
rana: A tool for finding vanity public keys used withnostr.vanity-age: A rewrite in a fork of vanity-age for finding vanity publicagekeys.
- cAdvisor: A tool for monitoring Docker containers, images, system resources, etc.
- Grafana: A tool for visualizing metrics and logs.
- Deluge: Lightweight BitTorrent client.
DelugeVPN: Deluge with built-in VPN support.- FlareSolverr: Proxy server to bypass Cloudflare protection.
NZBGet: Efficient Usenet downloader.NZBGetVPN: NZBGet with built-in VPN support.- qBittorrent: Feature-rich BitTorrent client. (avoid firefox for first login)
- Unpackerr: Extracts and processes media files after download.
- Pinchflat: Web archive and download manager with collection capabilities.
- Jellyfin: A free software media system to organize, manage, and stream media.
- Jellyseerr: Request management and media discovery tool for Jellyfin.
Overseerr: Request management and media discovery tool for Plex.Plex: A client-server media player system and software suite.Tautulli: A Python-based monitoring and tracking tool for Plex Media Server.
- Tdarr: Audio/Video library analytics and transcode automation.
Kometa: Media management and organization tool.
- Home Assistant: Open-source home automation platform running on Python.
- Calibre: A powerful and easy to use e-book manager (no authentication by default)
- Calibre-web: Web interface for browsing and reading e-books from a Calibre database (default login: admin/admin123)
- Readarr: E-book management tool, part of the *arr family
- Nextcloud AIO: Self-hosted productivity platform
- FlareSolverr: Proxy server to bypass Cloudflare and other anti-bot protections
- Pinchflat: Web archive and download manager
Paperless-ngx: Document management systemSearXNG: Privacy-respecting metasearch engineTailscale: Zero config VPNWallabag: Self-hosted read-it-later app
The setup process has been simplified with a consolidated docker-compose.yml file. Follow these steps to deploy your homelab services:
-
Install Docker and Docker Compose on your system.
-
Create a
medianetwork with:docker network create \ --driver=bridge \ --gateway=172.16.0.1 \ --ip-range=172.16.0.0/24 \ --subnet=172.16.0.0/16 \ -o "com.docker.network.bridge.enable_icc"="true" \ -o "com.docker.network.bridge.enable_ip_masquerade"="true" \ -o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \ -o "com.docker.network.bridge.name"="media" \ -o "com.docker.network.driver.mtu"="1500" \ media
-
Copy the
environment_variables.env.examplefile toenvironment_variables.envand update the variables according to your configuration:cp environment_variables.env.example environment_variables.env nano environment_variables.env # Or use your preferred text editorIMPORTANT NOTE: You don't need to complete all values at once. Fill in the essential ones to start and update others as you set up services. See the Environment Variables section for details.
-
Create the necessary directories for service configuration as described in the Directory Structure section.
4.b First thing we do is make sure the portainer Docker compose file is in the portainer/ directory. This is because Portainer is weird and launches with a stack named after the parent directory to the image it is launched from. This way in our case it will be portainer now:
shell cd portainer/ docker compose --file docker-compose-portainer.yaml --env-file ../environment_variables.env up --detach
Remember to go back to the root project's folder with:
shell cd ../
-
Deploy all services at once with:
docker-compose --env-file environment_variables.env up -d
Or deploy specific service groups by using labels:
# Example: Deploy only download clients docker-compose up -d --scale "group=downloaders" # Example: Deploy only the Servarr stack docker-compose up -d --scale "group=servarr"
-
Access Portainer at
http://your-server-ip:9000to manage your containers through a web interface. -
For Kometa scheduling, add the following to the
jobs.inifile in theofeliaconfig directory:[job-exec "kometa daily"] schedule = 45 11 * * * container = kometa command = photoprism index --cleanup no-overlap = true
In order to start, you need to create several directories to house the configurations for each service and where the Docker container will persist configurations locally between reboots, restarts, etc. This maps directly to the CONFIG_BASE_DIR directory in the .env file that we will get to later.
export CONFIG_BASE_DIR=/volume1/services # substitute for your path/preferences
mkdir -p ${CONFIG_BASE_DIR}This sets the CONFIG_BASE_DIR directory that will store all of the subsequent directories for their Docker configurations. NOTE: I have marked items below I consider optional but note that the files included here will install them all unless you have commented them out as well. If you do not create every directory below and its subsequent service are later set up to be running and available to use. Whether you use them or not you may find you would like to try them later so my recommendation is to leave them as is and you can return later to remove them as you require. If you do skip some of the services marked optional in creating the directories below (highlighted by the # optional ... comments below then do your best to find the environment variables) and comment those out as well (to keep down the noise in your .env file). To create each of the directories run the following after the command above:
# Media Center Core
mkdir -p ${CONFIG_BASE_DIR}/bazarr
mkdir -p ${CONFIG_BASE_DIR}/calibre-web
mkdir -p ${CONFIG_BASE_DIR}/deluge
mkdir -p ${CONFIG_BASE_DIR}/emby
mkdir -p ${CONFIG_BASE_DIR}/grafana/{database,storage,snmp}
mkdir -p ${CONFIG_BASE_DIR}/homarr/{configs,icons,data}
mkdir -p ${CONFIG_BASE_DIR}/jackett
mkdir -p ${CONFIG_BASE_DIR}/jellyfin
mkdir -p ${CONFIG_BASE_DIR}/jellyseerr
mkdir -p ${CONFIG_BASE_DIR}/lidarr
mkdir -p ${CONFIG_BASE_DIR}/nextcloud-aio
mkdir -p ${CONFIG_BASE_DIR}/notifiarr
mkdir -p ${CONFIG_BASE_DIR}/ofelia
mkdir -p ${CONFIG_BASE_DIR}/photoprism/{database,storage}
mkdir -p ${CONFIG_BASE_DIR}/portainer
mkdir -p ${CONFIG_BASE_DIR}/prometheus/{config,data}
mkdir -p ${CONFIG_BASE_DIR}/prowlarr
mkdir -p ${CONFIG_BASE_DIR}/qbittorrent
mkdir -p ${CONFIG_BASE_DIR}/radarr
mkdir -p ${CONFIG_BASE_DIR}/readarr
mkdir -p ${CONFIG_BASE_DIR}/redis
mkdir -p ${CONFIG_BASE_DIR}/sonarr
mkdir -p ${CONFIG_BASE_DIR}/syncthing
mkdir -p ${CONFIG_BASE_DIR}/tdarr/{server,configs,logs,transcode_cache}
mkdir -p ${CONFIG_BASE_DIR}/unpackerr
# Monitoring Stack
mkdir -p ${CONFIG_BASE_DIR}/cadvisor
mkdir -p ${CONFIG_BASE_DIR}/node_exporter
mkdir -p ${CONFIG_BASE_DIR}/snmp_exporter
mkdir -p ${CONFIG_BASE_DIR}/speedtest_exporter
# Ebook Services
mkdir -p ${CONFIG_BASE_DIR}/calibre/{config,books}
mkdir -p ${CONFIG_BASE_DIR}/calibre-web
# New Tools & Utilities
mkdir -p ${CONFIG_BASE_DIR}/nextcloud-aio
mkdir -p ${CONFIG_BASE_DIR}/flaresolverr
mkdir -p ${CONFIG_BASE_DIR}/pinchflat/{config,downloads}
# Optional/Inactive Services (commented out)
# mkdir -p ${CONFIG_BASE_DIR}/caddy
# mkdir -p ${CONFIG_BASE_DIR}/delugevpn
# mkdir -p ${CONFIG_BASE_DIR}/gluetun
# mkdir -p ${CONFIG_BASE_DIR}/immich/{cache,database}
# mkdir -p ${CONFIG_BASE_DIR}/kometa
# mkdir -p ${CONFIG_BASE_DIR}/mylar3
# mkdir -p ${CONFIG_BASE_DIR}/nzbget
# mkdir -p ${CONFIG_BASE_DIR}/overseerr
# mkdir -p ${CONFIG_BASE_DIR}/paperless-ngx
# mkdir -p ${CONFIG_BASE_DIR}/plex
# mkdir -p ${CONFIG_BASE_DIR}/sabnzbd
# mkdir -p ${CONFIG_BASE_DIR}/sabnzbdvpn
# mkdir -p ${CONFIG_BASE_DIR}/searxng
# mkdir -p ${CONFIG_BASE_DIR}/tailscale
# mkdir -p ${CONFIG_BASE_DIR}/tautulli
# mkdir -p ${CONFIG_BASE_DIR}/transmission
# mkdir -p ${CONFIG_BASE_DIR}/transmission-openvpn
# mkdir -p ${CONFIG_BASE_DIR}/wallabag/{database,images}Copy the resources for Ofelia and Prometheus to their respective directories:
cp 'project-folder'/resources/ofelia/jobs.ini ${CONFIG_BASE_DIR}/ofelia/jobs.ini
cp 'project-folder'/resources/prometheus/config/prometheus.yaml ${CONFIG_BASE_DIR}/prometheus/config/prometheus.yamlFor Grafana you will want to import the dashboard from resources/grafana/servarr_dashboard.json into the utility through the UI after the service has been started.
Environment variables are organized into clear sections in both .env and environment_variables.env.example:
- Base Configuration
- Media Players & Services
- Download Clients
- Monitoring Tools
- Photo Management
- System Resources
- Authentication & API Keys
- Service-specific Configurations
All service ports follow a standardized naming convention:
# External port (host machine)
SERVICE_LOCAL_PORT=xxxx
# Internal port (container)
SERVICE_RELATIVE_PORT=xxxx
# Example:
DELUGE_LOCAL_PORT_GUI=8112 # Port on your host
DELUGE_RELATIVE_PORT_GUI=8112 # Port inside container-
Active vs. Commented Services:
- Variables for active services in docker-compose.yml should be uncommented in .env
- Variables for commented services should remain commented in .env
- The example file contains all possible variables with generic placeholders
-
Internal Communication:
- For container-to-container communication, services use hardcoded internal ports
- Example:
http://sonarr:8989in service URLs - These internal URLs are independent of the exposed port variables
-
Resource Limits: Services can have optional resource limit variables:
SERVICE_MEM_LIMIT=128m SERVICE_CPU_SHARES=128
-
Environment Files:
.env: Your active configuration with real valuesenvironment_variables.env.example: Template with generic placeholders- Both files maintain the same structure and organization
Now personal notes to myself on some of that which remains:
- P0: Fix prometheus
- P1: Consider adding Lemmy
- P1: Add instructions for wiring everything together (with pictures?)
- P1: Add instructions for Gluetun containers
- P3: See if
SearXNGneeds more tuning and add it? - P3: Add documentation or maybe breakout Home Assistant
- Add Manyfold
- Add Node-Red https://github.com/node-red/node-red
- Add Zigbee2MQTT (https://github.com/Koenkk/zigbee2mqtt): Zigbee to MQTT bridge, get rid of proprietary Zigbee.
- Add Gluetun instructions
- Fix Mylar3 error 500
- Fix Homeassistant errors
- Fix AlertManager
- Add Immich after testing
- Remove Paperless-ngx and create image with https://github.com/paperless-ngx/paperless-ngx
pushd ${CONFIG_BASE_DIR}/transmission-openvpn/
curl -O <https://www.privateinternetaccess.com/openvpn/openvpn.zip>
unzip openvpn.zip
popd