Skip to content

Commit cdcd646

Browse files
committed
webserver configuration files
1 parent 10431a8 commit cdcd646

File tree

140 files changed

+4298
-192
lines changed

Some content is hidden

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

140 files changed

+4298
-192
lines changed

.env.example

Lines changed: 22 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,22 @@
1-
#### Comment out or delete any unused entries
2-
3-
#### EXAMPLE
4-
# DO NOT USE QUOTES TO ENCLOSE THE VALUES
5-
EXAMPLE_VARIABLE=true
6-
EXAMPLE_PORT=1234
7-
EXAMPLE_PASSWORD=kdos9lsk@1l1!
8-
EXAMPLE_EMAIL=[email protected]
9-
EXAMPLE_IP=123.123.123.123
10-
11-
#### BELOW ARE SOME OF THE VARIABLES USED IN docker-compose.yml
12-
13-
##### PORTS
14-
15-
APCUPSD_PORT=
16-
BAZARR_PORT=
17-
EMBY_PORT=
18-
GUACAMOLE_PORT=
19-
HA_DOCKERMON_PORT=
20-
HEIMDALL_PORT=
21-
INFLUXDB_PORT=
22-
IPVANISH_PROXY_PORT=
23-
IPVANISH_REMOTE_SERVER=
24-
JACKETT_PORT=
25-
JDOWNLOADER_PORT=
26-
LIDARR_PORT=
27-
MOSQUITTO_HTTP_PORT=
28-
MOSQUITTO_HTTPS_PORT=
29-
NZBHYDRA_PORT=
30-
ORGANIZER_PORT=
31-
PHPMYADMIN_PORT=
32-
PLEX_PORT=
33-
PLEX_WEB_TOOLS_PORT=
34-
QBITTORRENT_PORT=
35-
RADARR_PORT= #If you change radarr port then update plex meta agent
36-
SABNZBD_PORT=
37-
SONARR_PORT= #If you change sonarr port then update plex meta agent
38-
TAUTULLI_PORT=
39-
TRANSMISSION_PORT=
40-
ZONEMINDER_HTTP_PORT=
41-
ZONEMINDER_HTTPS_PORT=
42-
43-
##### SYSTEM
44-
45-
PUID=
46-
PGID=
47-
TZ=America/New_York
48-
USERDIR=/home/username
49-
DOCKERDIR=/home/username/docker
50-
SECRETSDIR=/home/username/docker/secrets
51-
SERVER_IP=
52-
PIHOLE_IP=
53-
LOCAL_NETWORK=
54-
LOCAL_IPS=127.0.0.1/32,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
55-
56-
##### DOMAIN
57-
58-
DOMAINNAME=
59-
CLOUDFLARE_EMAIL=
60-
CLOUDFLARE_API_KEY=
61-
CLOUDFLARE_API_TOKEN=
62-
CLOUDFLARE_ZONEID=
63-
DUCKDNS_TOKEN=
64-
CLOUDFLARE_IPS=173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/13,104.24.0.0/14,172.64.0.0/13,131.0.72.0/22
65-
66-
##### DATABASE
67-
68-
DB_HOST=
69-
DB_PORT=
70-
MYSQL_ROOT_PASSWORD=
71-
72-
##### SECURITY AND PRIVACY
73-
74-
IPVANISH_USERNAME=
75-
IPVANISH_PASSWORD=
76-
HTTP_USERNAME=
77-
HTTP_PASSWORD=
78-
GOOGLE_CLIENT_ID=
79-
GOOGLE_CLIENT_SECRET=
80-
OAUTH_SECRET=
81-
LIDARR_API_KEY=
82-
RADARR_API_KEY=
83-
SONARR_API_KEY=
84-
SABNZBD_API_KEY=
85-
86-
##### NOTIFICATIONS
87-
88-
TGRAM_BOT_TOKEN=
89-
TGRAM_CHAT_ID=
90-
MY_EMAIL=
91-
92-
##### APPS
93-
94-
JDOWN_VNC_PASSWD=
95-
HANDBRAKE_VNC_PASSWD=
96-
FIREFOX_VNC_PASSWD=
97-
FILEBOT_VNC_PASSWD=
98-
QDIRSTAT_VNC_PASSWD=
99-
MKVTOOLNIX_VNC_PASSWD=
100-
MAKEMKV_VNC_PASSWD=
101-
GUAC_MYSQL_USER=
102-
GUAC_MYSQL_PASSWORD=
103-
TRANSMISSION_RPC_PASSWORD=
104-
TRANSMISSION_RPC_USERNAME=
105-
PIHOLE_WEBPASSWORD=
106-
107-
##### PLEX
108-
109-
PLEX_CLAIM=
110-
SYN_PLEX=ACCESS-TOKEN@PLEX_SERVER_IP
111-
NUC_PLEX=ACCESS-TOKEN@PLEX_SERVER_IP
112-
# Plex libraries section id. Remember to change the numbers below to reflect your library. Add more as needed.
113-
# ALWAYS DO A DRY RUN TO VERIFY BEFORE SYNCING
114-
SYN_PLEX_HOLLYWOOD=1
115-
NUC_PLEX_HOLLYWOOD=2
116-
SYN_PLEX_TVSHOWS=2
117-
NUC_PLEX_TVSHOWS=16
1+
PUID='1000'
2+
PGID='1000'
3+
PRIMARY_USERNAME='anand'
4+
TZ='Europe/Zurich'
5+
USERDIR='/home/anand'
6+
DOCKERDIR='/home/anand/docker'
7+
LOCAL_IPS='127.0.0.1/32,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12'
8+
CLOUDFLARE_IPS='173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/13,104.24.0.0/14,172.64.0.0/13,131.0.72.0/22'
9+
HOSTNAME='hs'
10+
SERVER_LAN_IP='192.168.5.112'
11+
DOCKER0_IP='172.17.0.1'
12+
DOMAINNAME_1='example.com'
13+
DOWNLOADSDIR='/media/ssd/downloads'
14+
DATADIR1='/media/nas/data'
15+
DATADIR2='/media/nas/data2'
16+
MEDIADIR1='/media/nas/data/media'
17+
MEDIADIR2='/media/nas/data2/media'
18+
DOCKER_HOST='tcp://socket-proxy:2375'
19+
DEPLOYRRDASHBOARD_PORT='3050'
20+
TRAEFIK_PORT='8080'
21+
ADMINER_PORT='8081'
22+
...

