Nextcloud on Docker - 404, everything gone.
by axolinx from LinuxQuestions.org on (#5M0SQ)
Hello. I have a nextcloud server on a VPS, running on a docker container.
I lost access to it, from everywhere (web, mobile app, desktop sync) i get 404.
I know just some basic commands in docker and understand a bit how it works, but im clueless about why my setup is not working..
Please check the following terminal output and maybe someone can guide me a bit to see where i can look?
So far i am able to get a terminal prompt inside the docker image of my nextcloud, and the index files and structure seem to be fine..
Code:root@vmi284507:/etc# service docker status
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-08 20:32:19 EDT; 1min 59s ago
TriggeredBy: docker.socket
Docs: https://docs.docker.com
Main PID: 80074 (dockerd)
Tasks: 48
Memory: 86.8M
CGroup: /system.slice/docker.service
80074 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
80500 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.x.x.7 -container-port 443
80524 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.x.x.7 -container-port 80
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.126863241-04:00" level=warning msg="Your kernel does not support CPU realtime scheduler"
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.127007790-04:00" level=warning msg="Your kernel does not support cgroup blkio weight"
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.127157499-04:00" level=warning msg="Your kernel does not support cgroup blkio weight_de>
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.128542808-04:00" level=info msg="Loading containers: start."
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.441045543-04:00" level=info msg="Default bridge (docker0) is assigned with an IP addres>
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.010546747-04:00" level=info msg="Loading containers: done."
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.085591693-04:00" level=info msg="Docker daemon" commit=b0f5bc3 graphdriver(s)=overlay2 >
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.086463075-04:00" level=info msg="Daemon has completed initialization"
Jul 08 20:32:19 vmi284507.contaboserver.net systemd[1]: Started Docker Application Container Engine.
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.170098686-04:00" level=info msg="API listen on /run/docker.sock"Code:root@vmi284507:/etc# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx alpine b9e2356ea1be 2 days ago 22.8MB
nextcloud fpm-alpine 236141c6113c 2 days ago 568MB
collabora/code latest 9a428589679f 2 days ago 1.39GB
redis alpine 500703a12fa4 2 days ago 32.3MB
portainer/portainer-ce latest 8bd64518b976 2 weeks ago 210MB
mariadb latest 6d5c5ed114ad 2 weeks ago 408MB
traefik latest 99f7809fa346 2 weeks ago 92MB
tecnativa/docker-socket-proxy latest e419047c5d43 5 months ago 21.1MB
adminer latest 234dd75608e9 5 months ago 91.3MB
containrrr/watchtower latest 2ddeb26d6d30 6 months ago 15.2MBCode:root@vmi284507:/etc# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ffe5ec01c9d5 collabora/code:latest "/bin/sh -c 'bash st..." 2 days ago Up 25 minutes 9980/tcp collabora_online
1b91597298b7 nextcloud:fpm-alpine "/entrypoint.sh php-..." 2 days ago Up 25 minutes 9000/tcp nextcloud
290effaca15d redis:alpine "docker-entrypoint.s..." 2 days ago Up 25 minutes (healthy) 6379/tcp redis
57c005edc8e7 portainer/portainer-ce:latest "/portainer --host u..." 13 days ago Up 25 minutes 8000/tcp, 9000/tcp portainer
949d37692f05 mariadb:latest "docker-entrypoint.s..." 2 weeks ago Up 25 minutes (healthy) 3306/tcp nextcloud-db
e949deee693e traefik:latest "/entrypoint.sh trae..." 2 weeks ago Up 25 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp traefik
1824b5446fe9 tecnativa/docker-socket-proxy:latest "/docker-entrypoint...." 5 months ago Up 25 minutes 2375/tcp dockerproxy
a8b7247157e6 containrrr/watchtower:latest "/watchtower --clean..." 6 months ago Up 25 minutes 8080/tcp watchtowerCode:root@vmi284507:/etc# docker exec -it nextcloud /bin/sh
/var/www/html # ls
3rdparty COPYING config core custom_apps index.html lib ocm-provider ocs-provider remote.php robots.txt themes
AUTHORS apps console.php cron.php data index.php occ ocs public.php resources status.php version.php
I did a test renaming the index files in the nextcloud folder and created a new index.html file with a hello world test message and i can not reach it. So i am assuming there may be a problem with the traefik image? As far as i understand, this image is like a router that directs the traffic to the appropriate port and server image right?
Thank you


I lost access to it, from everywhere (web, mobile app, desktop sync) i get 404.
I know just some basic commands in docker and understand a bit how it works, but im clueless about why my setup is not working..
Please check the following terminal output and maybe someone can guide me a bit to see where i can look?
So far i am able to get a terminal prompt inside the docker image of my nextcloud, and the index files and structure seem to be fine..
Code:root@vmi284507:/etc# service docker status
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-08 20:32:19 EDT; 1min 59s ago
TriggeredBy: docker.socket
Docs: https://docs.docker.com
Main PID: 80074 (dockerd)
Tasks: 48
Memory: 86.8M
CGroup: /system.slice/docker.service
80074 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
80500 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 443 -container-ip 172.x.x.7 -container-port 443
80524 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.x.x.7 -container-port 80
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.126863241-04:00" level=warning msg="Your kernel does not support CPU realtime scheduler"
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.127007790-04:00" level=warning msg="Your kernel does not support cgroup blkio weight"
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.127157499-04:00" level=warning msg="Your kernel does not support cgroup blkio weight_de>
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.128542808-04:00" level=info msg="Loading containers: start."
Jul 08 20:32:12 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:12.441045543-04:00" level=info msg="Default bridge (docker0) is assigned with an IP addres>
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.010546747-04:00" level=info msg="Loading containers: done."
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.085591693-04:00" level=info msg="Docker daemon" commit=b0f5bc3 graphdriver(s)=overlay2 >
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.086463075-04:00" level=info msg="Daemon has completed initialization"
Jul 08 20:32:19 vmi284507.contaboserver.net systemd[1]: Started Docker Application Container Engine.
Jul 08 20:32:19 vmi284507.contaboserver.net dockerd[80074]: time="2021-07-08T20:32:19.170098686-04:00" level=info msg="API listen on /run/docker.sock"Code:root@vmi284507:/etc# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx alpine b9e2356ea1be 2 days ago 22.8MB
nextcloud fpm-alpine 236141c6113c 2 days ago 568MB
collabora/code latest 9a428589679f 2 days ago 1.39GB
redis alpine 500703a12fa4 2 days ago 32.3MB
portainer/portainer-ce latest 8bd64518b976 2 weeks ago 210MB
mariadb latest 6d5c5ed114ad 2 weeks ago 408MB
traefik latest 99f7809fa346 2 weeks ago 92MB
tecnativa/docker-socket-proxy latest e419047c5d43 5 months ago 21.1MB
adminer latest 234dd75608e9 5 months ago 91.3MB
containrrr/watchtower latest 2ddeb26d6d30 6 months ago 15.2MBCode:root@vmi284507:/etc# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ffe5ec01c9d5 collabora/code:latest "/bin/sh -c 'bash st..." 2 days ago Up 25 minutes 9980/tcp collabora_online
1b91597298b7 nextcloud:fpm-alpine "/entrypoint.sh php-..." 2 days ago Up 25 minutes 9000/tcp nextcloud
290effaca15d redis:alpine "docker-entrypoint.s..." 2 days ago Up 25 minutes (healthy) 6379/tcp redis
57c005edc8e7 portainer/portainer-ce:latest "/portainer --host u..." 13 days ago Up 25 minutes 8000/tcp, 9000/tcp portainer
949d37692f05 mariadb:latest "docker-entrypoint.s..." 2 weeks ago Up 25 minutes (healthy) 3306/tcp nextcloud-db
e949deee693e traefik:latest "/entrypoint.sh trae..." 2 weeks ago Up 25 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp traefik
1824b5446fe9 tecnativa/docker-socket-proxy:latest "/docker-entrypoint...." 5 months ago Up 25 minutes 2375/tcp dockerproxy
a8b7247157e6 containrrr/watchtower:latest "/watchtower --clean..." 6 months ago Up 25 minutes 8080/tcp watchtowerCode:root@vmi284507:/etc# docker exec -it nextcloud /bin/sh
/var/www/html # ls
3rdparty COPYING config core custom_apps index.html lib ocm-provider ocs-provider remote.php robots.txt themes
AUTHORS apps console.php cron.php data index.php occ ocs public.php resources status.php version.php
I did a test renaming the index files in the nextcloud folder and created a new index.html file with a hello world test message and i can not reach it. So i am assuming there may be a problem with the traefik image? As far as i understand, this image is like a router that directs the traffic to the appropriate port and server image right?
Thank you