Login redirect issue, even on localhost, without proxy

Nextcloud version (eg, 29.0.5): 30.0.0.14
Operating system and version (eg, Ubuntu 24.04): fedora 40
Apache or nginx version (eg, Apache 2.4.25): caddy (idk what version)
PHP version (eg, 8.3): 8.2.23

I am having a, what seems to be, very common issue, where nextcloud keeps redirecting me back to the login screen, in a loop, when I try to log in during the installation process. Going to the page works fine, but after I click the link, I am 303 redirected back to the login page with the following query parameters: direct=1&user=XXX

I followed this guide, which has worked for me before on a different machine.

I have found many posts of people who have this issue, but they only get it if they are behind a reverse proxy of some sort. I get it even on localhost, in fact, I do not have it configured for public access at all.

This is my config.php file:

<?php
$CONFIG = array (
  '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' => '127.0.0.1',
    'password' => 'XXX',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XXX:8080',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'http://XXX:8080',
  'dbname' => 'XXX',
  'dbhost' => '127.0.0.1',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
);

This is my caddyfile:

:80 {
        root * /var/www/html
        file_server

        php_fastcgi 127.0.0.1:9000

        redir /.well-known/carddav /remote.php/dav 301
        redir /.well-known/caldav /remote.php/dav 301

        # .htaccess / data / config / ... shouldn't be accessible from outside
         {
                path    /.htaccess
                path    /data/*
                path    /config/*
                path    /db_structure
                path    /.xml
                path    /README
                path    /3rdparty/*
                path    /lib/*
                path    /templates/*
                path    /occ
                path    /console.php
        }

        respond  404
}

I am on fedora and I am accessing my network via tailscale. I am using the community container image and podman in rootless mode

I have tried following the advice mentioned in the posts I find on the internet, like including/excluding overwrite.clu.url, overwriteprotocol and overwritehost, but none of those options worked at all.

Can anybody help me?

I have found the problem. Apparently, the comma character is not a valid for the password and gets parsed incorrectly either on the nextcloud or on the redis side. I am suspecting the nextcloud side, but I am not certain

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.