From 365944d1ea1f498daeb91d216e936235e1bdd546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Fri, 7 Aug 2026 21:24:49 +0200 Subject: [PATCH] feat(browsers): update persistent data policies for Firefox-based browsers. --- webpage/docs/customization/browsers.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/webpage/docs/customization/browsers.md b/webpage/docs/customization/browsers.md index 8c69925d..eb5eb5ca 100644 --- a/webpage/docs/customization/browsers.md +++ b/webpage/docs/customization/browsers.md @@ -120,12 +120,23 @@ The policy files are located in the following paths: **Allow persistent data in policies** -By default, the browsers in Neko are set up to forget all cookies and browsing history when they are closed. If you want to allow persistent data, you can set the following policies in the JSON file: +By default, Firefox-based browsers in Neko are set up to clear cookies, sessions, and other browsing data on shutdown. If you want persistent logins across container restarts, do not replace the policy with a minimal JSON file. Instead, copy the default policy file and only modify the `SanitizeOnShutdown` values you need. + +You can copy the default policy from the container (or from this repository), then set these values to `false`: ```json title="policy.json" { "policies": { - "SanitizeOnShutdown": false, + "SanitizeOnShutdown": { + "Cache": false, + "Cookies": false, + "Downloads": false, + "FormData": false, + "History": false, + "OfflineApps": false, + "Sessions": false, + "SiteSettings": false + }, "Homepage": { "StartPage": "previous-session" } @@ -133,6 +144,15 @@ By default, the browsers in Neko are set up to forget all cookies and browsing h } ``` +Keep the rest of the default policy entries unchanged so you preserve Neko defaults (for example extension rules and other hardened settings). Then mount it back into the container: + +```yaml title="docker-compose.yaml" +services: + neko: + volumes: + - "./policy.json:/usr/lib/firefox/distribution/policies.json:ro" +``` + **Manage extensions** By default, the browsers in Neko do not allow installing extensions except for the ones that are pre-installed.