Code source wiki de ServeurPrincipal
Masquer les derniers auteurs
| author | version | line-number | content |
|---|---|---|---|
![]() |
1.1 | 1 | = Serveur principal = |
| 2 | |||
| 3 | == Système == | ||
| 4 | |||
| 5 | |=Élément|=Valeur | ||
| 6 | |OS|Debian 13 | ||
| 7 | |Noyau|Mainline (dépôt Zabbly) | ||
| 8 | |Disque système|NVMe | ||
| 9 | |Exposition|Internet, via SWAG | ||
| 10 | |||
| 11 | == Services == | ||
| 12 | |||
| 13 | === Infrastructure === | ||
| 14 | |||
| 15 | |=Service|=Rôle | ||
| 16 | |SWAG|Reverse proxy, certificat wildcard Let's Encrypt | ||
| 17 | |Authelia|Authentification unique | ||
| 18 | |CrowdSec|Détection d'attaques, bouncer nginx, captcha Turnstile | ||
| 19 | |DuckDNS|Mise à jour du DNS dynamique | ||
| 20 | |Portainer CE (LTS)|Gestion des stacks | ||
| 21 | |docker-socket-proxy|Accès filtré à l'API Docker | ||
| 22 | |Watchtower|Mise à jour automatique des images | ||
| 23 | |Glances|Supervision | ||
| 24 | |||
| 25 | === Productivité === | ||
| 26 | |||
| 27 | |=Service|=Rôle | ||
| 28 | |Nextcloud|Notes, veille | ||
| 29 | |XWiki|Wiki | ||
| 30 | |Joplin Server + client web|Notes | ||
| 31 | |Passbolt|Mots de passe | ||
| 32 | |Vikunja|Tâches | ||
| 33 | |n8n|Automatisation | ||
| 34 | |code-server|Éditeur dans le navigateur | ||
| 35 | |Wallos|Suivi des abonnements | ||
| 36 | |||
| 37 | === Veille et lecture === | ||
| 38 | |||
| 39 | |=Service|=Rôle | ||
| 40 | |SearXNG|Métamoteur | ||
| 41 | |Flus|Veille RSS | ||
| 42 | |Wallabag|Lecture différée | ||
| 43 | |changedetection.io|Surveillance de pages | ||
| 44 | |||
| 45 | === Médias === | ||
| 46 | |||
| 47 | |=Service|=Rôle | ||
| 48 | |Immich|Photos et vidéos, sans machine-learning | ||
| 49 | |Jellystat|Statistiques Jellyfin | ||
| 50 | |Castopod|Podcast (test) | ||
| 51 | |aax2mp3|Conversion de livres audio | ||
| 52 | |||
| 53 | === Localisation === | ||
| 54 | |||
| 55 | |=Service|=Rôle | ||
| 56 | |Dawarich|Historique de localisation | ||
| 57 | |Photon|Géocodage inverse local pour Dawarich | ||
| 58 | |||
| 59 | === Réseau et outils === | ||
| 60 | |||
| 61 | |=Service|=Rôle | ||
| 62 | |web-check|Analyse de sites | ||
| 63 | |networking-toolbox|Outils réseau | ||
| 64 | |Sshwifty|Client SSH web | ||
| 65 | |copyparty|Partage de fichiers | ||
| 66 | |Dashy|Tableau de bord | ||
| 67 | |github-readme-stats|Statistiques GitHub pour Dashy | ||
| 68 | |||
| 69 | == Outils système == | ||
| 70 | |||
| 71 | Plakar, Lynis, tmux, htop, fzf, zoxide, yazi, ripgrep, fd-find, jq, glow, ffmpeg, 7zip, poppler-utils, ImageMagick, mkcert. | ||
| 72 | |||
| 73 | == Configuration == | ||
| 74 | |||
| 75 | === Réseau Docker partagé === | ||
| 76 | |||
| 77 | Tous les services publiés sont sur un réseau externe commun avec SWAG : | ||
| 78 | |||
| 79 | {{code language="bash"}} | ||
| 80 | docker network create proxy | ||
| 81 | {{/code}} | ||
| 82 | |||
| 83 | Dans chaque stack : | ||
| 84 | |||
| 85 | {{code language="yaml"}} | ||
| 86 | networks: | ||
| 87 | proxy: | ||
| 88 | external: true | ||
| 89 | {{/code}} | ||
| 90 | |||
| 91 | === SWAG === | ||
| 92 | |||
| 93 | * 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 ». | ||
| 94 | * Pour une API appelée par une application mobile, séparer un bloc ##location /api## sans l'include Authelia. | ||
| 95 | |||
| 96 | === CrowdSec : captcha Turnstile === | ||
| 97 | |||
| 98 | Les variables se placent sur le service **swag** (le bouncer est un mod de SWAG), pas sur le service crowdsec : | ||
| 99 | |||
| 100 | {{code language="yaml"}} | ||
| 101 | environment: | ||
| 102 | - CROWDSEC_CAPTCHA_PROVIDER=turnstile | ||
| 103 | - CROWDSEC_SITE_KEY=<SITE_KEY> | ||
| 104 | - CROWDSEC_SECRET_KEY=<SECRET_KEY> | ||
| 105 | {{/code}} | ||
| 106 | |||
| 107 | === Authelia === | ||
| 108 | |||
| 109 | Authelia ne recharge pas sa configuration à chaud : | ||
| 110 | |||
| 111 | {{code language="bash"}} | ||
| 112 | docker restart authelia | ||
| 113 | {{/code}} | ||
| 114 | |||
| 115 | === Watchtower === | ||
| 116 | |||
| 117 | Le projet d'origine ##containrrr/watchtower## est archivé depuis décembre 2025. Remplacement direct par le fork maintenu, sans changer la configuration : | ||
| 118 | |||
| 119 | {{code language="yaml"}} | ||
| 120 | image: nickfedor/watchtower:latest | ||
| 121 | {{/code}} | ||
| 122 | |||
| 123 | Exclure un conteneur de la mise à jour automatique : | ||
| 124 | |||
| 125 | {{code language="yaml"}} | ||
| 126 | labels: | ||
| 127 | - com.centurylinklabs.watchtower.enable=false | ||
| 128 | {{/code}} | ||
| 129 | |||
| 130 | À appliquer aux bases de données, à SWAG, à Authelia et à CrowdSec. | ||
| 131 | |||
| 132 | === Portainer === | ||
| 133 | |||
| 134 | * 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. | ||
| 135 | * 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##. | ||
| 136 | |||
| 137 | === Services système inutiles === | ||
| 138 | |||
| 139 | Sur un serveur sans NFS, iSCSI ni bureau : | ||
| 140 | |||
| 141 | {{code language="bash"}} | ||
| 142 | sudo systemctl disable --now rpcbind open-iscsi nvmf-autoconnect cups bluetooth ModemManager | ||
| 143 | {{/code}} | ||
| 144 | |||
| 145 | Ne garder qu'un seul gestionnaire de profils d'énergie : ##tuned## ou ##power-profiles-daemon##. |
