HTPC Docker Standup
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
- Plex Media Server - for managing media and serving files to Plex Clients
- Deluge + Private Internet Access VPN - for downloading torrents... "safely"
- Sonarr - for TV Series Management
- Radarr - for Movie Management
- Jackett - for Torrent Tracker feeds
- Tautulli - for Plex library statistics and usage
- Ombi - for requesting additional library content
- Portainer - for managing all of your Docker containers
- Watchtower - for automatically updating running containers
- NetData - for system resource monitoring
- Muximux - for simple web based management
- Duplicati - for backing up data to your favorite provider
- Nginx Proxy + Let's Encrypt - for easily accessing services on SSL Enabled Hostnames
This project was heavily inspired by the MediaBox project... Many Thanks!
Known Issues
- Sometimes the Deluge + VPN Container disconnects and can't re-establish a forwarded port connection.
- Plex can't be assigned Hostname + SSL on
Host
Network - Nginx Reverse Proxy
Install Instructions
Prerequisites
Server Configuration
- 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://github.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.
Environment File
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 linePMSTOKEN=
- 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/claimVPNUNAME=
- Your Private Internet Access username from PIA VPNVPNPASS=
- Your Private Internet Access password from PIA VPNVPNPROVIDER=
- Your VPN provider, name must match a folder specified inovpn
. This defaults to PIA if you copiedsample.env
.VPN_REMOTE=
- The remote server you want to connect to (must support port forwarding), List of ServersCIDR_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_zonesPMSTAG=
- Which version of Plex Media Server, available options:latest
,plexpass
andpublic
. You should usepublic
unless you are a Plex Pass accountEMAIL=
- Email address to be used for Let's Encrypt SSL certificate validation -someone@somewhere.com
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 -someone@somewhere.com
SMTP_FROM=
- From address that your SMTP server uses to send email -someone@somewhere.com
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 authenticate
Email/SMTP Service
- Mailgun has an excellent QuickStart Guide
- Check out the sending via SMTP
- Make sure to also verify your domain
Tips and Tricks
- 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...
Disclaimer
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.