I just installed nextcloud according to this guide on gitlab: Alexander Brightwater / Nextcloud Docker · GitLab
I use Debian 12, docker (fpm, nginx (webserver), redis, postgres, caddy (reverse proxy))
Everything seems to work fine, but I cannot seem to install extensions via the GUI.
Trying to use OCC seems to work, but enabling extensions like suspicious login
also fails with a generic error message.
This is the error from the browser console:
Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at http://<my domain>/apps/files/ because it violates the following directive: “connect-src 'self'”
Here is the webserver (nginx) log:
172.18.0.3 - - [27/Feb/2025:13:09:04 +0000] "POST /settings/apps/enable HTTP/1.1" 200 52 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
172.18.0.3 - - [27/Feb/2025:13:09:04 +0000] "GET /apps/files HTTP/1.1" 301 162 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
172.18.0.3 - - [27/Feb/2025:13:09:04 +0000] "POST /settings/apps/disable HTTP/1.1" 200 22 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
172.18.0.3 - - [27/Feb/2025:13:09:04 +0000] "GET /ocs/v2.php/core/navigation/apps?format=json HTTP/1.1" 200 289 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
Here is the nextcloud_app log:
172.18.0.5 - 27/Feb/2025:13:08:35 +0000 "PUT /ocs/v2.php" 200
172.18.0.5 - 27/Feb/2025:13:08:36 +0000 "POST /index.php" 200
172.18.0.5 - 27/Feb/2025:13:08:37 +0000 "POST /index.php" 200
172.18.0.5 - 27/Feb/2025:13:08:37 +0000 "GET /ocs/v2.php" 200
caddy, redis and postgres dont seem to generate a log entry for this action.
As far as I understand the issue is with this content security policy that is set in nginx. But I cannot see it in my nginx config (config in gitlab link above).
So I guess I might need to add something to my nginx or caddy config. But what?
I already had an extensive chat with chatgpt, but nothing it provided, helped…