Skip to content

Commit 4a2bf6c

Browse files
committed
* Several updates 2023_05_26. See full commit log.
* A ton of changes. * Renamed docker-compose.yml to docker-compose-npm.yml to align with the naming convention used for traefik. * I was getting tired of my experiments affecting media servers and databases, which were needed 24/7. So split media apps and databases into their own compose. I run this on a separate Ubuntu LXC (unprivileged) container on Proxmox. * Deleted docker-compose-t2-obsolete.yml. Moved all obsolete apps into their own yml files in the archives folder. * Major changes on docker-compose-t2.yml (my home server). Extension fields were killing the readability and made it difficult to write guides without explaining. Therefore, I removed extension fields. This will be replicated to Synology and Web Server compose files in future. * Updated hardware and docker version details in compose files. * Added docker profiles with the aim of symplifying starting and stopping specific group of services. * Updated some paths to reflect the new setup. * Replaced Nzbget with SABnzbd. Nzbget development stopped. * Archived handbrake, mkvtoolnix, makemkv - rarely used them. * Temporarily removed glances, qdirstat, AdGuard-Home Sync * Add IT-Tools, Sitespeed.io (to monitor my site performance) * Added Lidarr, Radarr, Prowlarr, SABnzbd, and Sonarr exporters to send metrics to Prometheus - I may remove some of this information is also available via Home Assistant InfluxDB. * Added Node-Exporter to scrape Docker host metrics into Prometheus for Grafana dashboarding. * Updated milddlewares.yml removed old settings and cleaned things up a bit. * Update media-services.txt - This might go away in future after I implement docker profiles. * Updated README. * Whats coming: Move traefik CLI commands to traefik.yml to clean up the compose. Add Traefik plugins.
1 parent 9c126fc commit 4a2bf6c

File tree

120 files changed

+3466
-2923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3466
-2923
lines changed

.gitignore

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
!docker-compose-t2-obsolete.yml
1313
!docker-compose-t2-synology.yml
1414
!docker-compose-t2-web.yml
15-
!docker-compose.yml
15+
!docker-compose-npm.yml
16+
!docker-compose-t2-media-db.yml
1617

