diff --git a/README.md b/README.md
index 878346b..a7b5d33 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ $env:PYGITWEB_AUTH=0; uv run --with pygitweb uvicorn pygitweb.main:app
 > [!WARNING]
 > With authentication disabled, anyone who can reach the server has full access. Keep the default `127.0.0.1` binding: **never** combine `PYGITWEB_AUTH=0` with `--host 0.0.0.0`, a reverse proxy, or anything else that exposes the server to other machines.
 >
-> **Disabling auth is saved.** PyGitWeb writes its settings, including `AUTH`, to `~/.pygitweb/settings.json` on every start. After one run with `PYGITWEB_AUTH=0`, later runs stay unauthenticated even once the variable is gone. To turn authentication back on, start the server with `PYGITWEB_AUTH=1`, or set `"AUTH": true` in `settings.json`.
+> `PYGITWEB_AUTH` applies only for that process. It is not written to `settings.json`, so a later start without the variable uses the saved file value (auth on by default).
 
 ### Trying `pgt` on its own
 
@@ -69,10 +69,10 @@ pgt
 
 PyGitWeb keeps its configuration in `~/.pygitweb/`:
 
-- `settings.json` holds server settings. It is created on first run from your environment.
+- `settings.json` holds server settings. It is created on first run from field defaults.
 - `auth.json` holds local users and OAuth settings.
 
-Settings come from `PYGITWEB_*` environment variables or a `.env` file in the working directory. When `settings.json` already exists, environment variables override it, PyGitWeb prints a warning, and the new values are **saved back to the file**.
+Settings come from `PYGITWEB_*` environment variables or a `.env` file in the working directory. Environment variables override `settings.json` for the current process only (with a warning) and are **not** saved back to the file. Use the settings UI or edit `settings.json` to change saved values.
 
 PyGitWeb serves the git repositories it finds under `PYGITWEB_PROJECTROOT`. That defaults to your home directory, so set it to the folder that holds your repositories.
 
diff --git a/pygitweb/README.md b/pygitweb/README.md
index df34c92..b4febc5 100644
--- a/pygitweb/README.md
+++ b/pygitweb/README.md
@@ -4,9 +4,10 @@ Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported fr
 
 ## Config
 
-Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), `PYGITWEB_*`
-environment variables, and optionally a `.env` file in the working directory via
-`pydantic-settings`. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
+Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), with
+`PYGITWEB_*` environment variables and an optional `.env` file overriding the file for
+the current process only (not written back). See `src/pygitweb/config.py` and
+`settings.schema.json` for the full schema. Common ones:
 
 - `PYGITWEB_PROJECTROOT` — absolute path to directory containing git repositories (default: `$HOME`)
 - `PYGITWEB_PROJECTS_LIST` — directory to scan, or path to a project-list file (default: `PROJECTROOT`)
@@ -15,7 +16,7 @@ environment variables, and optionally a `.env` file in the working directory via
 - `PYGITWEB_GIT` — path to the git executable (default: `git`)
 - `PYGITWEB_AUTH` — `0` / `false` / `off` disables auth; `1` / `true` / `on` enables it. If **unset or empty**, auth defaults to **on**.
 - `PYGITWEB_AUTH_CONFIG` — path to the auth JSON file (default: `~/.pygitweb/auth.json`). Generated to a reasonable default if not present.
-- `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from the environment on first run if missing.
+- `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from field defaults on first run if missing.
 - `PYGITWEB_ENABLED_PLUGINS` — installed plugins to load. The settings page can change this list and reload plugins immediately (`POST /settings/pygitweb/plugins`).
 - `PYGITWEB_API_KEY_MAX_COUNT` — maximum Smart HTTP API keys each local user may hold (default: `2`).
 - `PYGITWEB_API_KEY_EXPIRY_DAYS` — lifetime of a newly issued API key, in days. `0` means the key does not expire (the default).
