C:\Ultimate Docker Setup.pdf

Ultimate Docker Setup

Ultimate Docker Setup

This iDocker Logos a quick guide to setup the ultimate home server. To include file sharing & synchronising, email and website hosting, media sharing and streaming, and automatic downloads of TV, movies and music.

Firstly install the latest Ubuntu 16 distro (Download from here: https://www.ubuntu.com/download/server )

Installing Docker

 

sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
sudo app-get-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install docker-ce
sudo systemctl status docker

Create shares & environment for media server elements

sudo mkdir /shares/
sudo mkdir /shares/tv
sudo mkdir /shares/movies
sudo mkdir /shares/transcode
sudo mkdir /shares/downloads
sudo mkdir /shares/downloads/music
sudo mkdir /shares/downloads/tv
sudo mkdir /shares/downloads/movies
sudo mkdir /shares/downloads/incomplete
sudo mkdir /shares/downloads/complete
sudo mkdir /shares/music

Samba file sharing setup

sudo nano /etc/samba/smb.conf

Edit the file to include:

[shares]
comment = shares
path = /shares/
browsable = yes
guest ok = yes
read only = no
create mask = 0777

press ctrl + x type y

lets now just ensure guest access to the shares on your network will be available:

sudo chmod -R 777 /shares/

 Setting Up Portainer

Lets start deploying some containers. Portainer will allow you to easily manage your Docker host so lets start there:

Portainer Logo
Portainer

sudo docker create –name portainer \
–restart=always \
–net=bridge \
-e PGID=1001 -e PUID=1001 \
-v /home/docker/portainer/config:/config \
-v /var/run/docker.sock:/var/run/docker.sock \
-p 9000:9000 \
portainer/portainer

Setting Up Deluge

Deluge will be our download client:

Deluge Logo
Deluge

sudo docker create –name deluge \
–restart=always \
–net=bridge \
-e PGID=1001 -e PUID=1001 \
-v /home/docker/deluge/config:/config \
-v /shares/tv:/shares/tv \
-v /shares/movies:/shares/movies \
-v /shares/music:/shares/music \
-v /shares/downloads:/shares/downloads \
-p 8112:8112 \
-p 58846:58846 \
linuxserver/deluge

Setting Up Sonarr

Sonaar to find TV shows:

Sonarr Logo
Sonarr

sudo docker create \
–name sonarr \
–restart=always \
-p 8989:8989 \
-e PGID=1001 -e PUID=1001 \
-v /home/docker/sonarr/config:/config \
-v /shares/downloads:/shares/downloads \
-v /shares/tv:/shares/tv \
-e TZ=Europe/London \
-v /shares/tv:/shares/tv \
linuxserver/sonarr

Setting Up Radarr

Radarr Logo
Radarr

Radarr for movies:

sudo docker create \
–name=radarr \
–restart=always \
-v /home/docker/radarr:/config \
-v /shares/downloads/:/shares/downloads/ \
-v /shares/movies:/shares/movies \
-e TZ=Europe/London \
-e PGID=1001 -e PUID=1001 \
-p 7878:7878 \
linuxserver/radarr

Watchtower will ensure all our containers remain updated automatically.

sudo docker create \
–name watchtower \
–restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-e TZ=Europe/London \
-e PGID=1001 -e PUID=1001 \
v2tec/watchtower

MySQL to be backend database for WordPress

sudo docker create \
–name=mysql \
–restart=always \
-e MYSQL_ROOT_PASSWORD=password \
-v /home/docker/mysql:/config \
-e TZ=Europe/London \
-e PGID=1001 -e PUID=1001 \
-p 3306:3306 \
mysql

PhpMyAdmin incase you need to manage the database at any point

sudo docker create \
–name=phpmyadmin \
–restart=always \
-v /home/docker/phpmyadmin:/config \
-e TZ=Europe/London \
–link mysql:db \
-e PGID=1001 -e PUID=1001 \
-p 8080:80 \
phpmyadmin/phpmyadmin

Plex to stream and manage your media

sudo docker create \
–name=plex \
–hostname=plex.mattshore.co.uk \
–net=host \
–restart=always \
-e VERSION=latest \
-e PUID=1001 -e PGID=1001 \
-e TZ=Europe/London \
-v /home/docker/plex/config:/config \
-v /shares/:/shares/ \
linuxserver/plex

PosteIO to act as our mail server stack

sudo docker create \
–name=posteIO \
–restart=always \
-p 25:25 \
-p 82:80 \
-p 110:110 \
-p 143:143 \
-p 442:443 \
-p 465:465 \
-p 587:587 \
-p 993:993 \
-p 995:995 \
-e PUID=1001 -e PGID=1001 \
-e TZ=Europe/London \
-v /home/docker/posteIO:/data \
analogic/poste.io

LetEncrypt to give our services some well needed SSL encryption with free certificated.

sudo docker create \
–name=letsencrypt \
–restart=always \
-v /home/docker/nginx:/config \
-e VALIDATION=http,tls-sni,dns \
-e PGID=1001 -e PUID=1001 \
-e EMAIL=email@email.com \
-e URL=url.com \
-e SUBDOMAINS=cloud,www,mail,plex \
-p 80:80 -p 443:443 \
-e TZ=Europe/London \
linuxserver/letsencrypt

NextCloud for sharing files and hosting your own private cloud file services.

sudo docker create \
–name nextcloud \
-p 9443:443 \
-e PUID=1001 -e PGID=1001 \
-v /home/docker/nextcloud/config:/config \
-v /home/docker/nextcloud/data:/data \
linuxserver/nextcloud

Finally HTPC to be a single pane of glass to all the other apps we’ve just installed.

sudo docker create –name=htpcmanager \
-v /home/docker/htpcmanager:/config \
-e PGID=1001 -e PUID=1001 \
-e TZ=Europe/London \
-p 8085:8085 \
linuxserver/htpcmanager

 

Simples… 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *