Code source wiki de Serveur principal
Masquer les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
![]() |
1.1 | 1 | = Serveur principal = |
![]() |
4.1 | 2 | |
![]() |
3.1 | 3 | {{info}} |
![]() |
16.1 | 4 | **Pages détaillées** |
| 5 | |||
![]() |
17.1 | 6 | Infrastructure : [[Reverse proxy>>Wiki Batcave John.Infrastructure.ServeurPrincipal.ReverseProxy.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]] |
![]() |
16.1 | 7 | |
![]() |
17.1 | 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]] |
![]() |
16.1 | 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 | |||
![]() |
17.1 | 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]] |
![]() |
16.1 | 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]] | ||
![]() |
3.1 | 15 | {{/info}} |
![]() |
4.1 | 16 | |
![]() |
1.1 | 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 | |||
![]() |
4.1 | 131 | === Watchtower === |
![]() |
1.1 | 132 | |
![]() |
4.1 | 133 | Fork maintenu ##nickfedor/watchtower## : le projet d'origine est archivé depuis décembre 2025. Même stack sur les deux machines : |
| 134 | |||
![]() |
1.1 | 135 | {{code language="yaml"}} |
![]() |
4.1 | 136 | services: |
| 137 | watchtower: | ||
| 138 | image: nickfedor/watchtower:latest | ||
| 139 | container_name: watchtower | ||
| 140 | restart: always | ||
| 141 | volumes: | ||
| 142 | - /var/run/docker.sock:/var/run/docker.sock | ||
| 143 | command: | ||
| 144 | - --cleanup | ||
| 145 | - --schedule=0 0 5 * * * | ||
| 146 | environment: | ||
| 147 | - TZ=Europe/Paris | ||
![]() |
1.1 | 148 | {{/code}} |
| 149 | |||
![]() |
4.1 | 150 | * Passage chaque nuit à 5 h, après la sauvegarde de 3 h 30. |
| 151 | * Pas de ##~-~-rolling-restart## : ce fork refuse de démarrer avec cette option dès qu'un conteneur a un ##depends_on##. | ||
| 152 | * 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. | ||
| 153 | |||
![]() |
1.1 | 154 | Exclure un conteneur de la mise à jour automatique : |
| 155 | |||
| 156 | {{code language="yaml"}} | ||
| 157 | labels: | ||
| 158 | - com.centurylinklabs.watchtower.enable=false | ||
| 159 | {{/code}} | ||
| 160 | |||
![]() |
4.1 | 161 | 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 ». |
![]() |
1.1 | 162 | |
![]() |
4.1 | 163 | Les bases épinglées sur une version majeure restent en mise à jour automatique : elles ne reçoivent que des correctifs mineurs. |
| 164 | |||
![]() |
1.1 | 165 | === Portainer === |
| 166 | |||
| 167 | * 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. | ||
| 168 | * 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##. | ||
![]() |
13.1 | 169 | |
![]() |
12.1 | 170 | ==== Modèles d'applications ==== |
![]() |
1.1 | 171 | |
![]() |
12.1 | 172 | Portainer utilise la liste de modèles de Lissy93, plus fournie que celle d'origine. Réglage : Settings > General > App Templates, URL : |
| 173 | |||
| 174 | {{code}} | ||
| 175 | https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json | ||
| 176 | {{/code}} | ||
| 177 | |||
| 178 | 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 : | ||
| 179 | |||
| 180 | {{code language="bash"}} | ||
| 181 | docker inspect <CONTENEUR> | ||
| 182 | {{/code}} | ||
| 183 | |||
![]() |
13.1 | 184 | Conteneurs déployés ainsi : SearXNG, Glances, DuckDNS, Wallos, aax2mp3. Leur page de documentation reprend leur configuration relevée avec ##docker inspect##. |
![]() |
12.1 | 185 | |
![]() |
1.1 | 186 | === Services système inutiles === |
| 187 | |||
| 188 | Sur un serveur sans NFS, iSCSI ni bureau : | ||
| 189 | |||
| 190 | {{code language="bash"}} | ||
| 191 | sudo systemctl disable --now rpcbind open-iscsi nvmf-autoconnect cups bluetooth ModemManager | ||
| 192 | {{/code}} | ||
| 193 | |||
| 194 | Ne garder qu'un seul gestionnaire de profils d'énergie : ##tuned## ou ##power-profiles-daemon##. |
