I keep getting logged out of the desktop and mobile clients

System

Nextcloud version (eg, 18.0.2): 18.0.7
Operating system and version (eg, Ubuntu 20.04): Debian 10

The issue you are facing:

Nextcloud keeps logging me out of my clients. It seems to mostly happen with my desktop client running on ArchLinux, but it occasionally happens with the Android client as well. It happens daily with the desktop client, and I haven’t been able to keep track of how often it happens with the Android client.

Is this the first time you’ve seen this error? (Y/N):

No

Steps to replicate it:

  1. Log into the desktop client
  2. Wait for it to log you out
  3. repeat

The output of your Nextcloud log in Admin > Logging:

The log is thousands of lines long. Is there any way to make it less verbose?

The output of your config.php file in /path/to/nextcloud:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'trusted_proxies' =>
  array (
    0 => 'letsencrypt',
  ),
  'overwrite.cli.url' => 'https://cloud.haddock.cc/',
  'overwritehost' => 'cloud.haddock.cc',
  'overwriteprotocol' => 'https',
  'trusted_domains' =>
  array (
    0 => 'cloud.haddock.cc',
  ),
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'dbtype' => 'mysql',
  'version' => '18.0.7.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-db:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'mail_from_address' => 'mail',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'pipe',
  'mail_domain' => 'haddock.cc',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpport' => '465',
  'mail_smtphost' => 'smtp.sendgrid.net',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'apikey',
  'mail_smtppassword' => 'REDACTED',
  'mail_smtpsecure' => 'ssl',
);

On Linux desktop clients there are a few reports on that which can be found on the forum.

I looked through those and most of them seem to say to install libgnome-keyring. I did that and I’m still having the problem.

I also keep getting logged out from not just clients but also from web portal
However only LDAP users keep getting logged out
I am on Nextcloud version 22 with apache on centos7