.gitignore

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,31 @@ scripts/ws-arm/*
5353
compose/*
5454
!compose/**
5555

56+
!appdata
57+
appdata/*
58+
59+
!appdata/authelia
60+
appdata/authelia/*
61+
!appdata/authelia/*.example
62+
63+
!appdata/nginx/**
64+
appdata/nginx/**/*
65+
!appdata/nginx/**/*.example
66+
67+
!appdata/picard
68+
appdata/picard/*
69+
!appdata/picard/*.example
70+
71+
!appdata/rclone
72+
appdata/rclone/*
73+
!appdata/rclone/*.example
74+
75+
!appdata/php
76+
!appdata/php/**
77+
78+
!appdata/nginx
79+
!appdata/nginx/**
80+
5681
!appdata/traefik3
5782
appdata/traefik3/*
5883
!appdata/traefik3/*.example
@@ -115,25 +140,3 @@ appdata/traefik2/rules/ws/*
115140
!appdata/traefik2/rules/ws/middlewares-*.yml
116141
!appdata/traefik2/rules/ws/chain-*.yml
117142

118-
!appdata
119-
appdata/*
120-
121-
!appdata/picard
122-
appdata/picard/*
123-
!appdata/picard/*.example
124-
125-
!appdata/authelia
126-
appdata/authelia/*
127-
!appdata/authelia/*.example
128-
129-
!appdata/rclone
130-
appdata/rclone/*
131-
!appdata/rclone/*.example
132-
133-
!appdata/php
134-
appdata/php/*
135-
!appdata/php/*.example
136-
137-
!appdata/nginx
138-
appdata/nginx/*
139-
!appdata/nginx/**/*.example

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ My setup is based on [Deployrr](https://www.simplehomelab.com/deployrr/) and [Ul
2525
I believe in **simple, energy-efficient homelab** design that maximizes performance while minimizing complexity.
2626

2727
### 🏠 Networking Architecture
28-
- **OPNsense** firewall running on Proxmox VM
28+
- **OPNsense** home firewall running on Proxmox VM (DMZed on ISP router)
2929
- **Tailscale** mesh networking connecting all hosts
3030

3131
### 📊 Hardware Specifications
3232

3333
| Component | Specifications | Purpose |
3434
|-----------|---------------|---------|
35-
| **TopTon V700 Mini PC** | Intel i7-13800H, 64GB RAM, 2×2TB NVMe ZFS RAID1, 4TB SATA SSD | Primary Proxmox host |
36-
| **Synology DS918+** | DX517 Expansion, 8GB RAM, 4×18TB SHR2 (×2 volumes) | Storage & legacy apps |
37-
| **Oracle Ampere A1** | 4 vCPU ARM64, 24GB RAM, 200GB storage | Web server & ARM workloads |
35+
| **TopTon V700 Mini PC** | Intel i7-13800H, 64GB RAM, 2×2TB NVMe ZFS RAID1, 4TB SATA SSD | Proxmox host that runs my Home Server, Media/Database Server, Home Assistant, Proxmox Backup Server, etc. |
36+
| **Synology DS918+** | DX517 Expansion, 8GB RAM, 4×18TB SHR2 (×2 volumes) | Primary use is storage. But I tinker with Docker on it. |
37+
| **Oracle Ampere A1** | 4 vCPU ARM64, 24GB RAM, 200GB storage | Web server and automations |
3838

3939
---
4040

@@ -90,7 +90,7 @@ Legacy configurations in `archives` folder - not actively maintained but useful
9090
#### ⚙️ Infrastructure Setup
9191
4. [Install Proxmox on Mini PC with ZFS RAID1 Mirror + 3 Tweaks](https://www.simplehomelab.com/udms-04-install-proxmox-on-mini-pc/) [📹](https://youtu.be/2nIPY7D-UA0)
9292
5. [Installing and Prepping Ubuntu/Debian](https://www.simplehomelab.com/udms-05-installing-ubuntu-on-proxmox/) [📹](https://youtu.be/-ZSQdJ62r-Q)
93-
6. [Mounting Remote Folders using Rclone](https://youtu.be/D-XS0biLP14) [📹]
93+
6. [Mounting Remote Folders using Rclone](https://youtu.be/D-XS0biLP14) [📹](https://youtu.be/D-XS0biLP14)
9494
7. Mounting Remote Folders using SMB/CIFS *(Coming Soon)*
9595
8. Mounting Remote Folders using NFS *(Coming Soon)*
9696
9. Binding Mounting on Proxmox Unprivileged LXC *(Coming Soon)*
@@ -112,8 +112,8 @@ Legacy configurations in `archives` folder - not actively maintained but useful
112112

113113
#### 🔐 Authentication & Security
114114
19. [Authentication for Docker Apps - Authelia](https://www.simplehomelab.com/udms-19-authelia-docker-compose/) [📹](https://youtu.be/UIq8PLZHBtk)
115-
20. [Authentication for Docker Apps - Google OAuth 2](https://youtu.be/SCKALXprTQE) [📹]
116-
21. [Authentication for Docker Apps - Authentik](https://youtu.be/GoUmJAe1MKc) [📹]
115+
20. [Authentication for Docker Apps - Google OAuth 2](https://youtu.be/SCKALXprTQE) [📹](https://youtu.be/SCKALXprTQE)
116+
21. [Authentication for Docker Apps - Authentik](https://youtu.be/GoUmJAe1MKc) [📹](https://youtu.be/GoUmJAe1MKc)
117117
22. [CrowdSec Docker Compose – Bulletproof IPS for Homelabs](https://www.simplehomelab.com/udms-22-crowdsec-docker-compose/)
118118
23. [Setting up Crowdsec Cloudflare Bouncer](https://www.simplehomelab.com/udms-23-crowdsec-cloudflare-bouncer/)
119119
24. [Setting up Crowdsec Traefik Bouncer](https://www.simplehomelab.com/udms-24-crowdsec-traefik-bouncer/)
Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
###############################################################
22
# Authelia configuration #
33
###############################################################
4-
4+
55
server:
66
address: tcp://0.0.0.0:9091/
77
buffers:
@@ -14,29 +14,22 @@ server:
1414
tls:
1515
key: ""
1616
certificate: ""
17-
17+
1818
# https://www.authelia.com/configuration/miscellaneous/logging/
1919
log:
2020
level: info
2121
format: text
2222
file_path: /config/authelia.log
2323
keep_stdout: true
24-
24+
2525
# https://www.authelia.com/configuration/second-factor/time-based-one-time-password/
2626
totp:
2727
issuer: example.com
2828
period: 30
2929
skew: 1
30-
30+
3131
# AUTHELIA_DUO_PLACEHOLDER
32-
# Enable the following for Duo Push Notification support
33-
# https://www.authelia.com/docs/features/2fa/push-notifications.html
34-
#duo_api:
35-
# hostname: api-123456789.example.com
36-
# integration_key: ABCDEF
37-
# # This secret can also be set using the env variables AUTHELIA_DUO_API_SECRET_KEY_FILE
38-
# secret_key: # use docker secret file instead AUTHELIA_DUO_API_SECRET_KEY_FILE
39-
32+
4033
# https://www.authelia.com/reference/guides/passwords/
4134
authentication_backend:
4235
password_reset:
@@ -50,7 +43,7 @@ authentication_backend:
5043
salt_length: 16
5144
parallelism: 8
5245
memory: 256 # blocks this much of the RAM
53-
46+
5447
# https://www.authelia.com/overview/authorization/access-control/
5548
access_control:
5649
default_policy: deny
@@ -67,7 +60,7 @@ access_control:
6760
- "*.example.com"
6861
- "example.com"
6962
policy: two_factor
70-
63+
7164
# https://www.authelia.com/configuration/session/introduction/
7265
session:
7366
name: authelia_session
@@ -80,47 +73,23 @@ session:
8073
authelia_url: 'https://authelia.example.com'
8174
default_redirection_url: 'https://example.com'
8275
# AUTHELIA_REDIS_PLACEHOLDER
83-
# Optional. Can improve performance on a busy system. If not enabled, session info is stored in memory.
84-
# redis:
85-
# host: redis
86-
# port: 6379
87-
# This secret can also be set using the env variables AUTHELIA_SESSION_REDIS_PASSWORD_FILE
88-
# password: REDIS_PASSWORD
89-
90-
76+
9177
# https://www.authelia.com/configuration/security/regulation/
9278
regulation:
9379
max_retries: 3
9480
find_time: 10m
9581
ban_time: 12h
96-
82+
9783
# https://www.authelia.com/configuration/storage/introduction/
9884
storage:
9985
# For local storage, uncomment lines below and comment out mysql. https://docs.authelia.com/configuration/storage/sqlite.html
10086
# This is good for the beginning. If you have a busy site then switch to other databases.
10187
local:
10288
path: /config/db.sqlite3
103-
# mysql:
104-
# # https://www.authelia.com/configuration/storage/mysql/
105-
# # MySQL allows running multiple authelia instances. Create database and enter details below.
106-
# address: 'tcp://127.0.0.1:3306'
107-
# port: 3306
108-
# database: authelia
109-
# username: DBUSERNAME
110-
# # Password can also be set using a secret: https://www.authelia.com/configuration/methods/secrets/#environment-variables
111-
# # password: DBPASSWORD
112-
# encryption_key: 'a_very_important_secret' # Can also be set using a secret: AUTHELIA_STORAGE_ENCRYPTION_KEY_FILE
113-
89+
11490
# https://www.authelia.com/configuration/notifications/introduction/
11591
notifier:
11692
disable_startup_check: false
11793
# For testing purposes, notifications can be sent in a file. Be sure to map the volume in docker-compose.
11894
filesystem:
119-
filename: /config/notifications.txt
120-
# smtp:
121-
# username: SMTP_USERNAME
122-
# # This secret can also be set using secret: https://www.authelia.com/configuration/methods/secrets/#environment-variables
123-
# # password: SMTP_PASSWORD
124-
# host: SMTP_HOST
125-
# port: 587 #465
126-
# sender: SENDER_EMAIL
95+
filename: /config/notifications.txt

appdata/authelia/users.yml.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# This file can be used if you do not have an LDAP set up.
66

77
# CREATE NEW HASHED PASSWORD
8-
# sudo docker run -it authelia/authelia:latest authelia crypto hash generate argon2 --password 'STRONG_PASSWORD'
8+
# sudo docker run -v /home/user/docker/appdata/authelia/configuration.yml:/configuration.yml -it authelia/authelia:4.39.4 authelia crypto hash generate --config /configuration.yml --password MYSTRONGPASSWORD
9+
910
# https://www.authelia.com/reference/guides/passwords/
1011

1112
# List of users

appdata/nginx/common/acl.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# EasyEngine (ee) protect locations using
2+
# HTTP authentication || IP address
3+
satisfy any;
4+
auth_basic "Restricted Area";
5+
auth_basic_user_file /var/run/secrets/htpasswd;
6+
# Allowed IP Address List
7+
allow 127.0.0.1;
8+
deny all;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Deny Access for comments to No Referrer Requests - spam protection
2+
location ~* (wp-comments-post)\.php$ {
3+
if ($http_cookie !~* "_gat"){
4+
return 405;
5+
}
6+
if ($http_referer !~ ^(simplehomelab.com|www.simplehomelab.com) ) {
7+
return 405;
8+
}
9+
}
10+
11+
#Return 410 for the 404s for spammy backlinks
12+
#http://webmasters.stackexchange.com/questions/84317/help-to-remove-spam-links-leading-to-404-page
13+
#http://serverfault.com/questions/646154/return-error-410-for-location-regex-in-nginx?rq=1
14+
location = / {
15+
if ($query_string ~ ^p=1459955773) {
16+
return 410;
17+
}
18+
if ($query_string ~ ^p=1461920860) {
19+
return 410;
20+
}
21+
}

0 commit comments

Comments
 (0)