0 Votes

Code source wiki de Serveur principal

Modifié par john le 2026/09/20 19:04

Afficher les derniers auteurs
1 {{info}}
2 **Pages détaillées**
3
4 Infrastructure : [[Reverse proxy>>Wiki Batcave John.Infrastructure.ServeurPrincipal.ReverseProxy.WebHome]] · [[SWAG>>Wiki Batcave John.Infrastructure.ServeurPrincipal.SWAG.WebHome]] · [[Authelia>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Authelia.WebHome]] · [[CrowdSec>>Wiki Batcave John.Infrastructure.ServeurPrincipal.CrowdSec.WebHome]] · [[docker-socket-proxy>>Wiki Batcave John.Infrastructure.ServeurPrincipal.DockerSocketProxy.WebHome]] · [[DuckDNS>>Wiki Batcave John.Infrastructure.ServeurPrincipal.DuckDNS.WebHome]] · [[Glances>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Glances.WebHome]] · [[Dépannage>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Depannage.WebHome]]
5
6 Système : [[Noyau Zabbly>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Noyau Zabbly.WebHome]] · [[Reconstruction>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Reconstruction.WebHome]]
7
8 Productivité : [[Nextcloud>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Nextcloud.WebHome]] · [[XWiki>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Xwiki.WebHome]] · [[Passbolt>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Passbolt.WebHome]] · [[Joplin>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Joplin.WebHome]] · [[Vikunja>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Vikunja.WebHome]] · [[n8n>>Wiki Batcave John.Infrastructure.ServeurPrincipal.n8n.WebHome]] · [[code-server>>Wiki Batcave John.Infrastructure.ServeurPrincipal.code-server.WebHome]] · [[Wallos>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Wallos.WebHome]]
9
10 Veille et lecture : [[SearXNG>>Wiki Batcave John.Infrastructure.ServeurPrincipal.SearXNG.WebHome]] · [[Flus>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Flus.WebHome]] · [[Wallabag>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Wallabag.WebHome]]
11
12 Médias et localisation : [[Immich>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Immich.WebHome]] · [[Jellystat>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Jellystat.WebHome]] · [[Castopod>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Castopod.WebHome]] · [[aax2mp3>>Wiki Batcave John.Infrastructure.ServeurPrincipal.aax2mp3.WebHome]] · [[Dawarich>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Dawarich.WebHome]]
13
14 Réseau et outils : [[Dashy>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Dashy.WebHome]] · [[web-check>>Wiki Batcave John.Infrastructure.ServeurPrincipal.web-check.WebHome]] · [[networking-toolbox>>Wiki Batcave John.Infrastructure.ServeurPrincipal.networking-toolbox.WebHome]] · [[Sshwifty>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Sshwifty.WebHome]] · [[copyparty>>Wiki Batcave John.Infrastructure.ServeurPrincipal.copyparty.WebHome]]
15 {{/info}}
16
17 == Système ==
18
19 |=Élément|=Valeur
20 |OS|Debian 13
21 |Noyau|Mainline (dépôt Zabbly)
22 |Disque système|NVMe
23 |Exposition|Internet, via SWAG
24
25 == Services ==
26
27 === Infrastructure ===
28
29 |=Service|=Rôle
30 |SWAG|Reverse proxy, certificat wildcard Let's Encrypt
31 |Authelia|Authentification unique
32 |CrowdSec|Détection d'attaques, bouncer nginx, captcha Turnstile
33 |DuckDNS|Mise à jour du DNS dynamique
34 |Portainer CE (LTS)|Gestion des stacks
35 |docker-socket-proxy|Accès filtré à l'API Docker
36 |Watchtower|Mise à jour automatique des images
37 |Glances|Supervision
38
39 === Productivité ===
40
41 |=Service|=Rôle
42 |Nextcloud|Notes, veille
43 |XWiki|Wiki
44 |Joplin Server + client web|Notes
45 |Passbolt|Mots de passe
46 |Vikunja|Tâches
47 |n8n|Automatisation
48 |code-server|Éditeur dans le navigateur
49 |Wallos|Suivi des abonnements
50
51 === Veille et lecture ===
52
53 |=Service|=Rôle
54 |SearXNG|Métamoteur
55 |Flus|Veille RSS
56 |Wallabag|Lecture différée
57 |changedetection.io|Surveillance de pages
58
59 === Médias ===
60
61 |=Service|=Rôle
62 |Immich|Photos et vidéos, sans machine-learning
63 |Jellystat|Statistiques Jellyfin
64 |Castopod|Podcast (test)
65 |aax2mp3|Conversion de livres audio
66
67 === Localisation ===
68
69 |=Service|=Rôle
70 |Dawarich|Historique de localisation
71 |Photon|Géocodage inverse local pour Dawarich
72
73 === Réseau et outils ===
74
75 |=Service|=Rôle
76 |web-check|Analyse de sites
77 |networking-toolbox|Outils réseau
78 |Sshwifty|Client SSH web
79 |copyparty|Partage de fichiers
80 |Dashy|Tableau de bord
81 |github-readme-stats|Statistiques GitHub pour Dashy
82
83 == Outils système ==
84
85 Plakar, Lynis, tmux, htop, fzf, zoxide, yazi, ripgrep, fd-find, jq, glow, ffmpeg, 7zip, poppler-utils, ImageMagick, mkcert.
86
87 == Configuration ==
88
89 === Réseau Docker partagé ===
90
91 Tous les services publiés sont sur un réseau externe commun avec SWAG :
92
93 {{code language="bash"}}
94 docker network create proxy
95 {{/code}}
96
97 Dans chaque stack :
98
99 {{code language="yaml"}}
100 networks:
101 proxy:
102 external: true
103 {{/code}}
104
105 === SWAG ===
106
107 * Le ##proxy.conf## inclus déclare déjà ##proxy_http_version##, ##Upgrade##, ##Connection## et ##proxy_read_timeout##. Les redéclarer dans un proxy-conf provoque l'erreur nginx « directive is duplicate ».
108 * Pour une API appelée par une application mobile, séparer un bloc ##location /api## sans l'include Authelia.
109
110 === CrowdSec : captcha Turnstile ===
111
112 Les variables se placent sur le service **swag** (le bouncer est un mod de SWAG), pas sur le service crowdsec :
113
114 {{code language="yaml"}}
115 environment:
116 - CROWDSEC_CAPTCHA_PROVIDER=turnstile
117 - CROWDSEC_SITE_KEY=<SITE_KEY>
118 - CROWDSEC_SECRET_KEY=<SECRET_KEY>
119 {{/code}}
120
121 === Authelia ===
122
123 Authelia ne recharge pas sa configuration à chaud :
124
125 {{code language="bash"}}
126 docker restart authelia
127 {{/code}}
128
129 === Watchtower ===
130
131 Fork maintenu ##nickfedor/watchtower## : le projet d'origine est archivé depuis décembre 2025. Même stack sur les deux machines :
132
133 {{code language="yaml"}}
134 services:
135 watchtower:
136 image: nickfedor/watchtower:latest
137 container_name: watchtower
138 restart: always
139 volumes:
140 - /var/run/docker.sock:/var/run/docker.sock
141 command:
142 - --cleanup
143 - --schedule=0 0 5 * * *
144 environment:
145 - TZ=Europe/Paris
146 {{/code}}
147
148 * Passage chaque nuit à 5 h, après la sauvegarde de 3 h 30.
149 * Pas de ##~-~-rolling-restart## : ce fork refuse de démarrer avec cette option dès qu'un conteneur a un ##depends_on##.
150 * Pas d'API HTTP : les notifications de mise à jour viennent d'un workflow n8n qui interroge docker-socket-proxy toutes les 10 minutes et envoie un message Telegram.
151
152 Exclure un conteneur de la mise à jour automatique :
153
154 {{code language="yaml"}}
155 labels:
156 - com.centurylinklabs.watchtower.enable=false
157 {{/code}}
158
159 Conteneurs exclus : SWAG, Authelia, CrowdSec et la base de Nextcloud (image en ##latest##). Ils se mettent à jour à la main, après lecture des notes de version : Portainer > Update the stack, avec « Re-pull image ».
160
161 Les bases épinglées sur une version majeure restent en mise à jour automatique : elles ne reçoivent que des correctifs mineurs.
162
163 === Portainer ===
164
165 * Portainer ne gère pas ##build: .## dans une stack (le contexte pointe vers un dossier temporaire). Construire l'image sur l'hôte, puis la référencer par son nom.
166 * Derrière le reverse proxy, un redéploiement long renvoie un 504 alors qu'il aboutit. Utiliser l'accès direct en local : ##https:~/~/<IP_SERVEUR>:9443##.
167
168 ==== Modèles d'applications ====
169
170 Portainer utilise la liste de modèles de Lissy93, plus fournie que celle d'origine. Réglage : Settings > General > App Templates, URL :
171
172 {{code}}
173 https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
174 {{/code}}
175
176 Un conteneur déployé depuis un modèle n'est pas une stack : Portainer ne conserve pas de fichier compose. Sa configuration se relit avec :
177
178 {{code language="bash"}}
179 docker inspect <CONTENEUR>
180 {{/code}}
181
182 Conteneurs déployés ainsi : SearXNG, Glances, DuckDNS, Wallos, aax2mp3. Leur page de documentation reprend leur configuration relevée avec ##docker inspect##.
183
184 === Services système inutiles ===
185
186 Sur un serveur sans NFS, iSCSI ni bureau :
187
188 {{code language="bash"}}
189 sudo systemctl disable --now rpcbind open-iscsi nvmf-autoconnect cups bluetooth ModemManager
190 {{/code}}
191
192 Ne garder qu'un seul gestionnaire de profils d'énergie : ##tuned## ou ##power-profiles-daemon##.
193 À l'inverse, ##rsyslog## est nécessaire : sans lui, Debian 13 n'écrit pas ##/var/log/auth.log## et CrowdSec ne surveille pas les connexions SSH.
194
195 == Toutes les pages ==
196
197 {{children/}}
198
199