Docker media and home server stack with Docker Compose, Traefik, Google OAuth2, and LetsEncrypt
Setup Tips:
- Insall Docker
- Set privileges on folder and sub-folders:
sudo setfacl -Rdm g:docker:rwx serverrsudo chmod -R 775 serverr
- Set privileges on folder and sub-folders:
- Make sure to have domain/DNS up to date, and API access to provider (whitelist your IP if needed)
- Update router settings:
- Make machine static internal IP
- Port forward 80, 443 (Traefik) and 32400 (Plex)
cp serverr/.env.template serverr/.envand fill out variables- Setup Traefik2 files:
touch serverr/app-data/traefik2/acme/acme.jsonchmod 600 serverr/app-data/traefik2/acme/acme.jsontouch serverr/app-data/traefik2/traefik.log
- Setup docker secrets:
mkdir serverr/secretssudo chown root:root serverr/secertssudo chmod 600 serverr/secrets- Domain Name Providers (I use Namecheap,
docker-compose.ymlwill need to be updated if provider changes)
- Set up Google Cloud Platform oauth/credentials
- SSL certs:
- Uncomment traefik sections
docker-compose up -d traefikand check certs attraefik.domain.comand/oracme.json- Comment staging, clear out
acme.json - Bring up traefik again and check certs at
traefik.domain.comand/oracme.json - Comment out certresolver label and bring up traefik last time
- Configure various containers via their subdomain.domain.com addresses, things to note:
- Sabnzbd
- Have to access Sabnzbd via IP:Port/sabnzbd before whitelisting the subdomain in config
- Tauttulli
- If using the official remote app, disable oauth, register device token, update .env, re-enable oauth.
- Sabnzbd
- Install UFW:
- Allow 80, 443, 32400 from anywhere
- Allow 22 from 192.168.0.0/16
- Change DOCKER_OPTS to Respect IP Table Firewall
sudo vi /etc/default/docker- add
DOCKER_OPTS="--iptables=false"
- Install snapraid, gitclone snapraid-runner and update conf, install and configure mergerFs, install rclone and configure to Dropbox
- Update scripts/crontab.template and copy to
sudo crontab -e - CrowdSec Setup Guide