Hi, I am having trouble setting up my nextcloud instance using docker compose.
I am on debian 12. I am trying to setup a fast and reliable nextcloud setup using nextcloud:31-fpm, redis-alpine and postgres:alpine alongside my trusty caddy instance.
But the issue I am having: I get a 404 when trying to connect to my new nextcloud instance. I was testing with nextcloud:31-apache, and this setup worked but I would like to use fpm.
I checked the logs of docker and even in the containers itself. Not a single error in sight. I tried chrome, firefox and forks of them - even curl.
Since you’re using Caddy as not just the reverse proxy, but as the web server, it must have /var/www/html from the nextcloud container mounted on it as well. Is that the case? You reference it in your Caddy file but it’s unclear whether you’ve mounted the volume there since it’s outside your provided Compose file.
After restarting caddy, nothing had changed. I assume that could be a permission issue, but I added the root user (that runs caddy) to the www-data group (that owns nextcloud files) and set the permissions to 754. From my understanding that should do… something more than just a 404.
(ja, its in my home, but i am testing this stuff rn before deploying it properly via puppet)
I didnt think about that the caddy must be the whole webserver then for the nextcloud. In that case it might be more logical to have a nginx as webserver container between the caddy as a reverse proxy and the nextcloud app.
But I already failed many times to find the proper nginx.conf content for this job…
Ulitmately @jtr was right that I must mount the webroot to the webserver.
Because of this fact, I chose to not use caddy as the webserver. (I also have other services running through caddy)
I basically followed this now: Alexander Brightwater / Nextcloud Docker FPM · GitLab
And my setup seems to work ^^.
LMK if you see an issue or even just somehing I could or should do better/ differently for whatever reason.