114 lines
1.8 KiB
Markdown
114 lines
1.8 KiB
Markdown
# Nextcloud Self-Hosted
|
|
|
|
Configuration Nextcloud en production pour agence66.fr
|
|
|
|
## 🚀 Déploiement initial
|
|
|
|
### 1. Cloner le repo
|
|
|
|
\`\`\`bash
|
|
git clone https://gitea.agence66.fr/vous/nextcloud.git
|
|
cd nextcloud
|
|
\`\`\`
|
|
|
|
### 2. Configuration
|
|
|
|
\`\`\`bash
|
|
cp .env.example .env
|
|
nano .env # Éditer avec vos valeurs
|
|
\`\`\`
|
|
|
|
Générer des mots de passe sécurisés:
|
|
\`\`\`bash
|
|
openssl rand -base64 32 # Pour chaque secret
|
|
\`\`\`
|
|
|
|
### 3. Démarrage
|
|
|
|
\`\`\`bash
|
|
make up
|
|
\`\`\`
|
|
|
|
### 4. Configuration initiale
|
|
|
|
Accéder à https://cloud.agence66.fr et créer le compte admin.
|
|
|
|
Ensuite, optimiser:
|
|
\`\`\`bash
|
|
make occ config:system:set memcache.local --value='\\OC\\Memcache\\APCu'
|
|
make occ config:system:set memcache.locking --value='\\OC\\Memcache\\Redis'
|
|
make occ config:system:set default_phone_region --value='FR'
|
|
\`\`\`
|
|
|
|
## 🛠️ Maintenance
|
|
|
|
### Backup quotidien
|
|
|
|
\`\`\`bash
|
|
make backup
|
|
\`\`\`
|
|
|
|
Configurer un cron sur le serveur:
|
|
\`\`\`bash
|
|
0 3 \* \* \* cd /path/to/nextcloud && make backup
|
|
\`\`\`
|
|
|
|
### Mise à jour
|
|
|
|
\`\`\`bash
|
|
make update
|
|
\`\`\`
|
|
|
|
### Commandes OCC
|
|
|
|
\`\`\`bash
|
|
make occ status
|
|
make occ user:list
|
|
make occ files:scan --all
|
|
make occ app:list
|
|
\`\`\`
|
|
|
|
## 🔧 Résolution de problèmes
|
|
|
|
### Erreur 423 WebDAV Locked
|
|
|
|
\`\`\`bash
|
|
make occ files:cleanup
|
|
\`\`\`
|
|
|
|
### Performance lente
|
|
|
|
\`\`\`bash
|
|
|
|
# Vérifier les indices
|
|
|
|
make occ db:add-missing-indices
|
|
|
|
# Nettoyer les fichiers supprimés
|
|
|
|
make occ files:cleanup
|
|
|
|
# Optimiser les previews
|
|
|
|
make occ config:app:set previewgenerator squareSizes --value="256 512"
|
|
make occ config:app:set previewgenerator widthSizes --value="256 512 1024"
|
|
make occ config:app:set previewgenerator heightSizes --value="256 512 1024"
|
|
\`\`\`
|
|
|
|
## 📊 Monitoring
|
|
|
|
\`\`\`bash
|
|
|
|
# Status
|
|
|
|
make health
|
|
|
|
# Logs en temps réel
|
|
|
|
make logs
|
|
|
|
# Containers actifs
|
|
|
|
make ps
|
|
\`\`\`
|