[solved] Login loop after installation with Redis

Hey,

I did read the other posts about “login loop”, but it seems the problem is different for me.

I run Nextcloud as a Docker container, and MariaDB as another Docker container on a Debian VM. Apache is configured for https and everything is working flawlessly as it is, behind a HAProxy VM (no more message of https to http redirection on the administration panel of Nextcloud).

As it is the last warning on my Nextcloud administration page, I would like to use Redis for distributed and locking memcache.

The problem start when I install Redis as a Docker container.
Redis has a password, which is provided to the Nextcloud container.

No Docker log errors for the Redis Docker container, neither for the Nextcloud container, everything seems fine.
When I complete the installation web page from Nextcloud (login/password for Nextcloud, BDD), the installation works, but I am redirected to the Nextcloud login page. Before using Redis, I could use Nextcloud without this redirection.
And when I try to login, it loops on the login page.

I can see logs with redis-cli MONITOR when using the Nextcloud web page, so the caching seems to work.

The only location where I can see errors is in the nextcloud.log file. As it is really verbose, I put it on PasteBin:
https://pastebin.com/Ft9VCDW6

Don’t hesitate to tell me if there are other places where logs may be useful.

The config.php seems to correctly autodetect everything:

<?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',
    'password' => 'REDIS_PASSWORD',
    'port' => 6379,
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'PRIVATE',
  'passwordsalt' => 'PRIVATE',
  'secret' => 'PRIVATE',
  'trusted_domains' =>
  array (
    0 => 'nextcloud.domain.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '28.0.1.1',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'dbname' => 'DB_NAME',
  'dbhost' => 'mariadb:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'DB_USER',
  'dbpassword' => 'DB_PASSWORD',
  'installed' => true,
);

Except the Redis host and password, everything is autodetected or provided on the Nextcloud installation web page.

I did try some things, like overwriteprotocol set to https, but the login loop problem is the same.

Thanks for your help!

It seems the problem comes from the Redis Docker container password.
It works with and without persistance without password.
It is not a big deal to use Redis without password in this case, because it is only exposed to the same Docker network, not to Internet.