Compare commits

...

9 Commits

Author SHA1 Message Date
1cb9b55d2c Add more additional stacks 2025-03-20 22:37:36 +01:00
37d1b55a5d Update crontab 2025-03-04 20:30:23 +01:00
627b23466f Update README 2025-03-04 20:28:34 +01:00
7f249f593b Add calibre and calibre-downloader 2025-03-04 17:57:49 +01:00
e1c25b02d3 Add beszel and dozzle 2025-02-21 23:02:57 +01:00
ae6e105534 Replace duplicati with backrest 2025-02-21 23:02:23 +01:00
14dc5d79ac Add beszel and dozzle 2025-02-17 23:32:52 +01:00
d7c059145e Change stacks dir permissions 2025-02-15 17:26:23 +01:00
b6d21c2c22 Update docker compose syntax, move slskd to media stack 2025-02-10 22:32:46 +01:00
34 changed files with 378 additions and 59 deletions

View File

@ -1,39 +1,43 @@
# mr-vercetti/homeserver
![Dashboard](.misc/dashboard.jpg)
This is my home server project that I started because I value the privacy of my data, I don't like paying subscriptions and because self-hosting is really fucking cool.
This is my home server project that I started because I value the privacy of my data, I don't like paying subscriptions and because self-hosting is really cool.
## Core services
All services are deployed using Docker compose and are run as a non-root user.
## Services
All services are deployed using Docker Compose stacks.
### Maintenance
* [ddclient](https://github.com/linuxserver/docker-ddclient) - DDNS
* [SWAG](https://github.com/linuxserver/docker-swag) - reverse proxy with SSL certbot and fail2ban
* [watchtower](https://github.com/containrrr/watchtower) - notifications about docker image updates
* [Duplicati](https://github.com/linuxserver/docker-duplicati) - cool backup
software
* [Backrest](https://github.com/garethgeorge/backrest) - backup solution, restic frontend
* [Uptime Kuma](https://github.com/louislam/uptime-kuma) - fancy uptime monitoring tool
* [Scrutiny](https://github.com/AnalogJ/scrutiny) - S.M.A.R.T monitoring
* [Beszel](https://github.com/henrygd/beszel) - monitoring dashboard
* [Dozzle](https://github.com/amir20/dozzle) - Docker logs viewer
* [gluetun](https://github.com/qdm12/gluetun) - VPN client
### Media
* [Jellyfin](https://github.com/linuxserver/docker-jellyfin) - media server
* [Jellyseer](https://github.com/fallenbagel/jellyseerr) - media request manager
* [Radarr](https://github.com/linuxserver/docker-radarr) - movie collection manager
* [Sonarr](https://github.com/linuxserver/docker-sonarr) - TV show collection manager
* [Bazarr](https://github.com/linuxserver/docker-bazarr) - subtitle manager
* [qbittorrentvpn](https://github.com/binhex/arch-qbittorrentvpn) - qbittorrent with VPN and
Privoxy + [VueTorrent](https://github.com/VueTorrent/VueTorrent) - cute WebUI
* [qBittorrent](https://github.com/linuxserver/docker-qbittorrent) - qBittorrent + [VueTorrent](https://github.com/VueTorrent/VueTorrent) - cute WebUI
for qBittorrent
* [YoutubeDL](https://github.com/Tzahi12345/YoutubeDL-Material) - Youtube media downloader
* [YoutubeDL](https://github.com/Tzahi12345/YoutubeDL-Material) - YouTube media downloader
* [Prowlarr](https://github.com/Prowlarr/Prowlarr) - indexer
* [Lidarr](https://github.com/Lidarr/Lidarr) - music library manager
* [miniDLNA](https://github.com/vladgh/docker_base_images/tree/main/minidlna) - DLNA server
* [slskd](https://github.com/slskd/slskd) - soulseek client
* [Calibre](https://github.com/crocodilestick/Calibre-Web-Automated) - ebook
manager
* [Calibre-downloader](https://github.com/calibrain/calibre-web-automated-book-downloader) - ebook downloader
### Personal cloud
* [Nextcloud](https://github.com/linuxserver/docker-nextcloud) - filesync/cloud solution
* [Redis](https://github.com/docker-library/redis) - cache service
* [MariaDB](https://github.com/linuxserver/docker-mariadb) - database
* [Collabora](https://github.com/CollaboraOnline/online) - office suite
* [Ghostfolio](https://github.com/ghostfolio/ghostfolio) - wealth mgmt app
### Software development
* [Gitea](https://github.com/go-gitea/gitea) - git web service
@ -44,10 +48,9 @@ for qBittorrent
* [Wireguard](https://github.com/linuxserver/docker-wireguard) - VPN server
* [Homer](https://github.com/bastienwirtz/homer) - simple dashboard to keep services on hand
* [mr.vercetti.cc](https://git.vercetti.cc/mr-vercetti/mr.vercetti.cc) - my personal blog
* [widmo.cc](https://git.vercetti.cc/mr-vercetti/widmo.cc) - my film photo
project
* [listmonk](https://github.com/knadh/listmonk) - mail sending/newsletter service
## Storage solution
I went with [MergerFS](https://github.com/trapexit/mergerfs) and [SnapRAID](https://github.com/amadvance/snapraid), which allows me a great deal of flexibility and still keeps my data safe. Array is synchronized and scrubbed automatically via [snapraid-runner](https://github.com/Chronial/snapraid-runner) running from crontab.
## Setup
To be completed.
I went with [MergerFS](https://github.com/trapexit/mergerfs) and [SnapRAID](https://github.com/amadvance/snapraid), which allows me a great deal of flexibility and still keeps my data safe. Array is synchronized and scrubbed automatically using [snapraid-runner](https://github.com/Chronial/snapraid-runner) running from crontab.

View File

@ -1,6 +1,6 @@
# SnapRAID
30 4 * * 0 python3 /opt/snapraid-runner/snapraid-runner.py --conf /etc/snapraid-runner.conf --ignore-deletethreshold
30 4 * * * python3 /opt/snapraid-runner/snapraid-runner.py --conf /etc/snapraid-runner.conf --ignore-deletethreshold
# LG TV renew dev mode (https://github.com/webosbrew/dev-manager-desktop)
0 * * * * /etc/tv-renew-devmode.sh >> /var/log/tv-renew-devmode.log 2>&1
# DNS issues fix with Torguard
0 5 * * * /apps/homeserver/docker/torguard-fix.sh
0 1 * * * /apps/homeserver/docker/torguard-fix.sh

View File

@ -0,0 +1,18 @@
services:
blackmesa:
image: mrvercetti/blackmesa-coop-server
container_name: blackmesa
environment:
- GAME_PARAMS=-port 27015 +maxplayers 2 +map bm_c1a1d -debug
- GAME_NAME=${BLACKMESA_SERVER_NAME}
- GAME_PASSWORD=${BLACKMESA_SERVER_PASSWORD}
networks:
- blackmesa
ports:
- ${BLACKMESA_SERVER_PORT}:27015
- ${BLACKMESA_SERVER_PORT}:27015/udp
restart: unless-stopped
networks:
blackmesa:
name: blackmesa

0
docker/additional-stacks/ghostfolio/ghostfolio.yml Normal file → Executable file
View File

0
docker/additional-stacks/homarr/homarr.yml Normal file → Executable file
View File

0
docker/additional-stacks/joplin/joplin.yml Normal file → Executable file
View File

View File

@ -0,0 +1,28 @@
services:
api:
image: localai/localai:v2.10.1-ffmpeg-core
container_name: localai-api
ports:
- 8877:8080
networks:
- localai
volumes:
- ${APPS_DIR}/localai/models:/models:cached
command: ["tinyllama-chat"]
chatgpt:
depends_on:
api:
condition: service_healthy
image: ghcr.io/mckaywrigley/chatbot-ui:main
ports:
- 3003:3000
networks:
- localai
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_API_HOST=http://api:8080
networks:
localai:
name: localai

View File

@ -0,0 +1,28 @@
services:
minecraft:
image: itzg/minecraft-server
container_name: minecraft
networks:
- minecraft
ports:
- ${MINECRAFT_SERVER_PORT}:25565
environment:
- VERSION=1.20.4
- OVERRIDE_SERVER_PROPERTIES=true
- EULA=TRUE
- MAX_PLAYERS=4
- MOTD=${MINECRAFT_SERVER_MOTD}
- DIFFICULTY=easy
- ALLOW_NETHER=true
- ONLINE_MODE=FALSE
- ENABLE_RCON=true
- SERVER_NAME=${MINECRAFT_SERVER_NAME}
volumes:
- ${DATA_DIR}/minecraft-data:/data
tty: true
stdin_open: true
restart: unless-stopped
networks:
minecraft:
name: minecraft

View File

@ -0,0 +1,66 @@
services:
grafana:
image: grafana/grafana
container_name: grafana
user: "0"
volumes:
- ${APPS_DIR}/monitoring/grafana:/var/lib/grafana
ports:
- "3005:3000"
networks:
- monitoring
restart: unless-stopped
loki:
image: grafana/loki
container_name: loki
volumes:
- ${APPS_DIR}/monitoring/loki:/etc/loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/loki-config.yml -config.expand-env=true
networks:
- monitoring
restart: unless-stopped
promtail:
image: grafana/promtail
container_name: promtail
volumes:
- /var/log:/var/log #map the log folder.
- ${APPS_DIR}/monitoring/promtail:/etc/promtail
command: -config.file=/etc/promtail/promtail-config.yml
networks:
- monitoring
restart: unless-stopped
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ${APPS_DIR}/monitoring/prometheus:/etc/prometheus
ports:
- "9090:9090"
networks:
- monitoring
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped
node-exporter:
image: prom/node-exporter
container_name: node-exporter
network_mode: host # Not compatible with ports declaration. This service will expose port 9100.
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
networks:
monitoring:

0
docker/additional-stacks/ogt-fs/ogt-fs.yml Normal file → Executable file
View File

0
docker/additional-stacks/qbittorrent/qbittorrent.yml Normal file → Executable file
View File

View File

View File

@ -0,0 +1,16 @@
services:
quakejs:
image: treyyoder/quakejs
container_name: quakejs
networks:
- quakejs
environment:
- HTTP_PORT=9011
- SERVER=192.168.0.100
ports:
- "9011:80"
- "27960:27960"
networks:
quakejs:
name: quakejs

View File

@ -0,0 +1,25 @@
services:
stable-diffusion:
image: ghcr.io/ai-dock/stable-diffusion-webui:latest-cpu
container_name: stable-diffusion-webui
devices:
- "/dev/dri:/dev/dri"
volumes:
- ${APPS_DIR}/stable-diffusion/workspace:${WORKSPACE:-/workspace/}:rshared
- ${APPS_DIR}/stable-diffusion/config/provisioning/default.sh:/opt/ai-dock/bin/provisioning.sh
ports:
- ${WEBUI_PORT_HOST:-7860}:${WEBUI_PORT_HOST:-7860}
networks:
- stable-diffusion
environment:
- DIRECT_ADDRESS=${DIRECT_ADDRESS:-127.0.0.1}
- WORKSPACE=/workspace
- WORKSPACE_SYNC=false
- WEB_ENABLE_AUTH=false
- WEBUI_PORT_HOST=${WEBUI_PORT_HOST:-7860}
- WEBUI_PORT_LOCAL=${WEBUI_PORT_LOCAL:-17860}
- WEBUI_METRICS_PORT=${WEBUI_METRICS_PORT:-27860}
networks:
stable-diffusion:
name: stable-diffusion

View File

@ -0,0 +1,18 @@
services:
svencoop:
image: mrvercetti/svencoop-server
container_name: svencoop
environment:
- GAME_NAME=${SVENCOOP_SERVER_NAME}
- GAME_PASSWORD=${SVENCOOP_SERVER_PASSWORD}
- GAME_PARAMS="-num_edicts 3072 +sv_lan 0 +map hl_c16_a1 -port 27015 -console -debug;"
networks:
- svencoop
ports:
- ${SVENCOOP_SERVER_PORT}:27015
- ${SVENCOOP_SERVER_PORT}:27015/udp
restart: unless-stopped
networks:
svencoop:
name: svencoop

View File

@ -13,24 +13,27 @@ case "$command" in
"up")
for stack in "$BASE_DIR"/stacks/*/*
do
docker-compose -f "${stack}" --env-file "$BASE_DIR/.env" up -d
docker compose -f "${stack}" --env-file "$BASE_DIR/.env" up -d
done
;;
"stop" | "restart")
for stack in "$BASE_DIR"/stacks/*/*
do
docker-compose -f "${stack}" --env-file "$BASE_DIR/.env" $command
docker compose -f "${stack}" --env-file "$BASE_DIR/.env" $command
done
;;
"recreate")
if [ $# -lt 3 ]; then
echo "Please provide both the stack name and the service to recreate"
"recreate")
if [ $# -eq 2 ]; then
stack_name="$2"
service_name="$2"
elif [ $# -eq 3 ]; then
stack_name="$2"
service_name="$3"
else
echo "Usage: $0 recreate <stack_name> <service_name>"
exit 1
fi
stack_name="$2"
service="$3"
stack_file="$BASE_DIR/stacks/${stack_name}/${stack_name}.yml"
if [ ! -f "$stack_file" ]; then
@ -38,9 +41,9 @@ case "$command" in
exit 1
fi
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" stop "$service"
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" rm -f "$service"
docker-compose -f "${stack_file}" --env-file "$BASE_DIR/.env" up -d "$service"
docker compose -f ${stack_file} --env-file "$BASE_DIR/.env" stop ${service_name}
docker compose -f ${stack_file} --env-file "$BASE_DIR/.env" rm -f ${service_name}
docker compose -f ${stack_file} --env-file "$BASE_DIR/.env" up -d ${service_name}
;;
*)
echo "Wrong command. Please use 'up', 'stop', 'restart', or 'recreate'"

View File

@ -0,0 +1,26 @@
services:
backrest:
image: garethgeorge/backrest
container_name: backrest
networks:
- backrest
ports:
- 9898:9898
volumes:
- ${APPS_DIR}/backrest/data:/data
- ${APPS_DIR}/backrest/config:/config
- ${APPS_DIR}/backrest/cache:/cache
- /apps:/userdata/docker # [optional] mount local paths to backup here.
- ${DATA_DIR}/nextcloud-data:/userdata/nextcloud
- ${DATA_DIR}/backup/hustler:/repos/hustler # [optional] mount repos if using local storage, not necessary for remotes e.g. B2, S3, etc.
- /var/run/docker.sock:/var/run/docker.sock:ro # [optional] if you want to manage containers before/after backup
environment:
- BACKREST_DATA=/data # path for backrest data. restic binary and the database are placed here.
- BACKREST_CONFIG=/config/config.json # path for the backrest config file.
- XDG_CACHE_HOME=/cache # path for the restic cache which greatly improves performance.
- TZ=${TIMEZONE} # set the timezone for the container, used as the timezone for cron jobs.
restart: unless-stopped
networks:
backrest:
name: backrest

4
docker/stacks/bitwarden/bitwarden.yml Normal file → Executable file
View File

@ -22,7 +22,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
bitwarden:
name: bitwarden

4
docker/stacks/collabora/collabora.yml Normal file → Executable file
View File

@ -16,7 +16,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
collabora:
name: collabora

0
docker/stacks/ddclient/ddclient.yml Normal file → Executable file
View File

0
docker/stacks/gluetun/gluetun.yml Normal file → Executable file
View File

0
docker/stacks/homer/homer.yml Normal file → Executable file
View File

0
docker/stacks/listmonk/listmonk.yml Normal file → Executable file
View File

71
docker/stacks/media/media.yml Normal file → Executable file
View File

@ -24,6 +24,22 @@ services:
- /dev/dri/card0:/dev/dri/card0
restart: unless-stopped
jellyseerr:
image: fallenbagel/jellyseerr
container_name: jellyseerr
networks:
- proxy
- media
environment:
- LOG_LEVEL=debug
- TZ=${TIMEZONE}
- PORT=5055
ports:
- 5055:5055
volumes:
- ${APPS_DIR}/jellyserr:/app/config
restart: unless-stopped
minidlna:
image: vladgh/minidlna
container_name: minidlna
@ -165,9 +181,60 @@ services:
- "8998:17442"
restart: unless-stopped
slskd:
image: slskd/slskd
container_name: slskd
user: ${PUID}:${PGID}
environment:
- TZ=${TIMEZONE}
- SLSKD_REMOTE_FILE_MANAGEMENT=true
- SLSKD_SLSK_USERNAME=${SLSKD_SLSK_USERNAME}
- SLSKD_SLSK_PASSWORD=${SLSKD_SLSK_PASSWORD}
- SLSKD_SHARED_DIR=/app/downloads
network_mode: "container:gluetun"
volumes:
- ${APPS_DIR}/slskd:/app/data
- ${DATA_DIR}/downloads/slskd/incomplete:/app/incomplete
- ${DATA_DIR}/media/music:/app/downloads
restart: unless-stopped
calibre:
image: crocodilestick/calibre-web-automated
container_name: calibre
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIMEZONE}
volumes:
- ${APPS_DIR}/calibre:/config
- ${DATA_DIR}/calibre/ingest:/cwa-book-ingest
- ${DATA_DIR}/calibre/library:/calibre-library
networks:
- media
ports:
- 8083:8083
restart: unless-stopped
calibre-downloader:
image: ghcr.io/calibrain/calibre-web-automated-book-downloader
container_name: calibre-downloader
environment:
- FLASK_PORT=8084
- FLASK_DEBUG=false
- CLOUDFLARE_PROXY_URL=http://flaresolverr:8191
- INGEST_DIR=/cwa-book-ingest
- BOOK_LANGUAGE=pl
volumes:
- ${DATA_DIR}/calibre/ingest:/cwa-book-ingest
networks:
- media
ports:
- 8084:8084
restart: unless-stopped
networks:
proxy:
external:
name: proxy
name: proxy
external: true
media:
name: media

View File

@ -34,9 +34,47 @@ services:
- "/dev/nvme0"
restart: unless-stopped
beszel:
image: henrygd/beszel
container_name: beszel
networks:
- monitoring
ports:
- 8091:8090
volumes:
- ${APPS_DIR}/beszel:/beszel_data
restart: unless-stopped
beszel-agent:
image: henrygd/beszel-agent
container_name: beszel-agent
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /mnt/parity1/.beszel:/extra-filesystems/sdd1:ro
- /mnt/disk1/.beszel:/extra-filesystems/sdb1:ro
- /mnt/disk2/.beszel:/extra-filesystems/sda1:ro
- /mnt/disk3/.beszel:/extra-filesystems/sdc1:ro
environment:
- PORT=45876
# Do not remove quotes around the key
- KEY=${BESZEL_SSH_KEY}
restart: unless-stopped
dozzle:
image: amir20/dozzle
container_name: dozzle
networks:
- monitoring
ports:
- 8081:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
networks:
proxy:
external:
name: proxy
name: proxy
external: true
monitoring:
name: monitoring

4
docker/stacks/mrvercetticc/mrvercetticc.yml Normal file → Executable file
View File

@ -9,7 +9,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
mrvercetticc:
name: mrvercetticc

4
docker/stacks/nextcloud/nextcloud.yml Normal file → Executable file
View File

@ -52,7 +52,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
nextcloud:
name: nextcloud

View File

@ -1,17 +0,0 @@
services:
slskd:
image: slskd/slskd
container_name: slskd
user: ${PUID}:${PGID}
environment:
- TZ=${TIMEZONE}
- SLSKD_REMOTE_FILE_MANAGEMENT=true
- SLSKD_SLSK_USERNAME=${SLSKD_SLSK_USERNAME}
- SLSKD_SLSK_PASSWORD=${SLSKD_SLSK_PASSWORD}
- SLSKD_SHARED_DIR=/app/downloads
network_mode: "container:gluetun"
volumes:
- ${APPS_DIR}/slskd:/app/data
- ${DATA_DIR}/downloads/slskd/incomplete:/app/incomplete
- ${DATA_DIR}/media/music:/app/downloads
restart: unless-stopped

4
docker/stacks/softdev/softdev.yml Normal file → Executable file
View File

@ -87,7 +87,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
softdev:
name: softdev

0
docker/stacks/swag/swag.yml Normal file → Executable file
View File

0
docker/stacks/watchtower/watchtower.yml Normal file → Executable file
View File

4
docker/stacks/widmocc/widmocc.yml Normal file → Executable file
View File

@ -11,7 +11,7 @@ services:
networks:
proxy:
external:
name: proxy
name: proxy
external: true
widmocc:
name: widmocc

0
docker/stacks/wireguard/wireguard.yml Normal file → Executable file
View File