The Basics
- Nextcloud Server version (e.g., 29.x.x):
- [Nextcloud Hub 10] (31.0.6)
- Operating system and version (e.g., Ubuntu 24.04):
- Linux 6.12.41+deb13-amd64 x86_64
- Web server and version (e.g, Apache 2.4.25):
- (installed via CasaOS)
- Reverse proxy and version _(e.g. nginx 1.27.2)
- In another machine - NPM v2.12.2
- PHP version (e.g, 8.3):
- 8.3.22
- When did this problem seem to first start?
- its “constant”
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
- CasaOS
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- No
Summary of the issue you are facing:
Fresh Install of nextcloud (on top of CasaOS), can enter via IP:Port without a issue, but when i try via cloud.domain.xyz, i get to the login and it doesnt go further, if i do f5 and instantly goes to my files / dashboard
Steps to replicate it (hint: details matter!):
- Visit cloud.domain.xyz (any browser, Brave, Chrome, Edge, Opera, Incognito on all)
- put login and passoword correctly (it detects if incorrectly)
- doesnt move futher
Log entries
Nextcloud
{"reqId":"PnnarRVsIJUtWINE74uH","level":2,"time":"2025-08-25T15:53:54+00:00","remoteAddr":"[WAN_IP]","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: caos (Remote IP: [WAN_IP])","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","version":"31.0.6.2","data":[]}
{"reqId":"hY1z8XQTII0lc6ImGP7r","level":2,"time":"2025-08-25T15:53:57+00:00","remoteAddr":"[WAN_IP]","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: caos (Remote IP: [WAN_IP])","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36","version":"31.0.6.2","data":[]}
Web Browser
On the IP:PORT i dont get it, but via browser
Refused to send form data to 'https:/cloud.domain.xyz/login' because it violates the following Content Security Policy directive: "form-action 'self'".
Configuration
Nextcloud
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis-nextcloud',
'password' => 'REDACTED',
'port' => 6379,
),
'upgrade.disable-web' => true,
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'LAN_IP',
2 => 'cloud.domain.xyz',
),
'trusted_proxies' =>
array (
0 => 'LAN_IP',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '31.0.6.2',
'overwrite.cli.url' => 'http://localhost',
'dbname' => 'nextcloud',
'dbhost' => 'db-nextcloud',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_casaos',
'dbpassword' => 'REDACTED',
'installed' => true,
'instanceid' => 'ocnufg61wck8',
'overwriteprotocol' => 'http',
'loglevel' => 2,
);
Just realized - on tools, im getting the error
There are some errors regarding your setup.
-
Accessing site insecurely via HTTP. You are strongly advised to set up your server to require HTTPS instead. Without it some important web functionality like “copy to clipboard” or “service workers” will not work! Para mais pormenores, consultar o documentação
. -
Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks. Para mais pormenores, consultar o documentação
. -
One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command
occ maintenance:repair --include-expensiveto perform the migrations. -
Some headers are not set correctly on your instance - The
Strict-Transport-SecurityHTTP header is not set (should be at least15552000seconds). For enhanced security, it is recommended to enable HSTS. Para mais pormenores, consultar o documentação
. -
Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command
occ db:add-missing-indicesto add them. Missing indices: “fs_storage_path_prefix” in table “filecache” Para mais pormenores, consultar o documentação
.