# I can't log in to Nextcloud: token expired and logged out

**URL:** <https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032>\
**Category:** ℹ️ Support\
**Tags:** nc34, installation, php84\
**Created:** [September 7, 2026, 6:29pm UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032 "2026-09-07T18:29:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fredy](https://help.nextcloud.com/letter_avatar/fredy/32/5_5575768a8748004e209b776fc1b2916d.png) [@Fredy](https://help.nextcloud.com/u/Fredy)\
**Post date:** [September 7, 2026, 6:29pm UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/1 "2026-09-07T18:29:09Z")

</div>

> **Support intro**
>
> ##

## The Basics

- Nextcloud Server version _(e.g., 29.x.x)_:
  - 34.0.3

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `Hébergement Nuxit, PHP 8.4`

- PHP version _(e.g, 8.3)_:
  - `8.4`

- Is this the first time you’ve seen this error? (Yes / No):
  - `yes`

- When did this problem seem to first start?
  - `after installation`

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `Web updater`

- Are you using CloudfIare, mod\_security, or similar? _(Yes / No)_
  - `no`

### Summary of the issue you are facing:

The installation using Web Updater went smoothly. I was able to change various settings in the web interface. I created another account and logged out to test it.

On my first login, I received the following message: Session Error. It appears that your session token has expired; please refresh the page and try again.

I unchecked “Remember Me,” the dashboard appeared for a few seconds, and then I was logged out without any message.

The same thing happened when I tried to log back in with the admin account.

Thank you for your help.

Log entries

#### Nextcloud

```auto
Nothing about bad connection

```

#### Web Browser

```auto
FIREFOX 152.0.4 (64 bits)

```

#### Web server / Reverse Proxy

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
N/A

```

### Configuration

#### Nextcloud

The output of `occ config:list system` or similar is best, but, if not possible, the contents of your `config.php` file from `/path/to/nextcloud` is fine (make sure to remove any identifiable information!):

```auto
<?php

/*
 * WARNING
 *
 * This file gets modified by automatic processes and all lines that are not
 * active code (ie. comments) are lost during that process.
 *
 * If you want to document things with comments or use constants add your settings
 * in a '<NAME>.config.php' file which will be included and rendered into this file.
 *
 * Example:
 * <?php
 * $CONFIG = [];
 *
 * See also: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-merged-configuration-files
 */
$CONFIG = array (
  'instanceid' => 'ocrl0zssjhhd',
  'passwordsalt' => 'xxxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' => 
  array (
    0 => 'www.xxxx.fr',
  ),
  'datadirectory' => '/home/users3/p/xxxx/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '34.0.3.2',
  'overwrite.cli.url' => 'https://xxxxxx/nextcloud',
  'dbname' => 'xxxx',
  'dbhost' => 'xxxx',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'config_preset' => 2,
  'mail_domain' => 'xxxx.net',
  'mail_from_address' => 'xxxx',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'smtp.laposte.net',
  'mail_smtpport' => '465',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpstreamoptions' => 
  array (
    'ssl' => 
    array (
      'allow_self_signed' => false,
      'verify_peer' => true,
      'verify_peer_name' => true,
    ),
  ),
  'mail_smtpsecure' => 'ssl',
  'mail_smtppassword' => 'xxxx',
  'mail_smtpname' => 'xxxx',
  'mail_smtpauth' => true,
);

```

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [September 7, 2026, 8:12pm UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/2 "2026-09-07T20:12:37Z")

</div>

Please check your web browser inspector as described in the _Web Browser_ section of the [support template](https://help.nextcloud.com/t/support-template-please-use-this-when-you-request-support/137402).

---

<div class="post-metadata">

**Author:** ![Fredy](https://help.nextcloud.com/letter_avatar/fredy/32/5_5575768a8748004e209b776fc1b2916d.png) [@Fredy](https://help.nextcloud.com/u/Fredy)\
**Post date:** [September 8, 2026, 4:14am UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/3 "2026-09-08T04:14:33Z")

</div>

I’ve upgrated Firefox (now version 155) this morning and i was able to connect !  
After 20 mn, I’ve been logged out.  
I join a screen shot of the console when I try to login :

 ![Capture d’écran du 2026-09-08 06-07-58](https://help.nextcloud.com/uploads/default/original/3X/c/0/c0d92527e024834460d54e8bb3e5e442ce96592f.png)

I tried with an another web navigator (Chrome), there is the same pb.

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [September 8, 2026, 5:22pm UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/4 "2026-09-08T17:22:09Z")

</div>

That error looks like it’s coming from a browser extension.

Maybe try in private browsing mode and/or with extensions off?

Also watch the network tab, as noted in the [support template](https://help.nextcloud.com/t/support-template-please-use-this-when-you-request-support/137402) too

---

<div class="post-metadata">

**Author:** ![naiz0](https://help.nextcloud.com/user_avatar/help.nextcloud.com/naiz0/32/79837_2.png) [@naiz0](https://help.nextcloud.com/u/naiz0)\
**Post date:** [September 9, 2026, 6:53am UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/5 "2026-09-09T06:53:48Z")

</div>

The exact same thing happens with the desktop client. According to the log, the tokens are suddenly invalid or too short, and both the client and the web browser are logged out.

My user account will also be deactivated.

---

<div class="post-metadata">

**Author:** ![Fredy](https://help.nextcloud.com/letter_avatar/fredy/32/5_5575768a8748004e209b776fc1b2916d.png) [@Fredy](https://help.nextcloud.com/u/Fredy)\
**Post date:** [September 9, 2026, 8:42am UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/6 "2026-09-09T08:42:19Z")

</div>

Hi ! Thanks for your help 🙂

It’s the same pb in private browsing or with an another navigator (Chrome), even with Firefox on Android.

You will find here 3 har files from Network tabs [https://drop.chapril.org/download/5e65eff5d9b1937c/#mh2lf15GcH72dngTw2C39w](https://3%20har%20files)

1. Login with token error

2. Login with “Rember me” insuccessfull

3. Login without “Rember me” successfull, dashboard appears and log out suddenly

I don’t see where is the problem

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [September 10, 2026, 6:38pm UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/7 "2026-09-10T18:38:32Z")

</div>

Maybe an HTTP caching layer matter?

Are you sure there isn’t a caching layer in front provided by your web hosting company maybe?

---

<div class="post-metadata">

**Author:** ![naiz0](https://help.nextcloud.com/user_avatar/help.nextcloud.com/naiz0/32/79837_2.png) [@naiz0](https://help.nextcloud.com/u/naiz0)\
**Post date:** [September 11, 2026, 9:38am UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/8 "2026-09-11T09:38:01Z")

</div>

An update to Nextcloud Hub 26 Spring (34.0.4) was released today.

Since then, both the desktop client and the browser have remained logged in.  
It seems like the issue has been fixed.

---

<div class="post-metadata">

**Author:** ![Fredy](https://help.nextcloud.com/letter_avatar/fredy/32/5_5575768a8748004e209b776fc1b2916d.png) [@Fredy](https://help.nextcloud.com/u/Fredy)\
**Post date:** [September 12, 2026, 7:56am UTC](https://help.nextcloud.com/t/i-cant-log-in-to-nextcloud-token-expired-and-logged-out/249032/9 "2026-09-12T07:56:48Z")

</div>

I uninstalled all and installed latest version.

I had 429 Too many requests Error

I modified config.php to set ‘auth.bruteforce.protection.testing’ =\> false

I can login now, I will set ‘auth.bruteforce.protection.testing’ =\> true and increase auth.bruteforce.max-attempts later.

I am setting up application’s parameters and i will notice after testing ‘auth.bruteforce.protection.testing’ =\> true
