The following containers are in the the docker-compose-t2.yml file
- Traefik V2 - used for reverse proxy
- Authelia - private forwad auth with DUO push
- Portainer - Web GUI to manage docker stacks/containers/images/networks
- Heimdall - for having all mgmt urls in one place
- MariaDB - DB for some of the containers
- phpMyAdmin - Manage MariaDB
- qBittorrent - torrent downloader
- Jackett - Torrent Proxy
- Radarr - Movie Managment
- Sonarr - TV Shows Management
- Plex - Media Server
- Tautulli - Plex stats and monitoring
- Piwigo - Photo album
- Firefox - web browser
- Glances - system monitor
- PiHole - ad blocker
- dchphelper - used with pihole to allow for dhcp
- Ouroboros - Automatic Docker Container Updates
- Docker-GC - Automatic Docker Garbage Collection
Install Ubuntu, Docker and Docker Compose
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 add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
sudo docker run hello-world
To test dockersudo useradd -m username
optional to create a different usersudo passwd username
to set password
sudo usermod -aG docker ${USER}
to assign to docker group
-
Create .env file for environmental variables, make sure to change USER to your username
mv $USERDIR/docker-HTPC/.env.example $USERDIR/docker-HTPC/.env
- edit the variables to your liking, comment out ones you don't need and vice versa
-
Create files for Traefik
- mkdir $USERDIR/docker-HTPC/traefik2/
- mkdir $USERDIR/docker-HTPC/traefik2/acme
- touch $USERDIR/docker-HTPC/traefik2/acme/acme.json
- chmod 600 $USERDIR/docker-HTPC/traefik2/acme/acme.json
- touch $USERDIR/docker-HTPC/traefik2/traefik.log
- For other providers other than cloudflare, check here.
-
You will have to put your sensitive information in files. Create folder/files for Docker Secrets
- mkdir $USERDIR/docker-HTPC/secrets
- chmod 600 $USERDIR/docker-HTPC/secrets
- sudo su
- cd $USERDIR/docker-HTPC/secrets
- make your files for each individual credentials or APIs that you want to use. I have created the following files and entered in the corresponding info:
- authelia_duo_api_secret_key
- authelia_jwt_secret
- authelia_notifier_smtp_password
- authelia_session_secret
- authelia_storage_mysql_password
- cloudflare_api_key
- cloudflare_email
- cloudflare_zoneid
- google_client_id
- google_client_secret
- guac_db_name
- guac_mysql_password
- guac_mysql_user
- my_email
- mysql_root_password
- oauth_secret
- plex_claim
- RADARR_API_KEY
-
(Optional) Enable or use HTTP Basic Authentication by renaming
shared\.htpasswd.example
toshared\.htpasswd
in the folder and adding username and hashed password to it. -
Configure environmental variables (
.env
file)
- Rename the included
.env.example
to.env
. - Edit variables in
.env
file. - All variables (ie.
${XXX}
) in docker-compose.yml come from.env
file stored in the same place as docker-compose.yml. - Ensure good permissions for the
.env
file (recommended: 640).
- Edit
docker-compose-t2.yml
to include only the services you want or add additional services to it. - If using pihole ensure you create the files indicated below for dhcphelper, also if you have host DNS issues read below to troubleshoot/fix
- Start your docker stack "docker-compose -f docker-compose-t2.yml up -d"
Configure .env with the variables. see .env.example
Use .env file now for variables instead of /etc/environment
-
Create folder dhcp-helper under ~/docker
-
Create file Dockerfile in ~/docker-HTPC/dhcp-helper
-
Add:
FROM alpine:latest
RUN apk --no-cache add dhcp-helper
EXPOSE 67 67/udp
ENTRYPOINT ["dhcp-helper", "-n"]
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service
sudo rm /etc/resolv.conf
sudo vim /etc/resolv.conf
nameserver