Initial commit

This commit is contained in:
Pierre Martin
2026-02-19 12:30:26 +01:00
commit 3b7d24a438
10 changed files with 239 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
CAPROVER_PASSWORD=
+1
View File
@@ -0,0 +1 @@
.env
+105
View File
@@ -0,0 +1,105 @@
# Serveur sans.pub
Lorsque tu interroges le serveur, ne lances que des commandes en LECTURE SEULE (non destructrices). Sauf à la demande explicite de l'utilisateur.
## Accès
- **SSH**: `ssh cloud@sans.pub`
- **CapRover**: https://captain.cloud.sans.pub
- **Utilisateur**: cloud (gestion Docker/Caprover)
## Infrastructure
- **OS**: Debian 9 (kernel 4.9.0-12-amd64)
- **Docker**: 19.03.12 (mode Swarm)
- **Disque**: 914 Go total, ~193 Go utilisés (23%)
- **RAM**: 23 Go (attention: 20 Go utilisés, swap actif 7.4 Go)
## Structure Caprover
- `/captain/data/` - données persistantes
- `/captain/generated/` - configs générées
- `/captain/temp/` - fichiers temporaires
## Services actifs (~40 services)
### Outils collaboratifs
- **etherpad** - éditeur collaboratif
- **ethercalc** - tableur collaboratif
- **cryptpad** - suite bureautique chiffrée
- **nextcloud** - cloud personnel
### Développement
- **gitea** - forge Git
- **adminer** - gestion BDD
### Communication
- **writefreely** - blog
- **peertube** - vidéos
- **rss** + **rss-bridge** - flux RSS
### Sécurité/Outils
- **bitwarden** - gestionnaire mots de passe
- **privatebin** - partage de texte chiffré
- **ots** - secrets temporaires
- **it-tools** - boîte à outils
- **cyberchef** - manipulation de données
### Sites perso
- **pierre-martin** - site perso
- **sans-pub-site** - site principal
- **une-espace** - autre projet
### Enquêtes
- **limesurvey** - sondages
## Services en erreur
- `srv-captain--mail` (0/1) - port 4190 bloqué, nécessite redémarrage Docker
## Commandes et skills Claude
### Commande
- `/supervision` - analyse complète de la santé du serveur (invocation manuelle)
### Skill (auto-activé)
- `caprover` - gestion des apps via API CapRover
- `list` : lister les apps
- `info NOM` : détails d'une app
- `env NOM` : variables d'environnement
- `scale NOM N` : changer le nombre d'instances
- `restart NOM` : redémarrer une app
**Prérequis** : définir `CAPROVER_PASSWORD` dans `.env` (voir `.envrc`)
## Suivi des tâches
Voir `todo.txt` (format todo.txt standard)
## Commandes utiles
```bash
# Voir les logs d'un service
ssh cloud@sans.pub "docker service logs srv-captain--NOM --tail 100"
# Redémarrer un service
ssh cloud@sans.pub "docker service update --force srv-captain--NOM"
# Espace disque des volumes
ssh cloud@sans.pub "docker system df -v"
# Nettoyer les images inutilisées
ssh cloud@sans.pub "docker image prune -a"
```
## Attention
- RAM quasi saturée - surveiller avant d'ajouter des services
- Swap utilisé = performances dégradées possibles
- Debian 9 est obsolète (fin de support LTS)
+101
View File
@@ -0,0 +1,101 @@
# Étapes de configuration du serveur
## Création compte
Cf https://fr-wiki.ikoula.com/fr/S%C3%A9curiser_sa_machine_Debian#Interdire_le_login_root
```
ssh root@xxx.xx.xx.xx
adduser zuckadduser zuck
usermod -a -G sudo zuck
```
Au cas où vous n'auriez pas la référence :
> Mark Zuckerberg est le cofondateur de Facebook.com !
> Il est né le 14 mai 1984 à White Plains
```
ssh-copy-id -i ~/.ssh/xxxxx.pub zuck@xx.xx.xx.xx
ssh zuck@xx.xx.xx.xx
sudo vim /etc/ssh/sshd_config
# -> modifier "PermitRootLogin no"
# -> modifier "Port 22"
sudo /etc/init.d/ssh restart
```
## TODO
### Utilisé
Toujours rien …
### En test (par moi)
## Configuration en cours
- Rainloop
- Writefreely
- Dokuwiki
### Installé
- Bitwarden
### Must have
- Etherpad
- OpenSondage
- NextCloud
- Baikal ?
- Matrix / Riot
- Tiny tiny RSS
BACKUPS !!!
### Nice to have
- Mastodon
- Gitea
- OnlyOffice ?
- Facebook -> Diaspora, Hubzilla ?
- PixelFed
- Mailman
- Peertube
- Pi-Hole
- searx
- Wallabag ?
- Discourse ?
## DNS
```
#
# Basic ipv4/ipv6 records
#
@ 3600 IN A 109.238.11.111
* 3600 IN A 109.238.11.111
# (If your server is IPv6 capable, there are some AAAA records)
@ 3600 IN AAAA 2a00:c70:1:109:238:11:111:0000
* 3600 IN AAAA 2a00:c70:1:109:238:11:111:0000
#
# XMPP
#
_xmpp-client._tcp 3600 IN SRV 0 5 5222 sans.pub.
_xmpp-server._tcp 3600 IN SRV 0 5 5269 sans.pub.
muc 3600 IN CNAME @
pubsub 3600 IN CNAME @
vjud 3600 IN CNAME @
#
# Mail (MX, SPF, DKIM and DMARC)
#
@ 3600 IN MX 10 sans.pub.
@ 3600 IN TXT "v=spf1 a mx ip4:109.238.11.111 -all"
mail._domainkey 3600 IN TXT "v=DKIM1; k=rsa; p=auinetapodtépledtaiunsetauieauiet787s"
_dmarc 3600 IN TXT "v=DMARC1; p=none"
```
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Submodule
+1
Submodule site added at 9b2ca8f601
+30
View File
@@ -0,0 +1,30 @@
x 2026-02-05 Créer CLAUDE.md pour faciliter la gestion du serveur +sans-pub
x 2026-02-05 Dump base de données une-espace (MySQL) +sans-pub
x 2026-02-05 Créer commande /supervision +sans-pub
x 2026-02-05 Créer skill caprover pour API +sans-pub
x 2026-02-05 Configurer direnv (.envrc + .env) pour CAPROVER_PASSWORD +sans-pub
x 2026-02-05 Corriger srv-captain--pierre-martin (2/1 -> 1/1) +sans-pub
x 2026-02-05 Corriger srv-captain--monica (permissions storage + env vars perdues) +sans-pub @caprover
x 2026-02-16 Redémarrer Docker pour débloquer port 4190 +sans-pub @maintenance
x 2026-02-16 Relancer srv-captain--mail après redémarrage Docker +sans-pub @maintenance
(A) Planifier migration Debian 9 -> Debian 12 [étape 1/3 chaîne infra] +sans-pub @maintenance
(A) Mettre à jour Docker 19.03 -> 27+ (API 1.40->1.43+) [après Debian, étape 2/3] +sans-pub @maintenance
(C) Surveiller RAM (20/23 Go utilisés + swap actif) +sans-pub @monitoring
(A) Mettre à jour CapRover 1.11.1 -> 1.14.1 [après Docker v27+, étape 3/3 — bloqué par API Docker 1.40 < 1.43 requis] +sans-pub @maj
(A) Migrer bases EOL : postgres:10 (peertube-db), mysql:5.7 (gitea-db), mariadb:10.5 (nextcloud-db, une-espace-db), mariadb:10.7 (writefreely-db), redis:6 (peertube-redis) +sans-pub @maj
(A) Mettre à jour mysql:8.0.33 -> 8.0.45 (etherpad-db) et postgres:15.2 -> 15.16 (rss-db) +sans-pub @maj
(B) Migrer CryptPad : promasu/cryptpad:v5.2.1 -> cryptpad/cryptpad:version-2026.2.0 (image officielle) +sans-pub @maj
(B) Mettre à jour PeerTube v3.4.1 -> v8.0.2 (migrations majeures) +sans-pub @maj
(B) Mettre à jour PhotoPrism 20211203 -> 251130 +sans-pub @maj
(B) Mettre à jour OTS v1.0.0 -> v1.21.1 +sans-pub @maj
(B) Mettre à jour Scenari 5.0.1.01 -> 6.4.5 +sans-pub @maj
(B) Mettre à jour LimeSurvey 5.2.4 -> 6.16.9 +sans-pub @maj
(B) Mettre à jour PrivateBin 1.5.1 -> 2.0.3 +sans-pub @maj
(B) Mettre à jour Adminer 4.8.1 -> 5.4.2 +sans-pub @maj
(C) Mettre à jour nginx proxy 1.24 -> 1.28.2 +sans-pub @maj
(C) Mettre à jour Vaultwarden 1.32.0 -> 1.35.3 +sans-pub @maj
(C) Mettre à jour Gitea 1.22.1 -> 1.25.4 +sans-pub @maj
(C) Mettre à jour Miniflux 2.0.44 -> 2.2.17 +sans-pub @maj
(C) Mettre à jour Nextcloud 32.0.5 -> 32.0.6 +sans-pub @maj
(C) Mettre à jour poste.io 2.4.7 -> 2.5.9 +sans-pub @maj
(C) Mettre à jour CyberChef v10.19.2 -> v10.22.1, IT Tools 2024.5.13 -> 2024.10.22, RSS-Bridge +sans-pub @maj