PSA: Project has moved to GitLab. This repo will remain on Github as a mirror.
This is a simple docker-compose configuration to standup a new HTPC. It's based on running on an Ubuntu server, but could easily be adapted for other opertaing systems with Docker support.
It includes the following Services
-
MEDIA
- Plex Media Server - for managing media and serving files to Plex Clients
- Tautulli - for Plex library statistics and usage
- Organizr - for simple web based management
- qBittorrent + Private Internet Access or TorGuard - for downloading torrents... "safely"
- Sonarr - for TV Series Management
- Radarr - for Movie Management
- Lidarr - for Music Management
- Readarr - for eBook Management
- Calibre - for eBook Management
- Bazarr - for Subtitle Management
- Jackett - for Torrent Tracker feeds
- Ombi - for requesting additional library content
- Requestrr - for making requests via a Discord chatbot which used to simplify using services like Sonarr/Radarr/Ombi via the use of chat!
-
SYSTEM
- Portainer - for managing all of your Docker containers
- Watchtower - for automatically updating running containers
- NetData - for system resource monitoring
- Duplicati - for backing up data to your favorite provider
- InfluxDB - for time series based database storage
- Chronograf - for making pretty dashboards out of the database data
- SpeedTest - for performing a speedtest and posting data to the database
- Varken - for aggregating data from the Plex ecosystem into InfluxDB using Grafana for a frontend
- Grafana - for making dashboards out of the Varken Data
- Traefik - Reverse Proxy and SSL Support
- DenyHosts - DenyHosts is a log-based intrusion prevention security tool for SSH servers written in Python. It is intended to prevent brute-force attacks on SSH servers by monitoring invalid login attempts in the authentication log and blocking the originating IP addresses.
- UniFi - Ubiquiti Networks UniFi Controller software
This project was heavily inspired by the MediaBox project... Many Thanks!
NOTE |
---|
data is used for root in the below example but you can choose your own as there is a ENV variable exposed called "${ROOT_FOLDER_PATH} ". |
├── apps
├── repos
└── standalone
├── media
│ ├── bazarr
│ ├── calibre-web
│ ├── delugevpn
│ ├── jackett
│ ├── lidarr
│ ├── ombi-v4
│ ├── organizr-v2
│ ├── plex-server
│ ├── radarr4k-v3
│ ├── radarr-v3
│ ├── readarr-unstable
│ ├── requestrr
│ ├── sonarr4k-v3
│ ├── sonarr-v3
│ └── tautulli
└── system
├── chronograf
├── duplicati
├── grafana
├── influxdb
├── portainer
└── varken
├── downloads
├── media
├── torrents-manual
└── torrents-watch
├── complete
│ ├── blackhole
│ │ ├── books
│ │ ├── movies
│ │ ├── movies4k
│ │ ├── music
│ │ ├── tv
│ │ └── tv4k
│ ├── nzb
│ │ ├── books
│ │ ├── generic
│ │ ├── movies
│ │ ├── movies4k
│ │ ├── music
│ │ ├── tv
│ │ └── tv4k
│ └── torrents
│ │ ├── books
│ │ ├── movies
│ │ ├── movies4k
│ │ ├── music
│ │ ├── tv
│ │ └── tv4k
└── incomplete
├── nzb
└── torrents
├── AudioBooks
├── Books
├── Comics
├── DVR
│ ├── Movies
│ └── TV
├── HomeVideos
├── Movies
│ ├── ANIME
│ ├── DOCS
│ ├── HD
│ ├── KIDS
│ ├── NEW
│ ├── SD
│ ├── SHARED [FOR MEDIA YOU WANT IN BOTH YOUR MOVIES + KIDS PLEX LIBARIES]
│ ├── SHORT
│ ├── STAND-UP
│ └── UNKNOWN
├── Movies4K
├── Music
├── MusicVideos
├── Pictures
├── Trailers
│ ├── Games
│ ├── Movies
│ └── TV
├── Tutorials
├── TV
│ ├── ANIME
│ ├── CONTINUING
│ ├── DOCS
│ ├── ENDED
│ ├── KIDS
│ ├── NEW
│ ├── SHARED [FOR MEDIA YOU WANT IN BOTH YOUR TV + KIDS PLEX LIBARIES]
│ └── STAND-UP
├── TV4K
├── Videos
└── VideosNAS
- Sometimes the Deluge + VPN Container disconnects and can't re-establish a forwarded port connection.
- Ubuntu 18.04.4 or 20.04 LTS
- VPN Account from PIA or TorGuard
- Git
- Docker
- Python 2.7
- Docker-Compose
- Install Ubuntu Server and get it updated -
sudo apt update
thensudo apt upgrade
- If you have existing media on a separate NTFS formatted drive:
- Mount NTFS Drive w/ Appropriate Permissions, Link 1
sudo blkid
- Find the block ID of your media drivesudo mkdir /media/Media
- make the mount point- Add to
/etc/fstab
:UUID=BC6617A366175D88 /media/Media ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133 0 0
- Setup Samba Share (to access media outside of HTPC)
- Install Docker
- You'll need to add your user running docker to the
docker
group. See Post-installation steps for Linux
- Install Docker Compose
- Clone Repo
git clone https://gitlab.com/phikai/htpc-docker-standup.git
- Copy Sample Environement File
cp sample.env .env
- Edit
.env
to match your environment - Run Docker Environment
docker-compose up -d
- ???
- Profit.
-
PMSTOKEN=
- The claim token for the server to obtain a real server token. If not provided, server is will not be automatically logged in. If server is already logged in, this parameter is ignored. You can obtain a claim token to login your server to your plex account by visiting https://www.plex.tv/claim -
PLEX_TAG
- Which version of Plex Media Server, available options:latest
(The same as stable),stable
(Stable version), andautoscan
(Stable version, includes Plex Autoscan).
Only for the PLEX_TAG=autoscan tag |
---|
- PLEXAUTOSCAN_ARGS= |
- PLEX_LOGIN= |
- PLEX_PASSWORD= |
More info on Plex Autoscan can be found here
DEFAULT_TAG
- Defaults to thelatest
tag.SONARR_TAG
- Which version of Sonarr, available options:latest
(The same as stable),stable
(Stable version, V2),unstable
(Unstable version, V2) andphantom
(Unstable version, v3). You should usephantom
as the v3 builds are now relativel stable and are transitioning now from alpha to beta release.RADARR_TAG
- Which version of Radarr, available options:latest
(The same as stable),stable
(Stable version, V2),unstable
(Unstable version, V2) andaphrodite
(Unstable version, v3). You should useaphrodite
as the v3 builds are now relativel stable and are transitioning now from alpha to beta release.LIDARR_TAG
- Which version of Lidarr, available options:latest
(The same as stable),stable
(Stable version, master branch),semi-stable
(Semi-Stable version, develop branch) andunstable
(Unstable version, nightly).CALIBRE_TAG
- Which version of Calibre (Web), available options:latest
(Stable Calibre (Web) releases).BAZARR_TAG
- Which version of Bazarr, available options:latest
(The same as stable),stable
(Stable version), andunstable
(Unstable version, development branch).ORGANIZR_TAG
- Which version of Organizr, available options:- The
latest
tag will get you the original Organizr v2 image. - The php-fpm tag includes the implementation of a socket connection for PHP-FPM instead of an HTTP connection. It also includes the PM changes for the www.conf file that we recommend to users that are just getting started. One thing to note is that, if you mounted the /etc/php7/php-fpm.d/ directory for the container to your Host, you MUST recreate your container WITHOUT that mount. You will also want to remove the /path/to/Org/config/php directory from your Docker Host as that can cause issues as well. This is designed as a drop-in to get PHP-FPM working without having to mount extra directories, etc.
- The
plex
tag will get you the original Organizr v2 image, but with some changes found in the plex-theme branch of the GitHub repo to accommodate the Plex Theme for Organizr v2 by Burry. - The
armhf
tag is an adaptation of the php-fpm image for ArmHF platforms like the RaspberryPi. - The
arm64
tag is an adaptation of the php-fpm image for Arm64 platforms like the ASRock64. - The
dev-
equivalent tags pull from the v2-develop branch of the GitHub repository instead of the main v2-master branch.
- The
OMBI_TAG
- Which version of Ombi, available options:latest
(The same as stable),stable
(v3 releases, probably the last one), andunstable
(v4 releases).TRAEFIX_TAG
- Currently set tov1.7.16
due to breaking change in 2.x
READARR_TAG
- Which version of Readarr, available options:latest
(UNAVAILABLE),stable
(UNAVAILABLE),untable
(AVAILABLE). it is recommended to use specific build tags. Latest beingunstable-0.1.0.136
.
WARNING |
---|
READARR Advised to use static release tags as updates require a fresh database until further notice. There's only a unstable tag for the moment. |
SONARR_VERSION=
- Sets both the container + volume path name suffix e.g. v3 (sonarr-v3)RADARR_VERSION=
- Sets both the container + volume path name suffix e.g. v3 (radarr-v3)OMBI_VERSION=
- Sets both the container + volume path name suffix e.g. v4 (ombi-v4)ORGANIZR_VERSION=
- Sets both the container + volume path name suffix e.g. v2 (organizr-v2)
ROOT_FOLDER_PATH
- Sets the ROOT path or all volume paths. Currently set todata
.LOCALUSER=
- This is the local user of your linux account and account running dockerHOSTNAME=
- Hostame of the server, can be found by executinghostname
from command lineIP_ADDRESS=
- Local IP Address of the server, should be staticPUID=
- UID of the local user, can be found by executingid
from the command linePGID=
- GID of the local user, can be found by executingid
from the command lineUMASK=
- UASK determines the settings of a mask that controls how file permissions are set for newly created files, can be set by executingumask
from the command lineVPNUNAME=
- Your VPN username from PIA or TorGuardVPNPASS=
- Your VPN password from PIA or TorGuardVPNPROVIDER=
- Your VPN provider, name must match a folder specified inovpn
. This defaults topia
if you copiedsample.env
.VPN_REMOTE=
- The remote server you want to connect to (must support port forwarding)CIDR_ADDRESS=
- IP/netmask entries which allow access to the server without requiring authorization. We recommend you set this only if you do not sign in your server. For example192.168.1.0/24,172.16.0.0/16
will allow access to the entire192.168.1.x
range and the172.16.x.x
TZ=
- Set the timezone inside the container. For example:Europe/London
. The complete list can be found here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zonesEMAIL=
- Email address to be used for Let's Encrypt SSL certificate validation -[email protected]
DOMAIN=
- Public domain to use for accessing services via a public domain -server.domain.com
WATCHTOWER_EMAIL=
- Email address you'd like Watchtower to notify for any notifications -[email protected]
SMTP_FROM=
- From address that your SMTP server uses to send email -[email protected]
SMTP_SERVER=
- Servername of your SMTP server -smtp.domain.com
SMTP_PORT=
- Port that your SMTP server uses to connect -587
SMTP_USER=
- Username that your SMTP server uses to authenticateSMTP_PASS=
- Password for your SMTP user to authenticateSPEEDTEST_INTERVAL=
- Number of seconds between tests to the Speedtest.net servicesTRAEFIK_AUTH=
- Basic Auth for the Traefik Admin htpasswd GeneratorSTACK_NAME=
- This is used to specify the appropriate network Traefik should use. See #13 for details.
- Mailgun has an excellent QuickStart Guide
- Check out the sending via SMTP
- Make sure to also verify your domain
- PIA List of Servers that support port forwarding
- Deluge + PIA FAQ
- Removing Old/Completed Torrents from Deluge
- Create Series Folder in Sonarr
- Proper Encoding of the Portainer Password
- Open Shell in a Container - Link 1, Link 2
Potential Script to setup, renew and copy SSL for Plex
If this project has helped you in anyway, and you'd like to say thanks...
You can also gift a Plex Pass subscription as a great way to show your appreciation.
AFFILIATE DISCLOSURE: You can also support this project by purchasing a VPN Subscription via one of the links in this README.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.