i’m stuck with trying to run nextcloudpi in docker on my rasppi. It’s a fresh pios, i installed docker and then portainer, after that i wanted to continue with nextcloudpi.
I ran the container in docker using this command:
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v nextclouddata:/data --name nextcloudpi ownyourbits/nextcloudpi “domain.xx”
I get a lot of operation not permitted errors in the log, here is a quote of the log:
cp: preserving times for '/data/nextcloud/apps/notes/lib/Controller/NotesController.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Controller/PageController.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Controller/SettingsController.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Controller': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Db/Meta.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Db/MetaMapper.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Db': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Migration/Cleanup.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Migration/Version3005Date20200528204430.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Migration/Version3005Date20200528204431.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Migration': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/ImageNotWritableException.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/InsufficientStorageException.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/MetaNote.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/MetaService.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/Note.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/NoteDoesNotExistException.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/NoteNotWritableException.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/NoteUtil.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/NotesFolderException.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/NotesService.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/SettingsService.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/TagService.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service/Util.php': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib/Service': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/lib': Operation not permitted
cp: preserving times for '/data/nextcloud/apps/notes/templates/dev-mode.php': Operation not permitted
and in the end:
sleep: cannot read realtime clock: Operation not permitted
sleep: cannot read realtime clock: Operation not permitted
sleep: cannot read realtime clock: Operation not permitted
sleep: cannot read realtime clock: Operation not permitted
sleep: cannot read realtime clock: Operation not permitted
sleep: cannot read realtime clock: Operation not permitted
I don’t know for sure but it looks like a permissions issue based on the error message you’re getting. So maybe, either you or docker don’t have permissions to the directories and/or volumes docker is trying to manipulate.
Did you try running the command with sudo in the beginning?
It is really strange. I tried the post you mentionend in your post before again, and while it still throws the same errors in the logfile, i can view the activation page now, where i try to activate nextcloudpi. It doesn’t work though, after i click activate it shows
NextCloudPi not yet initialized, trying again in a few seconds ...
and nothing happens then. Logfile from the container still throwing the same errors as mentionend in my first post.
I mounted an external drive now for nextcloud (as described in the post you linked), and i set the permissions like that:
Yes, if you see the activation page it should work, it takes awhile to activate, just wait
If you used an external drive did you modify your docker command to use the absolute path as well?
I tried this yesterday on my RPi4, the docker command for running without external data directory and accessing it via the IP address in the browser, which worked right away.
I see, what is your setup & what steps are you taking?
How did you install Docker? The Docker Engine when using raspbian is best installed via Docker’s install script on https://get.docker.com as they say in their docs here and if you have old versions installed you need to remove them before you install using this script.
Since it works for me without issue, though I’m not using an external drive as data directory for the docker container.
If you have docker-compose, which is installed through the docker install script, I created a docker-compose.yml file that I just tested and is working.
Put it inside a directory/folder and run it with sudo docker-compose up -d
The data volume is not external in this one but can be changed by setting external: false to external: true. If you’re using NCP locally, when you get to the admin page at :4443 you may need to add your IP-address of the host in nc-trusted-domains to access the regular nextcloud interface via IP-address in the browser.
i appreciate your time, but i feel like we are running in circles here. i added the stack via portainer, with the adjustments to use the external drive:
Client: Docker Engine - Community
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:02:34 2022
OS/Arch: linux/arm64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:01 2022
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Since the only difference then seems to be with portainer, could you try and launch via CLI using the sudo docker or sudo docker-compose command instead?
For instance, using the command without external data first to see if you can get that working?
That is strange indeed, very interesting it isn’t working for you, and yes, it is always a possibility that the script could have pulled the wrong architecture, the script uses the arch=$(dpkg --print-architecture) command to set the architecture for the repository to docker.
it took me some time, but i decided to purge my os completely and reinstall a 64-bit piOS, as i figured i was running a 32bit system. I’ve installed docker like described in the post you linked again, and after that i installed nextcloudpi and portainer. I can proudly say: it is working now, and your help played a big part in it! Thank you for your patience, i appreciate it man.