Login loop on docker installation

Hello, folks.

I have a problem with my NC AIO installation in docker. After some upgrade (I don’t really know which one because I don’t usually use browser version) it impossible to login in browser due to login loop. All users and browsers affected. Clear cache, restart docker container, etc. (all trivial measures) don’t work.

General info

Host: debian 12.4 up-to-date
Docker: version 20.10.24+dfsg1, build 297e128
docker-compose: version 1.29.2, build unknown
NC: 18.0.4-apache (AIO version)
MariaDB: 10.5

php.config

<?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' => '',
   'port' => 6379,
 ),       
  'passwordsalt' => 'removed_for_security_reasons',
  'secret' => 'removed_for_security_reasons',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'removed_for_security_reasons',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '27.1.4.1',
  'overwrite.cli.url' => 'https://removed_for_security_reasons',
  'overwriteprotocol' => 'https',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'removed_for_security_reasons',
  'installed' => true,
  'instanceid' => 'ocz9yhs5g6il',
  'default_phone_region' => 'RU',
  'loglevel' => 3,
  'maintenance' => false,
  'theme' => '',
  'app_install_overwrite' => 
  array (
    0 => 'hancomoffice',
    1 => 'calendar',
  ),
);

Docker log when I try to login

app_1    | 10.70.77.2 - - [15/Dec/2023:06:41:58 +0000] "POST /login HTTP/1.1" 303 2244 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
app_1    | 10.70.77.2 - - [15/Dec/2023:06:41:58 +0000] "GET /login?direct=1&user=user HTTP/1.1" 200 9026 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
app_1    | 10.70.77.2 - - [15/Dec/2023:06:41:59 +0000] "GET /apps/theming/js/theming.js?v=a812c4c4-0 HTTP/1.1" 200 536 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
app_1    | 10.70.77.2 - - [15/Dec/2023:06:41:59 +0000] "GET /apps/theming/icon?v=b6589fc6 HTTP/1.1" 200 26628 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
app_1    | 10.70.77.2 - user [15/Dec/2023:06:42:16 +0000] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 1682 "-" "Mozilla/5.0 (Linux) mirall/3.9.3 (build 17175) (Nextcloud, debian-6.1.0-13-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
app_1    | 10.70.77.2 - user [15/Dec/2023:06:42:16 +0000] "PROPFIND /remote.php/dav/files/user/ HTTP/1.1" 207 1611 "-" "Mozilla/5.0 (Linux) mirall/3.9.3 (build 17175) (Nextcloud, debian-6.1.0-13-amd64 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

Additional info

NC is behind NPM (nginx proxy manager) installation. Other docker containers also behind NPM work fine.

I also tried integrity check from withing docker instance, it was finished without errors and other messages.

Any ideas?

Do you know if this IP address is your workstation you are connecting from? Or is it an IP address associated with your reverse proxy?

Also, there may be more clues in your nextcloud.log.

It’s an address of my laptop in VPN. I use this laptop to get access to NC via browser.

May be, but it’s a mess. I don’t know how to make this log more readable. Not to say a lot of sensitive data is in this log (file names, users). Also there’s no updates in the log when I try to login.

So… It looks like I’m unable to login with any app too (IOS, Android, AppImage for Linux). The apps where I was logged in before the issue arrived work fine. I didn’t tweak anything or changed anything in NC. I just created users and that’s all. I have enough space on the drive with NC container data. Does reinstall from scratch is the only way to “fix” it?