Cet aide-mémoire présente la procédure de déploiement de Nextcloud All-in-One via Docker Compose sur un NAS Synology en utilisant le reverse proxy intégré de DSM, avec une résolution de domaine personnalisée (subdomain.domain.tld).
Il regroupe également diverses solutions aux problèmes que j’ai rencontrés lors de l’installation ou de l’utilisation du service 😦.
subdomain.domain.tldVu la « complexité » pour déployer Nextcloud All-In-One up-to-date sur un Synology qui se trouve derrière un proxy, j’ai dû regrouper différentes sources pour y arriver.
Le docker-compose ci-dessous est un résultat fonctionnel.
version: "3.8"
services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
- /volumeX/path/to/nextcloud/data:/mnt/ncdata
network_mode: bridge # add to the same network as docker run would do
ports:
- 8080:8080
environment:
- APACHE_PORT=11000
- APACHE_IP_BINDING=0.0.0.0
# - SKIP_DOMAIN_VALIDATION=true
volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work
/volumeX/path/to/nextcloud/data:/mnt/ncdata → Stockage des données NCnextcloud_aio_mastercontainer → Volume Docker pour la conf AIOsubdomain.domain.tldlocalhost:11000
| Nom | Valeur |
|---|---|
| Upgrade | $http_upgrade |
| Connection | $connection_upgrade |
| X-Forwarded-Host | $host |
| X-Real-IP | $remote_addr |
| X-Forwarded-For | $proxy_add_x_forwarded_for |
Après l’installation de Nextcloud AIO et sa configuration initiale, j’ai constaté des avertissements dans le menu panneau d’administration « Avertissements de sécurité & configuration ».
Votre installation n’a pas de préfixe de région par défaut. C’est nécessaire pour valider les numéros de téléphone dans les paramètres du profil sans code pays. Pour autoriser les numéros sans code pays, veuillez ajouter « default_phone_region » avec le code ISO 3166-1 respectif de la région dans votre fichier de configuration
Cette commande via SSH devrait aider :
docker exec -u www-data -it nextcloud-aio-nextcloud bash -lc 'cd /var/www/html && php occ config:system:set default_phone_region --value="FR"'
One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes takes a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair --include-expensive to perform the migrations
Cette commande via SSH devrait aider :
docker exec -u www-data -it nextcloud-aio-nextcloud bash -lc 'cd /var/www/html && php occ maintenance:repair --include-expensive'
Failed to connect to the remote server: cURL error 28: Connection timed out after 5002 milliseconds (see libcurl - Error Codes) for https://subdomain.domain.tld/richdocumentscode/proxy.php?req=/hosting/discovery.
Lorsque le profil Seccomp est activé, il peut empêcher Collabora de fonctionner correctement dans Nextcloud AIO, entraînant des erreurs d’affichage ou d’édition de documents.
La cause est liée à l’option –o:security.seccomp définie sur « true » dans la variable extra_params du container nextcloud-aio-collabora
✅ Solution temporaire (à refaire à chaque redémarrage)
----o:security.seccomp=false
🛠️ Solution permanente (vu dans l’aide officielle,):
Recréer le conteneur maître avec la variable suivante pour désactiver Seccomp de manière définitive :
--env COLLABORA_SECCOMP_DISABLED=true
🚀 Prêt à profiter d’une instance Nextcloud AIO solide, certifiée, et auto-hébergée sur mon Synology !