Skip to content

Configuration: one registry, one installation .env, one secrets directory

Refs #105/#106 (one installation input) and #108 (portable settings). Phase 6 (templated units, non-root service accounts) is tracked separately in #110.

Piece What it is
core/autominer/settings_registry.py The only list of settings the core, adapters and scripts read: name, type, default, secrecy, service scope, feature, help. Stdlib-only and loadable by file path.
.env.example Generated from the registry (autominer config template > .env.example). A test fails when it is stale. Non-secret settings only.
Installation .env One ignored, mode-0600 file per installation (repository root). Non-secret configuration: paths, URLs, tuning.
$AUTOMINER_HOME/env/*.env Per-service EnvironmentFiles rendered from .env by scripts/operations/configure_env.py. Never edited by hand. Only the deploy/ units read them; the service install.sh installs has no EnvironmentFile.
$AUTOMINER_SECRETS_DIR/NAME One mode-0600 file per secret in a mode-0700 directory (default $AUTOMINER_HOME/secrets). Written by autominer secret set, autominer setup and the Settings page.
DB settings rows App settings edited in the web UI. Eight of them overlap the registry — the service URLs yomitan.url (AUTOMINER_YOMITAN_URL), anki.url (ANKICONNECT_URL), evidence.asr_url (AM_PROBE_ASR_URL), sync.separation_url (AM_SEPARATOR_URL), acquire.indexer_url (AUTOMINER_INDEXER_URL), acquire.deluge_url (AUTOMINER_DELUGE_URL) and vpn.proxy_url (AUTOMINER_VPN_PROXY) (service_urls.ROWS), and mine.lang (AUTOMINER_LANG, the studied languages) — and the environment wins, except for anki.url, where the saved row wins over ANKICONNECT_URL.

Nothing reads the environment at import time. Every consumer asks the registry at call time, so a re-rendered EnvironmentFile (after a restart), a secret written by the UI (immediately) or a test’s monkeypatch.setenv all behave the same way. The CLI and the package never load .env implicitly.

Installing the package writes the console script inside the virtualenv (<checkout>/core/.venv/bin/autominer), which is on nobody’s PATH: a fresh login shell answers autominer: command not found, and every documented command has to be spelled with the venv path. Link it once:

Terminal window
core/.venv/bin/autominer install-command # root: /usr/local/bin, else ~/.local/bin
core/.venv/bin/autominer install-command --bin-dir ~/bin
core/.venv/bin/autominer install-command --dry-run # say what it would do, change nothing
autominer install-command --force # replace what is already there
  • It links the script of the interpreter that runs it, so a checkout or a venv that moved re-links itself: run the command again from the new location. Non-root installs are not a special case; only the default directory differs.
  • It refuses to overwrite anything that is not an autominer launcher (exit 1, naming what is in the way) until you pass --force, and it never writes through a symlink — the new link is created beside the target and moved onto it atomically. It also warns when a different autominer is earlier on PATH.
  • It edits no shell profile. When the directory is not on PATH the output prints the exact line to add; a bare export PATH=… would last only for the current shell, which is not an installation.
  • deploy/reset-pi-from-repo.sh runs it into /usr/local/bin after building the venv, so a deployed Pi has the command in every login shell.

Verify from a new shell, in an unrelated directory: autominer --help and autominer doctor.

Terminal window
autominer # the overview, instead of an argparse usage error
autominer help # first run, topics, where a value comes from
autominer help settings [--all] # every setting, by feature (advanced with --all)
autominer help ANKICONNECT_URL # one setting: type, default, how to set it
autominer help anki # one feature, with a copyable worked example
autominer help config # .env vs. environment vs. rendered files; restarts
autominer help secrets # the secrets CLI and what never gets printed
autominer help install # putting the command on PATH
autominer help services # which unit reads which rendered file

Every description, type and default comes from the registry, so CLI help and .env.example cannot drift. Help reports what a setting is and how to set it; autominer doctor reports what is configured now. Neither prints a value, and an unknown name exits 2 with the closest registered names.

AUTOMINER_HOME resolves to, in order: the explicit variable; /var/lib/autominer when running as root; ${XDG_DATA_HOME:-~/.local/share}/autominer. Every path below derives from it, and every per-item override still wins.

Setting Derived default
AUTOMINER_DB $AUTOMINER_HOME/autominer.db
AUTOMINER_LIBRARY_ROOT $AUTOMINER_HOME/library
AUTOMINER_SOURCES_ROOT $AUTOMINER_LIBRARY_ROOT/MineSrc (see below)
rendered service files $AUTOMINER_HOME/env/
AUTOMINER_SECRETS_DIR $AUTOMINER_HOME/secrets/ (0700)
STREMIO_STATE_FILE, SPOTIFY_STATE_FILE $AUTOMINER_HOME/state/{stremio,spotify}_adapter_state.json
AUTOMINER_ANIBRIDGE_CACHE $AUTOMINER_HOME/cache/anibridge_mappings_v3.json
AUTOMINER_KNOWN_CSV $AUTOMINER_HOME/known-garbage.csv

The tracking state files and the AniBridge cache live only in state/ and cache/. A flat pre-#108 file ($AUTOMINER_HOME/stremio_adapter_state.json, …) is never read; move it there by hand if one is left.

Every clip, screenshot and context is cut on this box, by its own ffmpeg, from the media’s source file. Downloaded sources (Stremio/YouTube videos, podcast audio) go to the sources store:

AUTOMINER_SOURCES_ROOT Sources are kept
blank (default) on this box: $AUTOMINER_LIBRARY_ROOT/MineSrc/{YT,Stremio,Podcast}/
a path on a remote store mounted there, e.g. a NAS share mounted by fstab (NFS/SMB)

Switching: mount the share, create the store’s marker file once (touch <store>/.autominer-sources, on the mounted share itself), set the path, re-render, restart. New downloads go there; sources already downloaded keep the paths they were recorded with, and the retention sweep removes files in either place.

A remote store is used only while it validates: an existing, writable directory, outside the library (and not containing it), on another filesystem, carrying .autominer-sources. The marker is what proves the store itself is there: an unmounted share is an empty directory on this box’s own disk, and a local directory on some other filesystem has no marker either. While the store does not validate, downloads are refused with the reason, autominer doctor reports the core feature as misconfigured, and retention deletes nothing in it (it re-checks right before each deletion). Nothing is written to, or removed from, the wrong place.

  • Non-secret settings: process environment (on a host installed with the deploy/ units that is the rendered EnvironmentFile; the unit install.sh writes has no EnvironmentFile, so there neither .env nor the rendered files reach the service) → for the overlapping settings only, the DB row (AUTOMINER_YOMITAN_URL → yomitan.url; ANKICONNECT_URL → anki.url; AM_PROBE_ASR_URL → evidence.asr_url; AM_SEPARATOR_URL → sync.separation_url; AUTOMINER_INDEXER_URL → acquire.indexer_url; AUTOMINER_DELUGE_URL → acquire.deluge_url; AUTOMINER_VPN_PROXY → vpn.proxy_url; AUTOMINER_LANG → mine.lang, whose own fallback is ja) → the registry default. A blank value counts as unset.

  • AnkiConnect URL (the exception): the anki.url row saved on the Settings page → ANKICONNECT_URL, which only stands in until a URL is saved → http://127.0.0.1:8765, AnkiConnect on the core’s own machine. A save applies at once, no restart. autominer doctor shows which one is in force (settings row, an env label, or default), and when Anki cannot be reached the Settings page and the error name the host that was asked.

  • The same collection under another profile name: on a second computer, or after a rename, sent cards keep being checked. Each check proves the match from what it reads: at least 60% of the cards sent under the other name, and at least 3, must be present with their auto:: tags. A name with fewer than 3 sent cards needs all of them. Another profile of the same Anki never counts. A card sent under the other name counts as deleted only after this Anki has shown it once, so cards not synced here yet are left alone. The known-word cache adopts a renamed profile on the same proof, when the old name is no longer one of Anki’s profiles: the read re-stamps the cache and the sent cards under the new name, and Settings shows 「プロファイル名の変更を検出」. After that, a cached note or a sent card missing from the collection is dropped only once this Anki has shown it. A switch to another listed profile, or a proof that fails, still refuses the read; Today and Settings then show why auto-mine is held and the one action that resolves it. A refused read is asked again when the open profile changes, or every 15 minutes. Through AnkiConnect, a copied collection that carries the same tags looks the same as a synced one.

  • Another collection under the same profile name: a fresh 「Main」 on a new PC that has not synced from AnkiWeb yet. With at least 3 cards sent under the name, whatever would forget or unlink something because Anki lacks it runs the same proof first (at least 60% of them, and at least 3, present with their auto:: tags): the cache read, the sent-card check, a word asked about by a send or the editor, and the audit scan. A read or check that forgets nothing asks nothing more. When the proof fails, nothing is written: no known word is forgotten, no sent card unlinked, no attempt marked deleted. Today and Settings say the collection looks different, with 「全体を読み直す」. Syncing from AnkiWeb resolves it at the next read. 「全体を読み直す」 on such a collection starts the cache over and accepts it until the next check of every sent card, which unlinks those it lacks. With 3 or 4 cards sent, the proof needs 3 of them, so deleting 2 of 4 (or 1 of 3) is refused until 「全体を読み直す」. With fewer than 3 sent, the proof cannot tell, and nothing changes.

  • Secrets:

    1. the process environment (NAME), which on an installed host includes a secret still left in .env (deprecated, see below);
    2. the file named by NAME_FILE, when set;
    3. $AUTOMINER_SECRETS_DIR/NAME;
    4. for the Stremio and Spotify adapter secrets only, the adapter’s rendered $AUTOMINER_HOME/env/{stremio,spotify}.env (source env/stremio.env, env/spotify.env). This is how the core and doctor see an adapter secret still left in .env, which is rendered only into the adapter’s file.

    The pre-#108 /root/.autominer_* key files and /root/.bw_session are never read.

    ANKICONNECT_KEY_FILE is accepted as the deprecated spelling of ANKICONNECT_API_KEY_FILE.

A secret file is read without following a final symlink, without blocking on a FIFO, only when it is a regular file, bounded to 64 KiB, and only as UTF-8.

  • A file at a configured location (NAME_FILE, or the secrets file) that exists but cannot be used is treated as unset, logged once as a warning, and reported by doctor as misconfigured.
  • An optional legacy location that cannot be read (for example /root on a non-root host) is unset with a warning and is only a detail line in doctor, never a misconfiguration.
  • Neither case is ever an unhandled exception.

An empty secret file means “explicitly unset”. It also stops the legacy fallbacks (see autominer secret unset below).

Features, autominer doctor and the Settings page

Section titled “Features, autominer doctor and the Settings page”
Feature Needs Optional
Core ledger + web UI nothing (AUTOMINER_HOME derived) AUTOMINER_DB, AUTOMINER_LIBRARY_ROOT
Stremio watch tracking STREMIO_AUTH_KEY (Settings › サービス, the setup page, autominer secret set or stremio_login.py) poll/replay tuning
Stremio acquisition a search (acquire.indexer_url, with INDEXER_API_KEY for Prowlarr) and Deluge (acquire.deluge_url, DELUGE_PASSWORD): Settings › サービス, self-host.md vpn.proxy_url, torrent.vpn
Anime subtitles JIMAKU_API_KEY JIMAKU_API_BASE
Subtitle candidates (Animetosho) nothing (no account exists) ANIMETOSHO_FEED_BASE, ANIMETOSHO_SITE_BASE, ANIMETOSHO_MIN_INTERVAL_MS, ANIMETOSHO_USER_AGENT
Subtitle candidates (OpenSubtitles) OPENSUBTITLES_API_KEY OPENSUBTITLES_API_BASE, OPENSUBTITLES_USER_AGENT, OPENSUBTITLES_MIN_INTERVAL_MS
ASR transcription + translation (OpenAI) OPENAI_API_KEY asr.model, translate.model
ASR (ElevenLabs Scribe) ELEVENLABS_API_KEY asr.provider, asr.model:elevenlabs
Translation (Gemini) GEMINI_API_KEY translate.provider, translate.model:gemini
YouTube acquisition the first of AUTOMINER_YTDLP, the yt-dlp installing YouTube downloaded ($AUTOMINER_HOME/programs/youtube), one beside the venv’s Python, yt-dlp on PATH, /usr/local/bin/yt-dlp
Anki export nothing for Anki on the core’s machine (http://127.0.0.1:8765); else the anki.url setting, or ANKICONNECT_URL until one is saved ANKICONNECT_API_KEY (advanced: only for an AnkiConnect exposed beyond localhost that requires a key)
Dictionary enrichment AUTOMINER_YOMITAN_URL or the yomitan.url setting; without either, a Yomitan API at http://127.0.0.1:19633, else the built-in Yomitan (yomitan/, Node 22.13+, install.md) AUTOMINER_YOMITAN=0 to disable; AUTOMINER_YOMITAN_BUILTIN=0 never starts the built-in one, =1 starts it without asking 19633
ReVanced (Android YouTube) ingest AUTOMINER_REVANCED_SECRET session gap
Spotify tracking all three SPOTIFY_* credentials poll/backoff tuning
Off-host DB backup AUTOMINER_BACKUP_SSH_HOST AUTOMINER_BACKUP_SSH_USER, _SSH_KEY, _REMOTE_DIR (default autominer-backups), _KEEP (14)
Terminal window
autominer doctor # same as: autominer config check
autominer doctor --env-file .env # include a .env you have not rendered yet
autominer doctor --online # one cheap read-only request per configured provider
autominer doctor --json --verbose

Each feature row is configured, not configured or misconfigured. The following all count as misconfigured:

  • a partial Spotify or backup set;
  • an unreadable configured secret file;
  • a bad URL or number;
  • an AUTOMINER_YTDLP that is not executable;
  • an AUTOMINER_HOME, DB or library location this user cannot write.

For every setting the row shows where the live value comes from: env, env/<service>.env, .env (render to apply), secrets file, file (NAME_FILE), settings row, default or unset. It never shows the value, masked or otherwise.

The doctor reads the process environment and then the rendered files in $AUTOMINER_HOME/env (or --rendered-dir). Run it as the service user (root on the Pi) to see what the services see; unreadable files become a note.

Exit codes:

Code Meaning
0 Every configured feature is healthy. Unconfigured optional features are not failures.
1 A feature is misconfigured, or failed its --online probe (auth failed / unreachable).
2 Usage error.

--online probes are read-only, opt-in, and never run in tests or CI:

Feature Probe
Stremio acquisition the search, Deluge and the VPN proxy: one read-only request each
OpenAI GET /v1/models
Jimaku one search
Stremio getUser
AnkiConnect version
Yomitan one termEntries lookup

Spotify is skipped, because a token refresh may rotate the refresh token.

GET /v1/config/status returns the same feature table, with no values and no paths, and makes no network request. It layers the rendered service files over the core’s own environment, so settings only other services receive (the backup target, adapter credentials) are reported too. The Settings page shows it under 「概要」→「構成の状態」 — one card, one id="configStatus" (issue #240: a second copy in「字幕の同期」took every update, because getElementById returns the first match). GET /v1/settings/openai_key and /v1/yomitan/status stay as before. The key endpoint also reports an error for an unreadable file; the Yomitan status reports configured: false when no URL is set.

GET/POST /v1/settings/keys/{name} (issue #225) is the same masked status and the same 0600-file write, addressed by registry secret name, so the 「AI 連携」tab can offer one key field per provider. Only the names the UI offers are reachable — OPENAI_API_KEY, ELEVENLABS_API_KEY and GEMINI_API_KEY; anything else answers 404, including real registry secrets such as SPOTIFY_CLIENT_SECRET that belong to autominer secret set.

Terminal window
core/.venv/bin/autominer install-command # once: the command on PATH (#122)
autominer setup # interactive; asks per feature
autominer setup --non-interactive < answers.env # KEY=value lines

Interactive setup:

  • asks which features to enable and prompts only for the settings they need;
  • reads secrets with getpass;
  • writes non-secret values into the installation .env through the same literal-token updater configure_env.py uses, and secrets into the secrets directory;
  • validates every answer (URLs, numbers, token characters) before writing anything;
  • ends by running the doctor, offering the online checks, and printing the render/restart commands.

It never restarts a service. It also never rewrites an existing .env wholesale: a missing file is created exclusively (mode 0600) from the generated template; an existing one only has the chosen keys replaced in place, comments and other keys untouched. A symlinked .env is refused.

--non-interactive reads the .env literal syntax from stdin. Blank values are skipped. Unknown keys and invalid values abort before anything is written, and the error names the key, not the value. Every secret target is checked (no symlinked or non-regular file or directory) before the .env is touched. The exit code is the doctor’s.

Setup prints where secrets will go. Run it as the user the services run as (root on the Pi), or set AUTOMINER_HOME in the .env, so the secrets land where the services read them.

Terminal window
autominer secret set JIMAKU_API_KEY # prompt (getpass), or one line from stdin
autominer secret set OPENAI_API_KEY < /root/.autominer_openai_key # migrate a key file
autominer secret unset JIMAKU_API_KEY
autominer secret list # names, set/unset, source; never values
  • Values never go on the command line. Control characters and empty values are refused. Files are written through a temp file and an atomic rename, with mode 0600, into a 0700 directory. A symlinked target or directory is refused.
  • The core re-reads a secret on every use: no re-render and no restart. Spotify tracking reads its three credentials when AutoMiner starts, so restart AutoMiner (deploy/safe-restart.sh on a Pi) after changing them.
  • A value set in the environment or the .env wins over the secrets file. set and unset say so by name.
  • unset removes the stored file. When that would bring a value in the rendered adapter file back to life (an adapter secret still in .env), it writes an empty tombstone file instead, so that value stays ignored. The rendered file is never edited automatically; remove the line from .env and re-render.
  • When the environment or .env still provides the secret, unset prints STILL SET via … and exits 1 rather than claiming it is off. The Settings page’s 空欄で保存 uses the same rule and then shows what still resolves.
  • Secrets in .env are deprecated. They still render into their service’s file for this release, and configure_env.py prints a names-only warning. The next release rejects them. Move each with autominer secret set NAME, delete the line, and re-render.
  • Least privilege. The renderer passes each service only the *_FILE paths of the secrets it may read (for example, spotify.env gets the three Spotify paths, nothing else). Until the Phase 6 service accounts (#110) every service runs as root, so this is advisory. With per-service users, file ownership enforces it.
Setting Behaviour when unset
ANKICONNECT_URL and no anki.url row Not a “not configured” state: core asks AnkiConnect at http://127.0.0.1:8765. With no Anki there the connection is refused at once, and the error names that host and says it is the default address.
AUTOMINER_YOMITAN_URL and no yomitan.url row Core asks http://127.0.0.1:19633 once at start and uses it when it answers; else it starts the built-in Yomitan when it is installed (and AUTOMINER_YOMITAN_BUILTIN is not 0; with 1, 19633 is not asked). With neither, enrichment is skipped without a request, exactly like an unreachable server, and the Settings page says 未設定.
AUTOMINER_BACKUP_SSH_HOST The backup timer prints “backup not configured” and exits 0. A partial set exits 1.
Extension core URL Nothing is sent. Events are counted as not configured, not failed, and the popup shows a “set core URL” state.
AUTOMINER_CORE_URL (Windows relay agent) The agent refuses to start with a clear error. Stremio and Spotify tracking inside autominer serve post to the address that serve listens on; autominer doctor asks http://127.0.0.1:8801 for the trackers’ states.
Stremio or Spotify credentials That platform’s tracker does not start and is not listed in autominer doctor or /healthz trackers. Once the platform is installed (Settings › Sources › Platforms), it starts within 30 seconds of the credentials being stored, without a restart; uninstalling the platform stops it.
AUTOMINER_TRACKING On: every installed platform with its credentials is tracked. 0 runs no tracker, so a QA copy or a second AutoMiner holding the real credentials reads nothing from the learner’s accounts.
scripts/diagnostics/audit_bridge.py Takes --anki-url/--core-url or ANKICONNECT_URL/AUTOMINER_CORE_URL. There are no host defaults.
Terminal window
cd /opt/AutoMiner
python3 scripts/operations/configure_env.py --input .env --check
# Explicit installation step, not a validation command:
python3 scripts/operations/configure_env.py --input .env --output-dir /var/lib/autominer/env

The secrets directory written into each *_FILE path is resolved from the .env (AUTOMINER_SECRETS_DIR, else AUTOMINER_HOME), exactly as autominer secret set resolves it, so the two cannot diverge. --secrets-dir overrides it only for scratch renders.

The renderer requires an explicit output directory, does not contact providers, never starts services, and never prints values. Blank values are omitted so the registry defaults apply. A partial Spotify credential set is an error. It counts credentials stored in the secrets directory as well as .env values.

--enabled spotify / --enabled stremio returns success only for a configured adapter, again counting the secrets directory. Validation proves syntax and scopes; autominer doctor --online is the only thing that talks to providers.

One KEY=value per line, UTF-8 (BOM and CRLF accepted), blank lines and full-line # comments. Use single quotes for literal values containing $, #, spaces, or double quotes (e.g. AUTOMINER_BACKUP_SSH_USER='Backup User'). Double-quoted/plain values may not contain $ or backticks.

There is no variable/command expansion, escape syntax, multiline value, export, or inline comment. Use forward slashes for paths, including Windows paths.

Unknown or duplicate keys (including a key given under both its current and its deprecated name) are errors, reported without their values. This restricted subset has the same literal meaning in Docker Compose’s dotenv reader.

Adding a setting means adding it to the registry, with its scope, and regenerating .env.example. CI checks for stray os.environ reads, template drift, and personal hosts or /root/ paths.

Generated files are mode 0600 in a mode-0700 directory, replaced atomically per file after every destination is preflighted. Symlink destinations are refused. Use a trusted output directory, and do not render concurrently into an attacker-writable parent. This is not a multi-file transaction: re-render after an interrupted disk write before restarting any service.

File Carries
env/autominer.env core settings, plus the core’s secret *_FILE paths
env/stremio.env Stremio settings, the core URL, and STREMIO_AUTH_KEY_FILE
env/spotify.env Spotify settings, the core URL, and the three Spotify *_FILE paths
env/qa-purge.env DB/library paths and AUTOMINER_HOME only; no provider credentials
env/backup.env DB path and the backup SSH settings (new in #108)

Compose: .env is an interpolation input, never a service env_file.

Existing Pi installation: deliberate migration (§4 of #108)

Section titled “Existing Pi installation: deliberate migration (§4 of #108)”

No secret is discovered or migrated automatically. Work through this in the approved deployment window, with private mode-0600 backups of the .env, /var/lib/autominer/env/, any /root/.autominer_* key files and the installed units.

  1. Before deploying, record which features are live today. From a scratch checkout of the new release (as root, read-only against the live rendered files):

    Terminal window
    core/.venv/bin/autominer doctor --rendered-dir /var/lib/autominer/env

    Compare the running process’s variable names (never values) with the .env: tr '\0' '\n' < /proc/$(systemctl show -p MainPID --value autominer)/environ | cut -d= -f1 | sort.

  2. Make the .env set explicitly every value the old code supplied as a default:

    • AUTOMINER_LIBRARY_ROOT — the code default /mnt/library is gone; the Pi uses /var/lib/autominer/library.
    • ANKICONNECT_URL=http://<anki-computer>:8765
    • AUTOMINER_YOMITAN_URL=http://<anki-computer>:19633, or confirm the yomitan.url settings row is set (Settings page →「Yomitan API」).
    • Backup (the script’s constants are gone; unset means “not configured”, exit 0): AUTOMINER_BACKUP_SSH_HOST=<backup-host>, AUTOMINER_BACKUP_SSH_USER=<user>, AUTOMINER_BACKUP_SSH_KEY=/root/.ssh/<key>, AUTOMINER_BACKUP_REMOTE_DIR=<remote-dir>.
  3. Key files: the /root/.autominer_* key files are no longer read. Move them before deploying:

    Terminal window
    autominer secret set OPENAI_API_KEY < /root/.autominer_openai_key
    autominer secret set ANKICONNECT_API_KEY < /root/.autominer_ankiconnect_key

    Delete the legacy files yourself only after doctor shows secrets file.

  4. Secrets still in .env keep working this release, with a warning on every render. Moving them is optional now and mandatory before the next release.

  5. Tracking state and cache are read only from state/ and cache/. To move a flat pre-#108 file, stop AutoMiner and run mv /var/lib/autominer/stremio_adapter_state.json /var/lib/autominer/state/, then start it again (same for Spotify; the AniBridge cache goes to cache/).

  6. Run configure_env.py --check, render to a scratch directory, and inspect the key names and scopes locally. reset-pi-from-repo.sh then renders, creates secrets/, state/ and cache/ (0700), installs the backup unit with its new optional EnvironmentFile=-/var/lib/autominer/env/backup.env, and installs the weekly report as a symlink to the repository copy, so it finds the registry. The script is a deployment action, not a validation command.

  7. After the deploy, autominer doctor on the production host must show the same set of configured features as step 1.

  8. Extension: update to 0.8.0 and reload it. The pre-granted Pi host permission is gone, so open the popup, enter the core’s tailnet address (for example http://<server>:8801), Save settings, and accept the permission prompt. Until then events are counted as not configured and nothing is sent.

  9. Windows relay agent (rollback only): start it with AUTOMINER_CORE_URL=http://<server>:8801. The audit bridge needs --anki-url/--core-url or the same variables.

  10. Rollback: check out the previous release, restore the old units, reload systemd and restart. The old release ignores secrets/, state/ and cache/, and the /root key files and flat state files were never touched. Anything written only to the secrets directory must be put back where the old release reads it.

The Stremio login helper now stores only STREMIO_AUTH_KEY in the secrets directory. The adapter reads it on the next poll, and the helper warns when a .env value would still win. It is a real credential/network operation, not part of tests.

uv venv .venv && uv pip install -p .venv/bin/python -e ".[test,lint]" && .venv/bin/pytest tests/ needs no extra flags or variables. The suite gives every test a private AUTOMINER_HOME, removes the caller’s AutoMiner variables, and points the legacy key-file fallbacks at paths that do not exist.

It only moves pytest’s basetemp to /opt/AutoMiner/.pytest_tmp where that checkout exists and is writable (the Pi’s tmpfs guard). The one documented filesystem exception is the executable-bit comparison in test_repository_layout.py, which cannot hold on a DrvFs /mnt/c checkout.

The Device clip worker and the Docker Compose media stack (zurg, rclone and the worker) were removed: every clip is cut on this box. Their keys (AM_CLIPWORKER_URL, AM_CLIPWORKER_TIMEOUT, LIBRARY_ROOT, DEBRID_MNT, VFS_CACHE, ZURG_DATA, VFS_MAX, TZ) are still accepted in an existing .env so an upgrade validates, are ignored, and configure_env.py names each one with a warning so the line can be deleted.