Initial commit - Talloires documentation

This commit is contained in:
2025-12-19 16:16:17 +01:00
commit 3cdf44528e
9 changed files with 769 additions and 0 deletions

118
docs/reference/commands.md Normal file
View File

@@ -0,0 +1,118 @@
# Commandes utiles
## Docker
```bash
# Status de tous les containers
docker ps -a
# Logs dun service
docker logs -f <container>
# Redémarrer un service
docker restart <container>
# Recréer un service (après modif compose)
cd ~/docker/talloires && docker compose up -d <service>
# Tout redémarrer
cd ~/docker/talloires && docker compose down && docker compose up -d
# Shell dans un container
docker exec -it <container> sh
```
## Caddy
```bash
# Recharger la config
docker exec caddy caddy reload --config /etc/caddy/Caddyfile
# Voir les logs
docker logs caddy -f
# Tester la config
docker exec caddy caddy validate --config /etc/caddy/Caddyfile
```
## Authelia
```bash
# Logs
docker logs authelia -f
# Générer un hash de mot de passe
docker exec authelia authelia crypto hash generate argon2 --password "motdepasse"
# Générer un hash pour OIDC secret
docker exec authelia authelia crypto hash generate pbkdf2 --password "secret"
```
## Backup
```bash
# Lancer un backup manuel
~/backup-to-annecy.sh
# Voir le log
cat ~/backup.log
# Lister les backups sur Annecy
sudo ssh -i /root/.ssh/id_ed25519 rsync-talloires@10.171.171.50 "ls -lh /volume1/Backups/talloires/"
```
## Système
```bash
# Espace disque
df -h
# Mémoire
free -h
# Température CPU
vcgencmd measure_temp
# Services systemd
sudo systemctl status docker
sudo systemctl status cockpit
# Logs système
journalctl -f
```
## Réseau
```bash
# IP des containers
docker network inspect talloires_net | grep -A2 Name
# Test DNS Docker
docker exec caddy nslookup authelia
# Connecter un container au réseau
docker network connect talloires_net <container>
```
## CrowdSec
```bash
# Status
docker exec crowdsec cscli metrics
# Décisions actives (bans)
docker exec crowdsec cscli decisions list
# Ajouter un ban manuel
docker exec crowdsec cscli decisions add --ip 1.2.3.4 --reason "test"
```
## Certificats
```bash
# Exporter le CA Caddy (pour clients)
docker exec caddy cat /data/caddy/pki/authorities/local/root.crt > caddy-ca.crt
# Installer sur Mac
security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db caddy-ca.crt
```

77
docs/reference/ports.md Normal file
View File

@@ -0,0 +1,77 @@
# Ports utilisés
## Ports exposés (accessibles via réseau)
| Port | Service | Protocol | Notes |
|------|---------|----------|-------|
| 80 | Caddy (redirect HTTPS) | TCP | Redirige vers 443 |
| 443 | Caddy (reverse proxy) | TCP | Point d'entrée principal |
| 8096 | Jellyfin | TCP | Accès direct (optionnel) |
| 3030 | Gitea HTTP | TCP | Mappé depuis 3000 interne |
| 2222 | Gitea SSH | TCP | Mappé depuis 22 interne |
| 8123 | Home Assistant | TCP | Mode host network |
| 9090 | Cockpit | TCP | Admin système |
| 1514 | Syslog-ng | TCP/UDP | Collecte syslog |
| 51413 | Transmission P2P | TCP/UDP | BitTorrent |
## Ports internes Docker (talloires_net)
| Port | Service(s) | Notes |
|------|------------|-------|
| 3000 | Gitea, Grafana, Linkwarden, Hoarder, Outline | Plusieurs services partagent ce port |
| 3001 | Uptime Kuma | |
| 3100 | Loki | Agrégation logs |
| 3456 | Vikunja | |
| 5001 | Dockge | |
| 5432 | PostgreSQL | Linkwarden-db, Outline-db |
| 6379 | Redis | Outline-redis |
| 8000 | MkDocs | |
| 8010 | LanguageTool | |
| 9000 | Portainer | |
| 9091 | Authelia, Transmission Web | |
| 19999 | Netdata | |
## URLs par domaine
### Accès local (.talloires.local) - avec Authelia
| Service | URL | Authentification |
|---------|-----|------------------|
| Homepage | https://talloires.local | Authelia |
| Auth | https://auth.talloires.local | - |
| Git | https://git.talloires.local | OIDC Authelia |
| Jellyfin | https://jellyfin.talloires.local | Authelia |
| Grafana | https://grafana.talloires.local | Header Auth |
| Portainer | https://portainer.talloires.local | Authelia |
| Dockge | https://dockge.talloires.local | Authelia |
| Docs | https://docs.talloires.local | Authelia |
| Vikunja | https://vikunja.talloires.local | Authelia |
| Outline | https://outline.talloires.local | OIDC Authelia |
| Hoarder | https://hoarder.talloires.local | Authelia |
| Linkwarden | https://linkwarden.talloires.local | Authelia |
| LanguageTool | https://languagetool.talloires.local | Authelia |
| Transmission | https://transmission.talloires.local | Authelia |
| Netdata | https://netdata.talloires.local | Authelia |
| Uptime Kuma | https://uptime.talloires.local | Authelia |
| Cockpit | https://cockpit.talloires.local | Authelia |
| Home Assistant | https://homeassistant.talloires.local | Authelia |
### Accès ZeroTier (.talloires.1871.zt) - sans Authelia
Ces URLs sont accessibles depuis l'extérieur via le réseau ZeroTier, sans passer par Authelia (authentification propre à chaque service).
| Service | URL | Auth native |
|---------|-----|-------------|
| Vikunja | https://vikunja.talloires.1871.zt | Vikunja login |
| Outline | https://outline.talloires.1871.zt | OIDC Authelia |
| Hoarder | https://hoarder.talloires.1871.zt | Hoarder login |
| Linkwarden | https://linkwarden.1871.zt | Linkwarden login |
| LanguageTool | https://languagetool.talloires.1871.zt | Aucune (API) |
## Réseau ZeroTier
| Serveur | IP ZeroTier | Rôle |
|---------|-------------|------|
| Talloires | 10.144.221.22 | Serveur principal (Pi5) |
| Annecy | 10.144.78.193 | NAS Synology (backup) |
| Olympou | 10.144.46.46 | Mac de travail |

56
docs/reference/scripts.md Normal file
View File

@@ -0,0 +1,56 @@
# Scripts de maintenance
Scripts utilitaires pour la gestion de Talloires.
## update-containers.sh
Met à jour tous les containers Docker en parcourant les répertoires avec un fichier docker-compose.
**Emplacement** :
=== Pulling latest images ===
**Usage** :
---
## transmission-toggle.sh
Active/désactive le container Transmission à la demande (économie de ressources).
**Emplacement** :
🔴 Transmission is STOPPED
**Usage** :
---
## backup-to-annecy.sh
Sauvegarde les configs Docker vers le NAS Synology (Annecy).
**Emplacement** :
**Planification** : Cron à 3h00 quotidien
**Vérifier les backups** :
---
## Watchtower (automatique)
Watchtower vérifie et met à jour automatiquement les containers à 4h00.
**Configuration** : Dans
**Logs** :