diff --git a/pygitweb/src/pygitweb/config.py b/pygitweb/src/pygitweb/config.py
index 6590f92..bdafe6f 100644
--- a/pygitweb/src/pygitweb/config.py
+++ b/pygitweb/src/pygitweb/config.py
@@ -89,14 +89,17 @@ class Settings(BaseSettings):
     """
     Runtime settings from ~/.pygitweb/settings.json (or PYGITWEB_SETTINGS_CONFIG),
     PYGITWEB_* env vars, and optionally a .env file. On first run the file is created
-    from the environment. When the file exists, env vars override file values (with a warning).
+    from field defaults (environment is ignored for that initial write). When the file
+    exists, env vars override file values for the current process only (with a warning)
+    and are not saved back.
 
     When AUTH is true, PyGitWeb uses OAuth2 password flow (POST /token), Bearer tokens,
     and browser login. Local credentials live in the auth JSON file (see PYGITWEB_AUTH_CONFIG).
 
     If PYGITWEB_AUTH is omitted entirely (or empty), authentication defaults to enabled
     and a random password is written to the auth config file on first run (see stderr).
-    Set PYGITWEB_AUTH=0 or PYGITWEB_AUTH=1 explicitly as needed.
+    Set PYGITWEB_AUTH=0 or PYGITWEB_AUTH=1 for this process only; to change the saved
+    default, edit settings.json (or use the settings UI for other fields).
     """
 
     model_config = SettingsConfigDict(
diff --git a/pygitweb/src/pygitweb/settings_config.py b/pygitweb/src/pygitweb/settings_config.py
index 7f94f49..eb9cee9 100644
--- a/pygitweb/src/pygitweb/settings_config.py
+++ b/pygitweb/src/pygitweb/settings_config.py
@@ -1,9 +1,10 @@
 """
 PyGitWeb settings file: ~/.pygitweb/settings.json (or PYGITWEB_SETTINGS_CONFIG).
 
-On first run, loads from environment and writes the file. When the file exists,
-loads from JSON then applies explicit environment/.env overrides (with a warning).
-Changes via the settings UI or setattr persist back to the file.
+On first run, writes field defaults (ignoring environment) and creates the file.
+When the file exists, loads from JSON then applies explicit environment/.env overrides
+for the current process only (with a warning). Environment overrides are never written
+back. Changes via the settings UI or setattr persist to the file.
 """
 
 from __future__ import annotations
@@ -24,6 +25,8 @@ _persist_enabled = False
 _batch_update = False
 _active_path: Path | None = None
 _setattr_patched = False
+_persisted_settings: Settings | None = None
+_NoEnvSettings: type[Settings] | None = None
 
 
 def settings_config_path() -> Path:
@@ -45,11 +48,44 @@ def write_settings_file(settings: Settings, path: Path | None = None) -> None:
 def _warn_env_overrides(path: Path, fields: list[str]) -> None:
     names = ", ".join(fields)
     print(
-        f"WARNING: PyGitWeb: environment overrides settings file {path}\n         Overridden field(s): {names}\n",
+        f"WARNING: PyGitWeb: environment overrides settings file {path}\n"
+        f"         Overridden field(s): {names}\n"
+        f"         These apply for this process only and are not saved to the file.\n",
         file=sys.stderr,
     )
 
 
+def _no_env_settings_cls() -> type[Settings]:
+    """Settings subclass that ignores environment and .env (file/defaults only)."""
+    global _NoEnvSettings
+    if _NoEnvSettings is None:
+        from pydantic_settings import BaseSettings, PydanticBaseSettingsSource
+
+        from pygitweb.config import Settings
+
+        class NoEnvSettings(Settings):
+            @classmethod
+            def settings_customise_sources(
+                cls,
+                settings_cls: type[BaseSettings],
+                init_settings: PydanticBaseSettingsSource,
+                env_settings: PydanticBaseSettingsSource,
+                dotenv_settings: PydanticBaseSettingsSource,
+                file_secret_settings: PydanticBaseSettingsSource,
+            ) -> tuple[PydanticBaseSettingsSource, ...]:
+                return (init_settings,)
+
+        _NoEnvSettings = NoEnvSettings
+    return _NoEnvSettings
+
+
+def _load_settings_without_env(data: dict[str, object] | None = None) -> Settings:
+    cls = _no_env_settings_cls()
+    if data is None:
+        return cls()
+    return cls.model_validate(data)
+
+
 def _apply_env_overrides(base: Settings) -> list[str]:
     from pygitweb.config import Settings
 
@@ -75,11 +111,13 @@ def _patch_settings_setattr() -> None:
 
     def _setattr(self: object, name: str, value: object) -> None:
         original(self, name, value)
-        if not _persist_enabled or _batch_update:
-            return
         if name not in Settings.model_fields or not isinstance(self, Settings):
             return
-        write_settings_file(self)
+        if _persisted_settings is not None and self is not _persisted_settings:
+            original(_persisted_settings, name, value)
+        if not _persist_enabled or _batch_update:
+            return
+        write_settings_file(_persisted_settings if _persisted_settings is not None else self)
 
     Settings.__setattr__ = _setattr  # type: ignore[method-assign]
     _setattr_patched = True
@@ -88,25 +126,36 @@ def _patch_settings_setattr() -> None:
 def init_settings() -> Settings:
     from pygitweb.config import Settings, _finalize_auth_settings
 
-    global _persist_enabled, _active_path
+    global _persist_enabled, _active_path, _persisted_settings
 
     _persist_enabled = False
+    _persisted_settings = None
     path = settings_config_path()
     _active_path = path
 
     if path.is_file():
-        settings = Settings.model_validate_json(path.read_text(encoding="utf-8"))
-        overrides = _apply_env_overrides(settings)
-        if overrides:
-            _warn_env_overrides(path, overrides)
+        raw = json.loads(path.read_text(encoding="utf-8"))
+        persisted = _load_settings_without_env(raw if isinstance(raw, dict) else None)
     else:
-        settings = Settings()
+        persisted = _load_settings_without_env(None)
+
+    # Full dump has every field, so model_validate_json does not fill gaps from the environment.
+    runtime = Settings.model_validate_json(persisted.model_dump_json())
+    overrides = _apply_env_overrides(runtime)
+    if overrides:
+        _warn_env_overrides(path, overrides)
+
+    _finalize_auth_settings(runtime)
+
+    if persisted.AUTH is None:
+        # Default persisted AUTH to on; do not copy a one-shot PYGITWEB_AUTH=0 into the file.
+        persisted.AUTH = True
 
-    _finalize_auth_settings(settings)
-    write_settings_file(settings, path)
+    _persisted_settings = persisted
+    write_settings_file(persisted, path)
     _patch_settings_setattr()
     _persist_enabled = True
-    return settings
+    return runtime
 
 
 @contextmanager
@@ -120,4 +169,4 @@ def settings_batch_update(settings: Settings) -> Iterator[None]:
     finally:
         _batch_update = False
         if _persist_enabled:
-            write_settings_file(settings)
+            write_settings_file(_persisted_settings if _persisted_settings is not None else settings)
diff --git a/pygitweb/src/pygitweb/settings_config_test.py b/pygitweb/src/pygitweb/settings_config_test.py
index 97a3bda..29b32af 100644
--- a/pygitweb/src/pygitweb/settings_config_test.py
+++ b/pygitweb/src/pygitweb/settings_config_test.py
@@ -15,13 +15,15 @@ def settings_path(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:
     return path
 
 
-def test_creates_settings_file_from_environment(settings_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
+def test_creates_settings_file_from_defaults_not_env(settings_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
     monkeypatch.setenv("PYGITWEB_SITE_NAME", "FromEnv")
     settings = init_settings()
     assert settings_path.is_file()
     data = json.loads(settings_path.read_text(encoding="utf-8"))
-    assert data["SITE_NAME"] == "FromEnv"
+    assert data["SITE_NAME"] == "PyGitWeb"
+    assert data["AUTH"] is True
     assert settings.SITE_NAME == "FromEnv"
+    assert settings.AUTH is False
 
 
 def test_loads_existing_settings_file(settings_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
@@ -49,7 +51,9 @@ def test_loads_existing_settings_file(settings_path: Path, monkeypatch: pytest.M
     assert settings.PROJECT_MAXDEPTH == 2
 
 
-def test_env_overrides_settings_file(settings_path: Path, monkeypatch: pytest.MonkeyPatch, capsys) -> None:
+def test_env_overrides_settings_file_ephemerally(
+    settings_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
+) -> None:
     settings_path.write_text(
         json.dumps({
             "PROJECTROOT": "/var/git",
@@ -61,7 +65,7 @@ def test_env_overrides_settings_file(settings_path: Path, monkeypatch: pytest.Mo
             "STRICT_EXPORT": False,
             "GIT": "git",
             "MAXLOAD": None,
-            "AUTH": False,
+            "AUTH": True,
             "AUTH_CONFIG": "",
             "SETTINGS_CONFIG": "",
         })
@@ -69,18 +73,54 @@ def test_env_overrides_settings_file(settings_path: Path, monkeypatch: pytest.Mo
         encoding="utf-8",
     )
     monkeypatch.setenv("PYGITWEB_SITE_NAME", "FromEnv")
+    monkeypatch.setenv("PYGITWEB_AUTH", "0")
     settings = init_settings()
     assert settings.SITE_NAME == "FromEnv"
-    assert json.loads(settings_path.read_text(encoding="utf-8"))["SITE_NAME"] == "FromEnv"
+    assert settings.AUTH is False
+    data = json.loads(settings_path.read_text(encoding="utf-8"))
+    assert data["SITE_NAME"] == "FromFile"
+    assert data["AUTH"] is True
     err = capsys.readouterr().err
     assert "environment overrides settings file" in err
+    assert "not saved to the file" in err
     assert "SITE_NAME" in err
+    assert "AUTH" in err
 
 
-def test_setattr_persists_to_file(settings_path: Path) -> None:
+def test_env_auth_does_not_stick_after_unset(settings_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
+    settings_path.write_text(
+        json.dumps({
+            "PROJECTROOT": "/var/git",
+            "PROJECTS_LIST": "/var/git",
+            "PROJECT_MAXDEPTH": 1,
+            "SITE_NAME": "FromFile",
+            "EXPORT_OK": "",
+            "LIST_ALL": True,
+            "STRICT_EXPORT": False,
+            "GIT": "git",
+            "MAXLOAD": None,
+            "AUTH": True,
+            "AUTH_CONFIG": "",
+            "SETTINGS_CONFIG": "",
+        })
+        + "\n",
+        encoding="utf-8",
+    )
+    monkeypatch.setenv("PYGITWEB_AUTH", "0")
+    assert init_settings().AUTH is False
+    assert json.loads(settings_path.read_text(encoding="utf-8"))["AUTH"] is True
+
+    monkeypatch.delenv("PYGITWEB_AUTH", raising=False)
+    assert init_settings().AUTH is True
+
+
+def test_setattr_persists_to_file_without_env_overrides(settings_path: Path) -> None:
     settings = init_settings()
+    assert settings.AUTH is False
     settings.SITE_NAME = "Updated"
-    assert json.loads(settings_path.read_text(encoding="utf-8"))["SITE_NAME"] == "Updated"
+    data = json.loads(settings_path.read_text(encoding="utf-8"))
+    assert data["SITE_NAME"] == "Updated"
+    assert data["AUTH"] is True
 
 
 def test_batch_update_persists_once(settings_path: Path) -> None:
@@ -91,6 +131,7 @@ def test_batch_update_persists_once(settings_path: Path) -> None:
     data = json.loads(settings_path.read_text(encoding="utf-8"))
     assert data["SITE_NAME"] == "BatchOne"
     assert data["GIT"] == "/usr/bin/git"
+    assert data["AUTH"] is True
 
 
 def test_write_settings_file_roundtrip(settings_path: Path) -> None:
