Nextcloudpi docker: Old installation seems to bother

I use nextcloudpi with docker. And i installed it very well some months ago. But i’ve got a new system, so i had to do it again.

Simply this command:
docker run -d -p 80:80 -p 443:443 -p 4443:4443 --name nextcloudpi -v /mnt/data/:/data ownyourbits/nextcloudpi-armhf myipaddress

and everything will be installed. Please pay attention, that i’ve got my data in /mnt/data.

pi@raspberrypi:~ $ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e13c75ecf92 ownyourbits/nextcloudpi-armhf “/run-parts.sh 192.1…” 3 days ago Up 2 days 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp nextcloudpi

So far, looks good. But i cant reach the web interface over my ip address (and yeah, also with ipaddress:443 or ipaddress:4443). And i remember, that i have the same problem some months ago, and the problem was an old nextcloudpi docker installation (the docker container seems to use some old folder, or something like that, dont know). And i also knew, that the solution was to delete with a one-line something like an data-folder inside this container, but i can’t remember exactly what it was and what the solution was. To be more clear, i installed before a nextcloudpi docker container, but i forgot to change the data folder to my /mnt/data, so i deleted the container and installed everythings again. The new installation seems to use the old data folder from the old docker container.

Btw, /mnt/data will be mounted as ntfs (this works the last time) and these are the rights:
5 4 drwxrwxrwx 1 root root 4096 Sep 2 18:11 data

pi@raspberrypi:~ $ docker logs -f nextcloudpi
/run-parts.sh: line 47: /etc/services-enabled.d/010lamp: Permission denied
/run-parts.sh: line 47: /etc/services-enabled.d/020nextcloud: Permission denied
Init done

I mean, also when i use
docker exec -it nextcloudpi /bin/bash
and check the /data folder, i’ll get the content of /mnt/data. So i cant find the problem?

Can you ping it? If so, run docker ps and verify the container is running and no other container is using the ports.

This is precisely what you’ve told it to do by remounting the same data folder.

By the way, you should also make a separate mount for your container’s web root. This is so you don’t lose your Nextcloud configuration when you delete the container for updates.

NTFS is not supported by NCP, it only supports ext4 and btrfs.
https://docs.nextcloudpi.com/en/faq/

@ KarlF12
How can i ping a docker container? Well, the container is running and nothins runs on port 80, 443 and 4443 but nextcloudpi.

pi@raspberrypi:~ $  docker ps
CONTAINER ID        IMAGE                           COMMAND                  CREATED              STATUS              PORTS                                                                      NAMES
327fd389aedd        ownyourbits/nextcloudpi-armhf   "/run-parts.sh myipa…"   About a minute ago   Up About a minute   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp           nextcloudpi


pi@raspberrypi:~ $  sudo lsof -i -P -n | grep LISTEN
docker-pr 4300     root    4u  IPv6  37301      0t0  TCP *:4443 (LISTEN)
docker-pr 4312     root    4u  IPv6  37314      0t0  TCP *:443 (LISTEN)
docker-pr 4325     root    4u  IPv6  37326      0t0  TCP *:80 (LISTEN)

This is precisely what you’ve told it to do by remounting the same data folder.

Well, no, this is not what i mean. I mean the data folder INSIDE the docker container, not /mnt/data. Hard to explain. I know, that i had to use docker exec -it nextcloudpi /bin/bash to access the container and i had to delete a data folder last time. But nevermind.

@ OliverV
This is weird, 'cause i run nextcloudpi on docker some months ago and my data device was mounted as ntfs. But ok, i formated it to ext4 and mounted it as ext4:

pi@raspberrypi:~ $ cat /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=3efe8723-01  /boot           vfat    defaults          0       2
PARTUUID=3efe8723-02  /               ext4    defaults,noatime  0       1
/dev/sda1        /mnt/data     ext4    auto,nofail,exec,sync,users,rw   0   0

It does not work. I cannot reach the webinterface with my ip, or ip:443 or ip:4443.

It decided to create everything new with this one: https://docs.nextcloudpi.com/en/how-to-get-started-with-ncp-docker/

pi@raspberrypi:~ $ docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /mnt/data/ncdata/:/data --name nextcloudpi ownyourbits/nextcloudpi-armhf myip

pi@raspberrypi:~ $ docker logs -f nextcloudpi
Initializing empty volume…
Making /usr/local/etc/ncp-config.d persistent …
Making /etc/services-enabled.d persistent …
Making /etc/letsencrypt persistent …
Making /etc/shadow persistent …
Making /etc/cron.d persistent …
Making /etc/cron.daily persistent …
Making /etc/cron.hourly persistent …
Making /etc/cron.weekly persistent …
Making /usr/local/bin persistent …
/run-parts.sh: line 47: /etc/services-enabled.d/010lamp: Permission denied
/run-parts.sh: line 47: /etc/services-enabled.d/020nextcloud: Permission denied
Init done

Nope, still not wirking. USb stick is mounted as ext4 and there are also some by nextcloudpi created files in there, the container is running, but still no access to the webinterface
pi@raspberrypi:~ $ ls /mnt/data/ncdata/
bin database etc ncp nextcloud

Edit: Ok, lets ignore everything, its working right now. I dont knwo why. My summary:
Just do everything explained here: https://docs.nextcloudpi.com/en/how-to-get-started-with-ncp-docker/
Maybe reboot the raspberry a couple of times
Wait something between 1 Minute and forever
Its working