Moving data to mounted Synology share

Nextcloud version (eg, 20.0.5): 28.0.4
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): don’t know
PHP version (eg, 7.4): don’t know

First of all; I’m new to nextcloud, docker and I’m a very beginner in Linux.

I am running Nextcloud in a docker container with a basic install. I thought to give it a try to see how it looks and move everyting later on in the proces in case that I would like to continue with Nextcloud.
Took me a few hours to come to the conclusion that I like the concept of Nextcloud, but realize that moving the data is very hard and complex for an unexperienced Linux user.

I have a Synology running with an NFS4 share: ‘/volume1/nc-data’.
Created a volume in the docker container with the following inspect output:

        "CreatedAt": "2024-03-31T13:06:39+01:00",
        "Driver": "local",
        "Labels": null,
        "Mountpoint": "/var/lib/docker/volumes/nfsvolume1/_data",
        "Name": "nfsvolume1",
        "Options": {
            "device": ":/volume1/nc-data",
            "o": "addr=<IPaddr>,rw,nfsvers=4",
            "type": "nfs"
        "Scope": "local"

My compose file looks the following:

    container_name: nextcloud
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - /path/to/nextcloud/config:/config
      - /path/to/data:/nfsvolume1
      - 443:443
    restart: unless-stopped
      external: true

Hope someone can guide me in the right direction to help me fix this problem so I can move to the next step of replacing SQLlite by MySQL.

welcome to the community @tkd :handshake:

I don’t really get the problem… there must be some issue with mount points but you didn’t describe what is the exact problem.

Another “problem” is you are using linuxserverio container image which has it’s own spetialities - if you prefer this for a reason I would recommend you reach out to Support and Nextcloud docs

If you consider a “standard” Nextcloud community image look at this guide I posted shortly Nextcloud docker-compose setup with notify_push (2024)

aio is a good option to start as well.

your mount points look little weird - /nfsvolume1 likely doesn’t exist and never used in the container… I’m not sure how linuxserverio handles this - using community docker you would map not only config but apps and data as well.

In general I would not recommend to map existing NAS share as Nextcloud primary storage. Nextcloud is designed around an assumption it has exclusive access to the storage and doesn’t work good when you temper with the storage outside Nextcloud.

but you can definitely map the /nfsvolume1 into the container and mount it as “local external storage” so you can access files on the share as well…


Thank you for reaching out.
Had it up and running, with which turns out to be a very basic compose file, and was indeed trying to add the NFS share as external storage. Which did not work out, I think permissions or something.

After reading your how-to’s I realize that trying to host this is way to advanced for me. Like I said, I only have basic knowledge of Linux and none of docker.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.