1718
!.github
1819
.github/*
@@ -53,18 +54,7 @@ scripts/web/*
5354

5455
!archives
5556
archives/*
56-
!archives/docker-compose-t1.yml
57-
!archives/docker-compose-t1-vpn.yml
58-
!archives/docker-compose-t1-obsolete.yml
59-
!archives/docker-compose-t1-swarm.yml
60-
!archives/traefik1
61-
archives/traefik1/*
62-
!archives/traefik1/*.example
63-
!archives/traefik1/rules
64-
archives/traefik1/rules/*
65-
!archives/traefik1/rules/*.example
66-
!archives/traefik1-swarm
67-
archives/traefik1-swarm/*
57+
!archives/**
6858

6959
!appdata
7060
appdata/*

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Only showing high-level changes. Smaller changes are too many to list. See commits.
66

77
## Planned (notes for future):
8-
8+
- apprise, Apprise api, remmina, Webtop, openvscode-server,
99
- Add projectsend, embystat, nextcloud, nut-upsd, HealthChecks, FileRun, fail2ban, ofelia, scrutiny to NUC, Wireguard, traktarr, listrr, Subliminal, netdata, Exportarr, Unpackarr
1010
- Check Cloudbox/cloudbox - plex autoscan, cloudplow, plexdupefinder, plextraktsync
1111
- implement secrets and remove variables from .env

README.md

Lines changed: 50 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,55 @@ This is the updated docker-compose repo of all the media, home, and web server a
77
- [WordPress on Docker with Nginx, Traefik, LE SSL, Security, and Speed](https://www.smarthomebeginner.com/wordpress-on-docker-traefik/)
88
- [Ultimate Synology NAS Docker Compose Media Server 2022](https://www.smarthomebeginner.com/synology-nas-docker-media-server-2022/)
99

10+
# Support My Work
11+
12+
Documenting, writing guides, and keeping this repo update-to-date takes hundreds of hours of work. Please consider supporting my work to show your appreciation.
13+
14+
# Did this Repo help you?
15+
- Become a patron and show us your strongest support.
16+
17+
<div style="text-align:center;margin:20px"><a href="https://www.patreon.com/smarthomebeginner" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2022/05/become-a-patreon.jpg" alt="" width="434" height="102" /></a></div>
18+
19+
- Please consider buying us a coffee (or two) as a token of appreciation.
20+
21+
<div style="text-align:center;margin:20px"><a href="https://www.buymeacoffee.com/smarthomebeginr" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2020/04/coffee.png" alt="" width="340" height="77" /></a></div>
22+
23+
# Join our Community
24+
25+
<div style="text-align:center;margin:20px"><a href="https://www.smarthomebeginner.com/discord-github" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2022/05/join-discord-300x75.png" alt="" width="300" height="75" /></a></div>
26+
27+
- Do you need support or just want to chat with like-minded people. Join our discord.
28+
- The authors will try our best to help but support is not guaranteed. But you will find others who might have went through what you are going through and may be willing to pay it forward and help.
29+
1030
<div style="padding:20px;border: 3px solid red;">
1131
<h3>IMPORTANT</h3>
1232
If you are going to start from scratch using this repo, be prepared to be patient and start slow. There are so many details to pay attention to. First start with the basic Docker Media Server guide linked above (with Nginx Proxy Manager instead of Traefik).
1333

14-
When you are ready to upgrade to Traefik or prefer Traefik over Nginx Proxy Manager, I strongly suggest getting Traefik and Traefik dashboard up and running before adding any other app. Here is the order I would recommend:
15-
16-
<ol>
17-
<li>Traefik with HTTP Authentication. This requires:</li>
18-
<ul>
19-
<li>.env file</li>
20-
<li>secrets</li>
21-
<li>network definition</li>
22-
<li>middlewares and chains</li>
23-
</ul>
24-
<li>Socket Proxy</li>
25-
<li>Check to ensure Traefik still works</li>
26-
<li>OAuth or Authelia (optional)</li>
27-
<li>Check to ensure OAuth works</li>
28-
<li>Put Traefik dashboard behind OAuth or Authelia and disable HTTP Authentication</li>
29-
<li>Ensure Traefik dashboard works behind OAuth/Authelia</li>
30-
<li>Proceed to add portainer and other apps/services</li>
31-
</ol>
34+
When you are ready to upgrade to Traefik or prefer Traefik over Nginx Proxy Manager, I strongly suggest getting Traefik and Traefik dashboard up and running before adding any other app.
3235

3336
Go step-by-step. If you bite too big of a piece, I guarantee you will choke.
3437

3538
</div>
3639

37-
<strong>Supporting Articles:</strong>
40+
<strong>Supporting Guides:</strong>
3841

3942
- [How to Install Docker and Docker Compose on Ubuntu 22.04 LTS](https://www.smarthomebeginner.com/install-docker-on-ubuntu-22-04/) [[VIDEO](https://youtu.be/nwFh4JBGD_0)]
4043
- [How to Install Docker and Docker Compose on Ubuntu 20.04 LTS](https://www.smarthomebeginner.com/install-docker-on-ubuntu-20-04/)
4144
- [Cloudflare Settings for Traefik Docker: DDNS, CNAMEs, & Tweaks](https://www.smarthomebeginner.com/cloudflare-settings-for-traefik-docker/)
45+
- [Ultimate Docker to Podman Migration Guide: It's NOT difficult](https://www.smarthomebeginner.com/docker-to-podman-migration-guide/)
46+
- [Nextcloud Docker with Traefik Reverse Proxy for Beginners](https://www.smarthomebeginner.com/traefik-docker-nextcloud/)
47+
48+
<strong>Security Guides:</strong>
49+
4250
- [Google OAuth 2 MFA Protection for Docker](https://www.smarthomebeginner.com/traefik-forward-auth-google-oauth-2022/)
4351
- [Authelia MFA Protection for Docker](https://www.smarthomebeginner.com/docker-authelia-tutorial/)
4452
- [Traefik Docker Security Best Practices](https://www.smarthomebeginner.com/traefik-docker-security-best-practices/)
4553
- [Crowdsec Docker Compose Guide Part 1: Powerful IPS with Firewall Bouncer](https://www.smarthomebeginner.com/crowdsec-docker-compose-1-fw-bouncer/)
4654
- [CrowdSec Docker Part 2: Improved IPS with Cloudflare Bouncer](https://www.smarthomebeginner.com/crowdsec-cloudflare-bouncer/)
4755
- [CrowdSec Docker Part 3: Traefik Bouncer for Additional Security](https://www.smarthomebeginner.com/crowdsec-traefik-bouncer/)
4856
- [CrowdSec Multiserver Docker (Part 4): For Ultimate Protection](https://www.smarthomebeginner.com/crowdsec-multiserver-docker/)
49-
- [Ultimate Docker to Podman Migration Guide: It's NOT difficult](https://www.smarthomebeginner.com/docker-to-podman-migration-guide/)
50-
- [Nextcloud Docker with Traefik Reverse Proxy for Beginners](https://www.smarthomebeginner.com/traefik-docker-nextcloud/)
57+
58+
For security, I implemented CrowdSec multi-server setup in 2022. From the stats, it is blocking/mitigating well over 600 intrusion attempts per day on my servers. I will cover this in a separate guide later but you will find the docker-compose CrowdSec, Traefik Bouncer, and Cloudflare Bouncer Bouncers in my repo already.
5159

5260
### Obsolete Posts (for educational purposes):
5361

@@ -58,45 +66,33 @@ The following posts have been updated/replaced by the posts linked above:
5866
- [Docker Media Server with Traefik 1 Reverse Proxy](https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker/)
5967
- [Synology Docker Media Server with Traefik, Docker Compose, and Cloudflare](https://www.smarthomebeginner.com/synology-docker-media-server/)
6068

61-
## Docker, Docker Compose, and Traefik Versions (updated September, 2022)
62-
63-
- Docker: 20.10.18
64-
- Docker Compose: v2.10.2
65-
- Traefik: 2.8
66-
67-
<strong>Update (September 13, 2021):</strong> I moved from TOML to YAML for Traefik 2 dynamic configurations. I have included example configuration files for both. However, since I do not use TOML anymore, there may be minor syntax errors or typos.
68-
6969
### Description of Compose Files in this Repo
7070

71-
- docker-compose.yml - this is the basic media server stack with Nginx Proxy Manager instead of Traefik
72-
- docker-compose-t2.yml - this is my main stack with most apps/services, including Traefik
71+
- docker-compose-t2.yml - this is my main stack with most apps/services (home aserver), including Traefik
72+
- docker-compose-npm.yml - this is the basic media server stack with Nginx Proxy Manager instead of Traefik
7373
- docker-compose-t2-web.yml - web server specific stack for WordPress and non-WordPress sites with Nginx and Traefik
7474
- docker-compose-t2-synology.yml - apps/services that I run on Synology NAS using Docker Compose for Homelab use
75-
- docker-compose-t2-obsolete.yml - apps/services that I once tried/used but don't use anymore (future compatibility not guaranteed)
76-
77-
Almost any app/service from the docker-compose files listed above can be copy-pasted to any other compose file in this repo.
7875

79-
### Compose Files Archive (NOT ACTIVELY MAINTAINED)
76+
<div style="padding:20px;border: 3px solid red;">
77+
Please note that docker-compose files in the <strong>archives</strong> folder is not actively maintained. They may need updates/rework.
78+
</div>
8079

81-
- archives/docker-compose-t1.yml
82-
- archives/docker-compose-t1-vpn.yml
83-
- archives/docker-compose-t1-obsolete.yml
84-
- archives/docker-compose-t1-swarm.yml
80+
Almost any app/service from the docker-compose files listed above can be copy-pasted to any other compose file in this repo.
8581

8682
## MY SETUP
8783

88-
- MAIN - Ubuntu 22.04 Proxmox LXC Container on Intel Xeon E3-1240 V2.
89-
- WEB - Ubuntu 22.04 Proxmox VM on Intel Xeon E3-1240 V2.
90-
- SYNOLOGY - Synology DS918+ NAS.
84+
- Home Server (docker-compose-t2.yml) - Ubuntu 22.04 Proxmox LXC Container on AMD Ryzen 7 4800u ASROCK 4x4 Box
85+
- Media Server (docker-compose-t2-media-db.yml) - Ubuntu 22.04 Proxmox LXC Container on AMD Ryzen 7 4800u ASROCK 4x4 Box
86+
- Web Server (docker-compose-t2-web.yml) - Digital Ocean VPS (2 cores and 2 GB RAM)
87+
- Synology (docker-compose-t2-synology.yml) - Synology DS918+ NAS.
9188

9289
I use Syncthing to keep certain key files synched between various systems.
9390

94-
### Security
95-
For security, I implemented CrowdSec multi-server setup recently. From the stats, it is blocking/mitigating well over 600 intrusion attempts per day on my servers. I will cover this in a separate guide later but you will find the docker-compose CrowdSec, Traefik Bouncer, and Cloudflare Bouncer Bouncers in my repo already.
96-
9791
## What apps are included in this stack?
9892

99-
The apps I use are scattered around in several different docker-compose files. Some apps are used in more than one host and some on only one.
93+
The apps I use are scattered around in several different docker-compose files. Click the links below for specific installation guides.
94+
95+
Some apps are used in more than one host and some on only one.
10096

10197
### FRONTENDS
10298

@@ -106,7 +102,7 @@ The apps I use are scattered around in several different docker-compose files. S
106102
- Traefik Custom Error Pages
107103
- OAuth - Google OAuth 2 Forward Authentication
108104
- Authelia - Private Forward Authentication
109-
- Portainer - Container Management
105+
- [Portainer](https://www.smarthomebeginner.com/portainer-docker-compose-guide/) - Container Management
110106
- Organizr - Dashboard for Apps
111107
- Heimdall - Dashboard for Apps
112108
- Homepage - Dashboard for Apps
@@ -126,9 +122,9 @@ The apps I use are scattered around in several different docker-compose files. S
126122

127123
- MariaDB - MySQL Database
128124
- phpMyAdmin - Database management
129-
- InfluxDB - Database for sensor data
125+
- [InfluxDB](https://www.smarthomebeginner.com/influxdb-docker-compose-guide/) - Database for sensor data
130126
- Postgres - Database
131-
- Grafana - Graphical data visualization for InfluxDB data
127+
- [Grafana](https://www.smarthomebeginner.com/grafana-docker-compose-guide/) - Graphical data visualization for InfluxDB data
132128
- Varken - Monitor Plex, Sonarr, Radarr, and Other Data
133129
- Redis - Key value store
134130
- Redis Commander - Redis management
@@ -162,9 +158,9 @@ The apps I use are scattered around in several different docker-compose files. S
162158
- FunkWhale - Music Server
163159
- Calibre - Ebook/Audiobook Server
164160
- Calibre-Web - Ebook/Audiobook Reader
165-
- Plex - Media Server
161+
- [Plex](https://www.smarthomebeginner.com/plex-docker-compose/) - Media Server
166162
- Emby - Media Server
167-
- Jellyfin - Media Server
163+
- [Jellyfin](https://www.smarthomebeginner.com/jellyfin-docker-compose/) - Media Server
168164
- Ombi - Media Requests
169165
- Tautulli - Previously PlexPy. Plex statistics and monitoring
170166
- Plex-Sync - For Syncing watched status between plex servers
@@ -189,7 +185,7 @@ The apps I use are scattered around in several different docker-compose files. S
189185
- APCUPSD - APC UPS Management
190186
- Guacamole - Remote desktop, SSH, on Telnet on any HTML5 Browser
191187
- Guacamole Daemon - Needed for Guacamole
192-
- Dozzle - Docker logs viewer
188+
- [Dozzle](https://www.smarthomebeginner.com/dozzle-docker-compose-guide/) - Docker logs viewer
193189
- qDirStat - Directory Statistics
194190
- StatPing - Status Page & Monitoring Server
195191
- SmokePing - Network Latency Monitoring
@@ -204,6 +200,7 @@ The apps I use are scattered around in several different docker-compose files. S
204200
- MergerFS - Merge local and remote file systems
205201
- Gluetun - VPN client for docker containers and more
206202
- DeUnhealth - Auto restart containers on VPN restart
203+
- [AdGuard Home](https://www.smarthomebeginner.com/adguard-home-docker-compose-guide/) - DNS Sinkhole / Ad-blocker
207204

208205
### WEB
209206

@@ -219,12 +216,6 @@ The apps I use are scattered around in several different docker-compose files. S
219216
- Cloudflare Companion - Automatic CNAME creation for services
220217
- WhoAmI - For testing.
221218

222-
# Installation and Usage
223-
224-
Follow the guides linked at the beginning of this readme.
225-
226-
--------- ANYTHING THAT HAS "example" IN THE NAME WILL HAVE TO BE RENAMED APPROPRIATELY ---------
227-
228219
## Starting and Stopping
229220

230221
I use bash_aliases to simplify starting and stopping containers/stack. Included in the repo is an example of bash_aliases I use (replace USER with your Linux username). Here are some example alias commands:
@@ -235,19 +226,4 @@ I use bash_aliases to simplify starting and stopping containers/stack. Included
235226
- <strong>dcstop2</strong> - Stop a specific service
236227
- <strong>dcrestart2</strong> - Restart a specific service
237228
- <strong>dclogs2</strong> - See real-time logs for the corresponding stack or service
238-
- <strong>dcpull2</strong> - Pull new images for the corresponding stack or service
239-
240-
## Join our Community
241-
- Do you need support or just want to chat with like-minded people. Join our discord.
242-
- The authors will try our best to help but support is not guaranteed. But you will find others who might have went through what you are going through and may be willing to pay it forward and help.
243-
244-
<div style="text-align:center;margin:20px"><a href="https://www.smarthomebeginner.com/discord-github" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2022/05/join-discord-300x75.png" alt="" width="300" height="75" /></a></div>
245-
246-
# Did this Repo help you?
247-
- Become a patron and show us your strongest support.
248-
249-
<div style="text-align:center;margin:20px"><a href="https://www.patreon.com/smarthomebeginner" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2022/05/become-a-patreon.jpg" alt="" width="434" height="102" /></a></div>
250-
251-
- Please consider buying us a coffee (or two) as a token of appreciation.
252-
253-
<div style="text-align:center;margin:20px"><a href="https://www.buymeacoffee.com/smarthomebeginr" target="_blank" rel="nofollow noopener noreferrer"><img src="https://www.smarthomebeginner.com/images/2020/04/coffee.png" alt="" width="340" height="77" /></a></div>
229+
- <strong>dcpull2</strong> - Pull new images for the corresponding stack or service

appdata/traefik2/rules/cloudserver/middlewares.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,14 @@ http:
3030
stsIncludeSubdomains: true
3131
stsPreload: true
3232
forceSTSHeader: true
33-
customFrameOptionsValue: "allow-from https:{{env "DOMAINNAME_CLOUD_SERVER"}}" #CSP takes care of this but may be needed for organizr.
33+
customFrameOptionsValue: SAMEORIGIN # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
3434
contentTypeNosniff: true
3535
browserXssFilter: true
36-
# sslForceHost: true # add sslHost to all of the services
37-
# sslHost: "{{env "DOMAINNAME_CLOUD_SERVER"}}"
3836
referrerPolicy: "same-origin"
3937
permissionsPolicy: "camera=(), microphone=(), geolocation=(), payment=(), usb=(), vr=()"
4038
customResponseHeaders:
41-
X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex,"
42-
server: ""
43-
# https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732
44-
# X-Forwarded-Proto: "https"
39+
X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex," # disable search engines from indexing home server
40+
server: "" # hide server info from visitors
4541

4642
middlewares-oauth:
4743
forwardAuth:

archives/adguardhome-sync.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AdGuard Home Sync - Sync Settings between AdGuard Homes
2+
adguardhome-sync:
3+
<<: *common-keys-core # See EXTENSION FIELDS at the top
4+
image: lscr.io/linuxserver/adguardhome-sync:latest
5+
container_name: adguardhome-sync
6+
environment:
7+
<<: *default-tz-puid-pgid
8+
CONFIGFILE: /config/adguardhome-sync.yaml #optional
9+
volumes:
10+
- $DOCKERDIR/appdata/adguard-home/config:/config
11+

archives/ampache.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Ampache - Music Server
2+
ampache:
3+
container_name: ampache
4+
image: ampache/ampache:nosql
5+
restart: "no"
6+
# profiles:
7+
# - media
8+
networks:
9+
- t2_proxy
10+
- default
11+
security_opt:
12+
- no-new-privileges:true
13+
# ports:
14+
# - "$AMPACHE_PORT:80"
15+
volumes:
16+
- $DOCKERDIR/appdata/ampache/config:/var/www/config
17+
- $DOCKERDIR/appdata/ampache/log:/var/log/ampache
18+
- $DATADIR/media/music:/media
19+
labels:
20+
- "traefik.enable=true"
21+
## HTTP Routers
22+
- "traefik.http.routers.ampache-rtr.entrypoints=https"
23+
- "traefik.http.routers.ampache-rtr.rule=Host(`amp.$DOMAINNAME0`)"
24+
## Middlewares
25+
- "traefik.http.routers.ampache-rtr.middlewares=chain-no-auth@file"
26+
## HTTP Services
27+
- "traefik.http.routers.ampache-rtr.service=ampache-svc"
28+
- "traefik.http.services.ampache-svc.loadbalancer.server.port=80"

archives/apcupsd.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# APCUPSD - APC UPS Management
2+
# create the apcupsd.conf file
3+
apcupsd:
4+
image: gersilex/apcupsd:latest
5+
container_name: apcupsd
6+
restart: unless-stopped
7+
networks:
8+
- t2_proxy
9+
security_opt:
10+
- no-new-privileges:true
11+
ports:
12+
- "$APCUPSD_PORT:3551"
13+
privileged: true
14+
tty: true
15+
volumes:
16+
- /tmp/apcupsd-docker:/tmp/apcupsd-docker
17+
- $DOCKERDIR/apcupsd/apcupsd.conf:/etc/apcupsd/apcupsd.conf
18+
- $DOCKERDIR/apcupsd/doshutdown:/etc/apcupsd/doshutdown
19+
- $DOCKERDIR/apcupsd/apcupsd.events:/var/log/apcupsd.events

0 commit comments

Comments
 (0)