From 32950e8138b81000b2435988b6e89de1a78fe778 Mon Sep 17 00:00:00 2001 From: vatsal Date: Sun, 28 Dec 2025 20:57:17 +0530 Subject: [PATCH 1/3] docs: add COOKIE_DOMAIN usage in dotenv configuration Request for this documentation is mentioned in PR #10418 of Librechat project. --- next-env.d.ts | 1 - pages/docs/configuration/dotenv.mdx | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index 254b73c16..52e831b43 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/pages/docs/configuration/dotenv.mdx b/pages/docs/configuration/dotenv.mdx index 5fcb5fc10..40c8071ea 100644 --- a/pages/docs/configuration/dotenv.mdx +++ b/pages/docs/configuration/dotenv.mdx @@ -177,6 +177,20 @@ To configure LibreChat for local use or custom domain deployment, set the follow When deploying LibreChat to a custom domain, replace `http://localhost:3080` with your deployed URL - e.g. `https://librechat.example.com`. +### Cookie Domain + +By default cookies are set on the same domain on which Librechat is hosted i.e. `DOMAIN_CLIENT`. +To set authorization cookies on the parent domain, set the following env variable: + + + +Example above assumes that Librechat chat is hosted on a subdomain of `example.com`. +- e.g. `https://librechat.example.com`. + ### Prevent Public Search Engines Indexing By default, your website will not be indexed by public search engines (e.g. Google, Bing, …). This means that people will not be able to find your website through these search engines. If you want to make your website more visible and searchable, you can change the following setting to `false` @@ -1483,4 +1497,4 @@ Notes: - Leader election requires Redis to be enabled (`USE_REDIS=true`). - These settings are only relevant for multi-instance deployments. - The leader lease must be renewed before expiration to maintain leadership. -- If lease renewal fails after max attempts, the instance will relinquish leadership. \ No newline at end of file +- If lease renewal fails after max attempts, the instance will relinquish leadership. From dff645a04482da7179bf2d837f047e3e95b9dd98 Mon Sep 17 00:00:00 2001 From: vatsal Date: Sat, 24 Jan 2026 20:54:37 +0530 Subject: [PATCH 2/3] I accidentally remove this line in my previous commit --- next-env.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/next-env.d.ts b/next-env.d.ts index 52e831b43..254b73c16 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,6 @@ /// /// +/// // NOTE: This file should not be edited // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. From e1b55be69825c8240dd0831be4639ea61acb69e2 Mon Sep 17 00:00:00 2001 From: vatsal Date: Sat, 24 Jan 2026 20:57:30 +0530 Subject: [PATCH 3/3] doc: improve description of what will happen when cookie is unset --- pages/docs/configuration/dotenv.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/configuration/dotenv.mdx b/pages/docs/configuration/dotenv.mdx index 40c8071ea..3feeaa774 100644 --- a/pages/docs/configuration/dotenv.mdx +++ b/pages/docs/configuration/dotenv.mdx @@ -179,7 +179,7 @@ When deploying LibreChat to a custom domain, replace `http://localhost:3080` wit ### Cookie Domain -By default cookies are set on the same domain on which Librechat is hosted i.e. `DOMAIN_CLIENT`. +By default cookies will be set without a domain attribute (browser default behavior). To set authorization cookies on the parent domain, set the following env variable: