Cookies
Nextcloud only stores cookies that are necessary for it to function. All cookies are set by your Nextcloud server directly — no third-party cookies are involved.
Under GDPR, only cookies that store or transmit personal data require a legal basis or consent. Of the cookies listed below, only the remember-me cookies contain personal data (the username). All other cookies contain randomly generated tokens with no inherent personal information.
Note
The __Host- prefix is applied to the same-site cookies only when
Nextcloud is accessed over HTTPS. On plain HTTP the prefix is omitted and
the cookies are named nc_sameSiteCookiestrict and
nc_sameSiteCookielax.
Cookies stored by Nextcloud
Type |
Name |
Purpose |
Personal data |
Lifetime |
|---|---|---|---|---|
Session cookie |
|
Carries a random PHP session ID used to identify the user’s session on the server. |
No |
Until browser is closed. |
Session cookie |
|
Carries a random token used to decrypt the session data stored on the server. |
No |
Until browser is closed. |
Same-site cookie |
|
Used to detect whether a request originates from the same site
( |
No |
Expires 2100-12-31 (effectively permanent). |
Same-site cookie |
|
Used to detect cross-site navigation requests
( |
No |
Expires 2100-12-31 (effectively permanent). |
Remember-me cookie |
|
Stores the user’s login name to enable persistent login across browser sessions. |
Yes — contains the username. |
Defaults to 15 days. Configurable via |
Remember-me cookie |
|
A random token paired with |
No |
Same as |
Remember-me cookie |
|
The original session ID, retained to allow session continuity when the remember-me token is used. |
No |
Same as |
Download helper |
|
A short-lived random token set when a file download begins, used to signal the browser that the download has started (e.g. to hide a loading indicator). |
No |
20 seconds. |
Remember-me cookies
The remember-me cookies (nc_username, nc_token, nc_session_id) are
only set when the user explicitly selects Remember me at login. They are
cleared immediately when the user logs out.
Because nc_username contains the user’s login name, it is personal data
under GDPR. The legal basis for storing it is typically legitimate interest
or contract performance (enabling the service the user has requested),
provided the user has been informed of this in your privacy policy.
The lifetime defaults to 15 days and can be shortened in config/config.php:
'remember_login_cookie_lifetime' => 60 * 60 * 24 * 15,