Hello! Sorry for the delay, I had no time before. I managed to have everything working with NextcloudAIO, but the procedure should be almost the same for you. Here are the steps I used:
First install Docker and docker-compose
Then:
Create a Nextcloud shared folder in your Synology NAS, and give the access to your Nextcloud machine using the following parameters (sorry in French):
Go back on the Nextcloud machine and install the required packages for nfs
$ apt install nfs-common -y
Create a mount point
$ mkdir -p /mnt/nextcloud
Mount the remote NFS drive to the mount point
$ mount X.X.X.X:/NASVolumeNumber/Nextcloud /mnt/nextcloud #X.X.X.X is the IP of your NAS
Check the NFS version that is used for mounting the drive
$ mount -v | grep /mnt/nextcloud
Check that everything is correctly mounted
$ df -h
Make the mounting process activated at boot
$ nano /etc/fstab
Add:
X.X.X.X:/NASVolumeNumber/Nextcloud /mnt/nextcloud nfs x-systemd.automount 0 0 #x-systemd.automount is used to automount via systemd
Save the file
Mount all
$ mount -a
Create nextcloud data and backup directories
$ mkdir /mnt/nextcloud/ncdata
$ mkdir /mnt/nextcloud/ncbackup
Change owner for mount point in client
$ chown -R www-data:www-data /mnt/nextcloud
Change permission rules on the mount point in the client
$ chmod 755 -R /mnt/nextcloud
Optional if the permissions on the Synology where not changed with the previous commands
Connect to the Synology Server and change user and group to the mounted folder according to client’s user ID
$ sudo chgrp -R +33 /NASVolumeNumber/Nextcloud
$ sudo chown -R +33 /NASVolumeNumber/Nextcloud
Install Nextcloud AIO using docker-compose
As Root!
$ mkdir -p /home/user/Nextcloud
$ cd /home/user/Nextcloud/
$ nano docker-compose.yml
Paste
###################################################
version: "3.8"
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
services:
nextcloud:
image: nextcloud/all-in-one:latest
restart: unless-stopped
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 8080:8080
environment:
- APACHE_PORT=11000
- APACHE_DISABLE_REWRITE_IP=1
- NEXTCLOUD_TRUSTED_DOMAINS=xxx.xxx.com X.X.X.X # Your domain name + proxy host IP if using a reverse proxy
- TRUSTED_PROXIES=X.X.X.X # proxy host IP if using a reverse proxy
- NEXTCLOUD_DATADIR=/mnt/nextcloud/ncdata
- NEXTCLOUD_MOUNT=/mnt/
###################################################
Save
Then run the docker-compose command
$ docker compose up -d
You should be good to go