Seems I have the same problem. The biggest issue is that the “/data-ro” folder is located in an overlay volume and backing up only the “/data” aka “ncdata” (host) folder will not lead to backup data of users… It seems something big changed . Only backup from ncp panel is working.
This is a big problem if the volume was created on an external drive, like with “-v /mnt/extstore/ncdata:/data” and the admin believes that user data is stored there - no way. It will be stored in the overlays in /var/lib/docker/overlay2/l and this could be a different drive as well.
I’m running nextcloudpi as docker on a x86 machine.
So I moved my complete “data-root” in daemon.json of docker to the external drive but this could only be a temporary solution. Now also all overlays are on the external drive but this is not what it is intended for…
Very strange… Thanks for checking. I will setup a new VM for mint 18 and for mint 20 and will try to install completelly new docker and nextcloudpi. And I will report here . Thanks again and have a nice Christmas - stay healthy.
Update: I installed a n VM with mint19.3 and mint20 to check if there is a dependency. In both cases the problem with “-v ncdata:/data” exists.
The user-added data are not stored in the external mounted path. So host user are not able to see the files there. He will find the added data in overlay2 folder like this:
Anyway I removed the special “data-root” change to another mounted drive, so docker installation is at default locations.
Steps where I can reproduce in mint19.3 and mint20 with latest nextcloudpi image:
#Tested on VMware® Workstation 15 Pro 15.5.6 build-16341506
#install mint 20
#wait and install updates
#install language packages
# fix to install docker for mint 20
#install docker in MINT from https://computingforgeeks.com/install-docker-and-docker-compose-on-linux-mint-19/
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-compose
sudo usermod -aG docker $USER
####### RESTART MACHINE HERE or LOGOUT/LOGIN!!!!
##### run nextcloudpi container
sudo mkdir /mnt/my-server-backups
sudo chmod o=rwx /mnt/my-server-backups
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v ncdata:/data -v /mnt/my-server-backups:/mnt/my-server-backups --name nextcloud.server ownyourbits/nextcloudpi-x86 my.domain.com
#activate with browser at
#setup with browser some useful password for ncp (ncp panel and nextcloud) at
# login with browser to nextcloud at
#add a folder e.g. "SCANS"
#enter the folder in browser and drag&drop a file into it
#open a terminal
# try to locate the "SCANS" folder you added to ncp user in nextcloud.
find -iname "SCANS"
# it is not in /var/lib/docker/volumes/ncdata or under this
# it is now located at something like this:
Docker’ed nextcloudpi now does not handle added data at data folder it is now stored in the a folder named data-ro.
Not sure if this is a problem of newest docker-ce (20.xxxxx) or nextcloud 20.0.2 or nextcloudpi image…
What I’m doing wrong?
Update: Installed another VM with Ubuntu 20.10 running and appiled same setup as described before (without docker workaround) and got the same result: user data is not in the ncdata volume, it’s in the overlays stored in /var/lib/docker/overlay2/l … pointing to /var/lib/docker/volumes/AND_SOME_HASH_FILE_NAME_HERE…
As a new user here I only can add three answers here, but I can edit my answers @cainbantam
Thanks that you post this here. So I’m not alone with it.
As I said I’m not sure if this is a problem of nextcloudpi, or nextcloud, or docker’s default overlay2 volume driver…
Same issue with last docker image for nextcloudpi-armhf. Its anoying for I mounted a btrfs luks crypted device especially to store the data and it is useless now… Is there something we can do to signal the issue in hope the developpers fix it?
Here is my run command and I still have the issue (at least as reported initially by mdr):
sudo docker run -p 4443:4443 -p 443:443 -p 80:80 -v /media/Nextcloud:/data --name nextcloudpi --restart unless-stopped ownyourbits/nextcloudpi-armhf $IP
thanks a lot for the help.
Unfortunately, it doesn’t work:
I wiped my nextcloud instance, the nextcloud image, docker, docker-engine, docker.io, docker-commons
I removed the files from the volume I mounted for nextcloud
I removed the folder /var/lib/docker
I reinstalled docker (curl -sSL https://get.docker.com | sh)
I made the /media/Nextcloud/ncdata as you suggested
I ran your docker run command above.
I initialized my new nextcloudpi instance and made users
I uploaded files with the nextcloud client…
And they all end up in:
Note that the ncdata folder I created isn’t empty. Above is what it contains if you wanna have a look.
Hmmm … I tested both options and for clearness I only used the recommended call here documented on the nextcloudpi website whereas “-v ncdata:/data” is mentioned.
My “-v ncdata:/data” is exact the same as described here:
I only added an additional external volume to get a backup path mounted to the container. To ensure that the second vloume mount of the backup volume is not the problem I removed it and got the same problems. I also tested then in addition with a absolute path and the problem raises again.
As docker docu tells, the -v option can take absolute paths or, if not absolute, it will be a local path under data-root of docker (e.g. /var/lib/docker/volumes. I tested both options and both results in storing data not in the ncdata path. The user-added data of the nextcloudpi container running will be stored in the overlays2 folder. And overlays seems to be stored in the data-root of docker…
To be clear: I setup now multiple VMs with Mint19.3 Mint20 Ubuntu 20.04 and Ubuntu 20.10 and a Ubuntu server on a Raspberry. Installed docker to the machines and did a “docker run” described here: https://hub.docker.com/r/ownyourbits/nextcloudpi
All showed the same result:
user-added data (by client or website) will not be stored in the ncdata volume. For sure inside of the running nextcloudpi container all is good and user-added data will be stored - somewhere in the overlays of the ncdata volume. But the “-v ncdata:/data” is only holding the initial files, not the user added files. And if a user wants to use an external drive holding the data, like @cainbantam and I, it will fail.
I have exactly the same issue.
NextCloudPi system info says
and this directory is outside /data in the -v directive, in the /var/lib/docker/overlay2/<container_id>/merged/data-ro/nextcloud/data
there NextCloudPi puts new users directories and their data.
On the system info page I have read this:
‣ You should use nc-datadir to move your files to your plugged in USB drive
but nc-datadir command is not available in the WebUI and not in the TUI (from the console of the container)
So I think this is a big problem and this docker image is totally unusable with a -v directive on an external disk at the moment.
Thank you all guys for your contribution to identify the issue and find a solution. It is really thrilling to read you.
As a modest contribution, I may mention that an apparently working (though not definitive I guess) workaround to me has been to move /var/lib/docker to my external drive and put a symbolic link instead (I tried first to do that with the data-ro folder but it crashed the nextcloud server… maybe I did a mistake…)
Looking forward to find out what happens. Maybe we should rather use v.124 as suggested by the posts of @mdr and @ste_cat
Just wanted to chime in that I also face the same issue on the latest version, if using an empty volume/dir.
However, if I create a /data directory using v1.24.0, and then update the docker container back to the latest version (by removing it and starting a new container) while re-using the /data directory, then my datadir remains as datadir /data/nextcloud/data.