> For the complete documentation index, see [llms.txt](https://cloakedkeys.gitbook.io/ofsc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloakedkeys.gitbook.io/ofsc/reference-and-help/reference/env.md). Agents can also search and read this documentation through its [MCP server](https://cloakedkeys.gitbook.io/ofsc/~gitbook/mcp).

# Environment defaults

These are the built-in defaults the app reads with `of_env.getattr(KEY)` (`ofscraper/utils/of_env/of_env.py`). They are loaded once from the files in `ofscraper/utils/of_env/values/` and cached.

Two kinds of environment variable override a default:

* The listed `OFSC_*` variable. It is read once, when the defaults load.
* A variable named after the bare key, for example `DATABASE_TIMEOUT`. It is read on every lookup and converted to the default's type.

Before the app reads either kind, it loads these into the environment. Each one overrides variables that are already set (`ofscraper/utils/of_env/load.py`):

1. A `.env` file found by python-dotenv. It searches upward from `ofscraper/utils/of_env/`. It searches from the working folder only in the standalone binaries, the REPL or a debugger.
2. The env files given with `--env-files`, or the ones named in `advanced_options.env_files` when the option isn't used. They load in order, and later files win.

The values shown are the defaults with no environment variables set. Paths under your home directory appear as `{home_directory}`. Each description comes from the comment above the value in the source, where there is one.

The larger internal reference tables live on their own pages:

* [Rate-limit & backoff settings](https://cloakedkeys.gitbook.io/ofsc/reference-and-help/reference/env/env-ratelimits.md): per-request-type rate-limit and 403 backoff keys
* [API addresses & URLs](https://cloakedkeys.gitbook.io/ofsc/reference-and-help/reference/env/env-urls.md): internal OnlyFans API endpoints, dynamic rule sources and other URLs
* [Unused legacy defaults](https://cloakedkeys.gitbook.io/ofsc/reference-and-help/reference/env/env-unused.md): compatibility keys defined in `of_env/values/` but not currently read

## Contents

* [Read directly from the environment](#read-directly-from-the-environment)
* [Downloads and actions](#downloads-and-actions)
* [Config defaults, dates and paths](#config-defaults-dates-and-paths)
* [Network, retries and rate limits](#network-retries-and-rate-limits)
* [DRM, CDM and Discord](#drm-cdm-and-discord)
* [Logging, progress and UI](#logging-progress-and-ui)

## Read directly from the environment

The app reads these with `os.getenv` where it uses them, not through `of_env.getattr`. Only the variable itself sets them.

| Variable                     | Description                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DISPLAY`                    | <p><strong>Default:</strong> <code>None</code> · <strong>Read in:</strong> <code>ofscraper/classes/table/utils/open\_folder.py</code>.<br>Check table, Linux only: with neither this nor <code>WAYLAND\_DISPLAY</code> set there's no desktop, so Open Download Folder and <code>o</code> show the folder's path instead of running <code>xdg-open</code>.</p> |
| `OFSC_FANSLY_API_BASE`       | <p><strong>Default:</strong> <code>f'https\://{API\_HOST}/api/v1/'</code> · <strong>Read in:</strong> <code>ofscraper/sites/fansly/constants.py</code>.<br>Base URL of the Fansly API that Fansly requests go to.</p>                                                                                                                                          |
| `OFSC_FANSLY_AUTH_FILE_NAME` | <p><strong>Default:</strong> <code>'fansly\_auth.json'</code> · <strong>Read in:</strong> <code>ofscraper/sites/fansly/constants.py</code>.<br>Name of the Fansly credentials file in the profile folder.</p>                                                                                                                                                  |
| `STASH_API_KEY`              | <p><strong>Default:</strong> <code>None</code> · <strong>Read in:</strong> <code>ofscraper/commands/stash\_sync.py</code>.<br><code>stash\_sync</code> only: the Stash API key, for a Stash with a password. <code>--api-key</code> overrides it.</p>                                                                                                          |
| `STASH_URL`                  | <p><strong>Default:</strong> <code>DEFAULT\_URL</code> · <strong>Read in:</strong> <code>ofscraper/commands/stash\_sync.py</code>.<br><code>stash\_sync</code> only: Stash's GraphQL URL. <code>--url</code> overrides it.</p>                                                                                                                                 |
| `WAYLAND_DISPLAY`            | <p><strong>Default:</strong> <code>None</code> · <strong>Read in:</strong> <code>ofscraper/classes/table/utils/open\_folder.py</code>.<br>Check table, Linux only: see <code>DISPLAY</code>.</p>                                                                                                                                                               |

## Downloads and actions

### Downloads

Defined in `ofscraper/utils/of_env/values/action/download.py`.

#### File and Path

| Variable / Key      | Description                                                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `MAXFILE_SEMAPHORE` | **Default:** `None`. Overrides `performance_options.download_sems` as the maximum number of concurrent downloads. When unset, `download_sems` is used. |
| `PATH_STR_MAX`      | **Default:** `200`. Maximum length of the file path shown on each download's progress bar before it is shortened (with `....`).                        |
| `TABLE_STR_MAX`     | **Default:** `100`. Read only by `texthelper()` in `commands/check.py`, which nothing calls, so it has no effect.                                      |

#### Download

| Variable / Key             | Description                                                                                                                                                                                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SPACE_DOWNLOAD_MESSAGE`   | **Default:** `'Skipping download because space min has been reached'`. Error message raised when free disk space drops below `system_free_min`. The retry handler also matches this string so the download isn't retried. |
| `DOWNLOAD_NUM_TRIES`       | **Default:** `3`. Maximum number of download attempts outside check mode.                                                                                                                                                 |
| `DOWNLOAD_NUM_TRIES_CHECK` | **Default:** `3`. Maximum number of download attempts in check mode (`*_check` commands).                                                                                                                                 |

#### Progress Bar

| Variable / Key         | Description                                                                                                |
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
| `SHOW_DL_CHUNKS`       | **Default:** `False`. When on, logs download chunk progress at `SHOW_DL_CHUNKS_LEVEL` instead of `TRACE`.  |
| `SHOW_DL_CHUNKS_LEVEL` | **Default:** `'Warning'`. Log level used for download chunk progress messages when `SHOW_DL_CHUNKS` is on. |

#### Forced keys

| Variable / Key                                                                               | Description                                                                                                                                                       |
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `API_FORCE_KEY`                                                                              | **Default:** `False`. Adds the `FORCED_NEW` action to OnlyFans API, download and metadata requests. Currently has no effect: request signing ignores that action. |
| <p><code>OFSC\_VERIFY\_ALL\_INTEGRITY</code><br>Key: <code>VERIFY\_ALL\_INTEGRITY</code></p> | **Default:** `False`. Default for `download_options.verify_all_integrity` (checks non-DRM video/audio downloads and Fansly streams with `ffprobe`).               |

### Likes

Defined in `ofscraper/utils/of_env/values/action/like.py`.

| Variable / Key                      | Description                                                                                                                                   |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `MAX_SLEEP_DURATION_LIKE`           | **Default:** `3.5`. Upper bound, in seconds, of the random pause between like or unlike requests (and before retrying an already-liked post). |
| `MIN_SLEEP_DURATION_LIKE`           | **Default:** `0.9`. Lower bound, in seconds, of the random pause between like or unlike requests (and before retrying an already-liked post). |
| `LIKE_MAX_RETRIES`                  | **Default:** `5`. Maximum number of attempts for a failed like or unlike request.                                                             |
| `DOUBLE_TOGGLE_SLEEP_DURATION_LIKE` | **Default:** `5`. Pause, in seconds, before sending a second unlike request when a post was already unliked and toggled to liked.             |

### Metadata

Defined in `ofscraper/utils/of_env/values/action/metadata.py`.

| Variable / Key                                                                 | Description                                                                                                                                         |
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `QUALITY_UNKNOWN_DEFAULT`                                                      | **Default:** `'source'`. Fallback value for the `{quality}` placeholder when a media item's quality isn't known (such as non-videos or text files). |
| <p><code>OFSC\_ALT\_FORCE\_KEY</code><br>Key: <code>ALT\_FORCE\_KEY</code></p> | **Default:** `True`. When on, the `metadata` command signs its request for protected (MPD) media (`commands/metadata/manager.py`).                  |

### Output and file handling

Defined in `ofscraper/utils/of_env/values/general.py`.

#### Output and Display

| Variable / Key                                                                                         | Description                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_SUPRESS\_OUTPUTS</code><br>Key: <code>SUPRESS\_OUTPUTS</code></p>                       | **Default:** `['CRITICAL', 'ERROR', 'LOW', 'OFF', 'PROMPT', 'WARNING']`. Output levels (`--output`) at which `lowstdout()` silences standard output.                                  |
| <p><code>OFSC\_SHOW\_AVATAR</code><br>Key: <code>SHOW\_AVATAR</code></p>                               | **Default:** `True`. Whether to include the creator's avatar URL in scrape headers and summaries.                                                                                     |
| <p><code>OFSC\_SHOW\_RESULTS\_LOG</code><br>Key: <code>SHOW\_RESULTS\_LOG</code></p>                   | **Default:** `True`. Whether to print the final run summary log at exit.                                                                                                              |
| <p><code>OFSC\_MODEL\_PRICE\_PLACEHOLDER</code><br>Key: <code>MODEL\_PRICE\_PLACEHOLDER</code></p>     | **Default:** `'Unknown_Price'`. Fallback value for price placeholders (`{current_price}`, `{regular_price}`, `{promo_price}`, `{renewal_price}`) when a creator's model isn't loaded. |
| <p><code>OFSC\_DELETED\_MODEL\_PLACEHOLDER</code><br>Key: <code>DELETED\_MODEL\_PLACEHOLDER</code></p> | **Default:** `'modeldeleted'`. Fallback username prefix used for deleted accounts whose real username isn't recorded.                                                                 |
| <p><code>OFSC\_APP\_TOKEN</code><br>Key: <code>APP\_TOKEN</code></p>                                   | **Default:** `'33d57ade8c02dbc5a333db99ff9ae26a'`. The OnlyFans `app-token` header value sent on API requests.                                                                        |
| <p><code>OFSC\_CONTINUE\_BOOL</code><br>Key: <code>CONTINUE\_BOOL</code></p>                           | **Default:** `True`. When off, skips the interactive "Do you want to continue with script" prompt and carries on as if you answered Yes.                                              |
| <p><code>OFSC\_FILE\_COUNT\_PLACEHOLDER</code><br>Key: <code>FILE\_COUNT\_PLACEHOLDER</code></p>       | **Default:** `True`. When on, appends `_<count>` to multi-media filenames when `file_format` doesn't include a unique filename or media ID placeholder.                               |
| <p><code>OFSC\_FILTER\_SELF\_MEDIA</code><br>Key: <code>FILTER\_SELF\_MEDIA</code></p>                 | **Default:** `True`. Whether to skip the account's own media: the media in messages you sent, and your own profile's media when you scrape it. Set it to False to download them.      |
| <p><code>OFSC\_ALLOW\_DUPE\_MEDIA</code><br>Key: <code>ALLOW\_DUPE\_MEDIA</code></p>                   | **Default:** `False`. The default for --allow-dupes: download media that is in several posts once for each post. The option overrides it for one run.                                 |

#### Data Processing and File Handling

| Variable / Key                                                                                       | Description                                                                                                                                            |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>OFSC\_NUMBER\_REGEX</code><br>Key: <code>NUMBER\_REGEX</code></p>                           | **Default:** `'[0-9]'`. Single-character regex class used to match numeric IDs in URLs for `manual` and `*_check` commands.                            |
| <p><code>OFSC\_USERNAME\_REGEX</code><br>Key: <code>USERNAME\_REGEX</code></p>                       | **Default:** `'[^/]'`. Single-character regex class used to match usernames in URLs for `manual` and `*_check` commands.                               |
| <p><code>OFSC\_BUF\_SIZE</code><br>Key: <code>BUF\_SIZE</code></p>                                   | **Default:** `1048576`. Read buffer size, in bytes, used when hashing files (including the duplicate check before a download is moved into place).     |
| <p><code>OFSC\_SKIP\_UNAVAILABLE\_DEFAULT</code><br>Key: <code>SKIP\_UNAVAILABLE\_DEFAULT</code></p> | **Default:** `True`. Default for `advanced_options.skip_unavailable_content`.                                                                          |
| <p><code>OFSC\_EXPIRED\_GRACE\_DEFAULT</code><br>Key: <code>EXPIRED\_GRACE\_DEFAULT</code></p>       | **Default:** `1`. Grace period, in days, after a subscription's expiry during which the creator is still treated as active for filtering and scanning. |

## Config defaults, dates and paths

### General defaults

Defined in `ofscraper/utils/of_env/values/main.py`.

#### Application

| Variable / Key                                                                                                                                                  | Description                                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_SANITIZE\_DB\_DEFAULT</code><br>Key: <code>SANITIZE\_DB\_DEFAULT</code></p>                                                                      | **Default:** `False`. Default for `advanced_options.sanitize_text` (whether post and message text is sanitised before storing in the database).                                                                                       |
| <p><code>OFSC\_RESUME\_DEFAULT</code><br>Key: <code>RESUME\_DEFAULT</code></p>                                                                                  | **Default:** `True`. Default for `download_options.auto_resume` (whether leftover `.part` files are resumed).                                                                                                                         |
| <p><code>OFSC\_CACHE\_DEFAULT</code><br>Key: <code>CACHEDEFAULT</code></p>                                                                                      | **Default:** `'sqlite'`. Default for `advanced_options.cache-mode` (`sqlite`, `json`, `disabled` or `api_disabled`).                                                                                                                  |
| <p><code>OFSC\_KEY\_DEFAULT</code><br>Key: <code>KEY\_DEFAULT</code></p>                                                                                        | **Default:** `'manual'`. Default for `cdm_options.key-mode-default` (`manual`; `cdrm` is deprecated because its service no longer works).                                                                                             |
| <p><code>KEY\_OPTIONS</code><br><em>(bare key only)</em></p>                                                                                                    | **Default:** `['cdrm', 'manual']`. The allowed `cdm_options.key-mode-default` values, taken from `ofscraper/utils/const.py`. Not read from the environment.                                                                           |
| <p><code>OFSC\_FILE\_SIZE\_MAX\_DEFAULT</code><br>Key: <code>FILE\_SIZE\_MAX\_DEFAULT</code></p>                                                                | **Default:** `0`. Default for `content_filter_options.file_size_max` (maximum file size in bytes; 0 means no limit).                                                                                                                  |
| <p><code>OFSC\_FILE\_SIZE\_MIN\_DEFAULT</code><br>Key: <code>FILE\_SIZE\_MIN\_DEFAULT</code></p>                                                                | **Default:** `0`. Default for `content_filter_options.file_size_min` (minimum file size in bytes; 0 means no limit).                                                                                                                  |
| <p><code>OFSC\_MIN\_LENGTH\_DEFAULT</code><br>Key: <code>MIN\_LENGTH\_DEFAULT</code></p>                                                                        | **Default:** `0`. Default for `content_filter_options.length_min` (minimum video duration in seconds; 0 means no limit).                                                                                                              |
| <p><code>OFSC\_MAX\_LENGTH\_DEFAULT</code><br>Key: <code>MAX\_LENGTH\_DEFAULT</code></p>                                                                        | **Default:** `0`. Default for `content_filter_options.length_max` (maximum video duration in seconds; 0 means no limit).                                                                                                              |
| <p><code>OFSC\_TEXTLENGTH\_DEFAULT</code><br>Key: <code>TEXTLENGTH\_DEFAULT</code></p>                                                                          | **Default:** `0`. Default for `file_options.textlength` (maximum post text length in filenames; 0 means no limit).                                                                                                                    |
| <p><code>OFSC\_SPACE\_REPLACER\_DEFAULT</code><br>Key: <code>SPACE\_REPLACER\_DEFAULT</code></p>                                                                | **Default:** `' '`. Default for `file_options.space_replacer` (character replacing spaces in filename text).                                                                                                                          |
| <p><code>OFSC\_PROGRESS\_DEFAULT</code><br>Key: <code>PROGRESS\_DEFAULT</code></p>                                                                              | **Default:** `False`. Default for `advanced_options.downloadbars` (whether to show per-file download progress bars).                                                                                                                  |
| <p><code>OFSC\_SAVE\_PATH\_DEFAULT</code><br>Key: <code>SAVE\_PATH\_DEFAULT</code></p>                                                                          | **Default:** `'{home_directory}/Data/ofscraper'`. Default for `file_options.save_location` (root folder for downloads).                                                                                                               |
| <p><code>OFSC\_DATE\_DEFAULT</code><br>Key: <code>DATE\_DEFAULT</code></p>                                                                                      | **Default:** `'MM-DD-YYYY'`. Default for `file_options.date` (arrow date format for the `{date}` placeholder).                                                                                                                        |
| <p><code>OFSC\_PROFILE\_DEFAULT</code><br>Key: <code>PROFILE\_DEFAULT</code></p>                                                                                | **Default:** `'main_profile'`. Default for `main_profile` (profile folder name in the config directory).                                                                                                                              |
| <p><code>OFSC\_FFMPEG\_DEFAULT</code><br>Key: <code>FFMPEG\_DEFAULT</code></p>                                                                                  | **Default:** `''`. Default for `binary_options.ffmpeg` (path to the ffmpeg executable).                                                                                                                                               |
| <p><code>OFSC\_DISCORD\_DEFAULT</code><br>Key: <code>DISCORD\_DEFAULT</code></p>                                                                                | **Default:** `''`. Default for `discord` (Discord webhook URL for log messages).                                                                                                                                                      |
| <p><code>OFSC\_DOWNLOAD\_SEM\_DEFAULT</code><br>Key: <code>DOWNLOAD\_SEM\_DEFAULT</code></p>                                                                    | **Default:** `6`. Default for `performance_options.download_sems` (number of concurrent downloads).                                                                                                                                   |
| <p><code>OFSC\_FANSLY\_STREAM\_SEGMENTS</code><br>Key: <code>FANSLY\_STREAM\_SEGMENTS</code></p>                                                                | **Default:** `8`. How many files of one Fansly stream (HLS segments, AES-128 keys, DASH segments) are fetched at once before ffmpeg joins them locally (`fansly_stream_download.py`). [Details](#general-defaults).                   |
| <p><code>OFSC\_SILENT\_RECHECKS</code><br>Key: <code>SILENT\_RECHECKS</code></p>                                                                                | **Default:** `3`. How many times to recheck a Fansly video that was saved without sound because the CDN refused its separate audio track and the direct file had no audio (`download/utils/silent.py`). [Details](#general-defaults). |
| <p><code>OFSC\_FANSLY\_FULL\_SCAN\_DAYS</code><br>Key: <code>FANSLY\_FULL\_SCAN\_DAYS</code></p>                                                                | **Default:** `7`. How often, in days, a Fansly download run scans a creator's timeline and messages in full. [Details](#general-defaults).                                                                                            |
| <p><code>OFSC\_TEXT\_TYPE\_DEFAULT</code><br>Key: <code>TEXT\_TYPE\_DEFAULT</code></p>                                                                          | **Default:** `'letter'`. Default for `file_options.text_type_default` (`letter` or `word`).                                                                                                                                           |
| <p><code>OFSC\_TRUNCATION\_DEFAULT</code><br>Key: <code>TRUNCATION\_DEFAULT</code></p>                                                                          | **Default:** `True`. Default for `file_options.truncation_default` (whether long file paths are shortened to fit OS limits).                                                                                                          |
| <p><code>OFSC\_FILENAME\_COLLISION\_DEFAULT</code><br>Key: <code>FILENAME\_COLLISION\_DEFAULT</code></p>                                                        | **Default:** `'media_id'`. What to do when a download's path is already taken by a different media. "media\_id" appends \_\<media\_id>; "overwrite" keeps the old behaviour (one file replaces the other).                            |
| <p><code>OFSC\_MAX\_COUNT\_DEFAULT</code><br>Key: <code>MAX\_COUNT\_DEFAULT</code></p>                                                                          | **Default:** `0`. Default for `download_options.max_post_count` (maximum media items to process per creator; 0 means no limit).                                                                                                       |
| <p><code>OFSC\_TEMP\_FOLDER\_DEFAULT</code><br>Key: <code>TEMP\_FOLDER\_DEFAULT</code></p>                                                                      | **Default:** `None`. Default for `advanced_options.temp_dir` (root folder for `.part` files).                                                                                                                                         |
| <p><code>OFSC\_ROTATE\_DEFAULT</code><br>Key: <code>ROTATE\_DEFAULT</code></p>                                                                                  | **Default:** `True`. Default for `advanced_options.rotate_logs` (whether each run writes its own log file in a per-day folder).                                                                                                       |
| <p><code>OFSC\_SYSTEM\_FREEMIN\_DEFAULT</code><br>Key: <code>SYSTEM\_FREEMIN\_DEFAULT</code></p>                                                                | **Default:** `0`. Default for `download_options.system_free_min` (minimum free disk space in bytes; 0 disables the check).                                                                                                            |
| <p><code>OFSC\_INFINITE\_LOOP\_DEFAULT</code><br>Key: <code>INFINITE\_LOOP\_DEFAULT</code></p>                                                                  | **Default:** `False`. Default for `advanced_options.infinite_loop_action_mode` (whether action mode prompts to continue after each run).                                                                                              |
| <p><code>OFSC\_INCREMENTAL\_DOWNLOADS\_DEFAULT</code>, <code>OFSC\_ENABLE\_AUTO\_AFTER\_DEFAULT</code><br>Key: <code>INCREMENTAL\_DOWNLOADS\_DEFAULT</code></p> | **Default:** `True`. Default for `advanced_options.incremental_downloads` (also reads `OFSC_ENABLE_AUTO_AFTER_DEFAULT`).                                                                                                              |
| <p><code>OFSC\_DEFAULT\_USER\_LIST</code><br>Key: <code>DEFAULT\_USER\_LIST</code></p>                                                                          | **Default:** `'main'`. Default for `advanced_options.default_user_list` (user lists selected when `--user-list` isn't given).                                                                                                         |
| <p><code>OFSC\_DEFAULT\_BLACK\_LIST</code><br>Key: <code>DEFAULT\_BLACK\_LIST</code></p>                                                                        | **Default:** `''`. Default for `advanced_options.default_black_list` (user lists excluded when `--black-list` isn't given).                                                                                                           |
| <p><code>OFSC\_HASHED\_DEFAULT</code><br>Key: <code>HASHED\_DEFAULT</code></p>                                                                                  | **Default:** `None`. Default for `advanced_options.remove_hash_match` (`true`, `false` or `None`).                                                                                                                                    |
| <p><code>OFSC\_BLOCKED\_ADS\_DEFAULT</code><br>Key: <code>BLOCKED\_ADS\_DEFAULT</code></p>                                                                      | **Default:** `False`. Default for `content_filter_options.block_ads` (whether posts matching the ad regex are skipped).                                                                                                               |
| <p><code>OFSC\_DEFAULT\_LOG\_LEVEL</code><br>Key: <code>DEFAULT\_LOG\_LEVEL</code></p>                                                                          | **Default:** `'DEBUG'`. Default log file level when `--log` isn't given.                                                                                                                                                              |
| <p><code>OFSC\_INCLUDE\_LABELS\_ALL</code><br>Key: <code>INCLUDE\_LABELS\_ALL</code></p>                                                                        | **Default:** `False`. When on, `--posts all` (and `--download-area all` / `--like-area all`) also includes the Labels area.                                                                                                           |
| <p><code>OFSC\_LABELS\_CONCURRENCY</code><br>Key: <code>LABELS\_CONCURRENCY</code></p>                                                                          | **Default:** `2`. How many labels are paged at the same time.                                                                                                                                                                         |
| <p><code>OFSC\_DISCORD\_ASYNC</code><br>Key: <code>DISCORD\_ASYNC</code></p>                                                                                    | **Default:** `False`. When on, sends Discord webhook log messages asynchronously instead of synchronously.                                                                                                                            |
| <p><code>OFSC\_USE\_WIV\_CACHE\_KEY</code><br>Key: <code>USE\_WIV\_CACHE\_KEY</code></p>                                                                        | **Default:** `True`. Whether to cache Widevine decryption keys by PSSH (`keyhelpers.py`).                                                                                                                                             |
| <p><code>OFSC\_AFTER\_ACTION\_SCRIPT\_DEFAULT</code><br>Key: <code>AFTER\_ACTION\_SCRIPT\_DEFAULT</code></p>                                                    | **Default:** `None`. Default for `script_options.after_action_script`.                                                                                                                                                                |
| <p><code>OFSC\_POST\_SCRIPT\_DEFAULT</code><br>Key: <code>POST\_SCRIPT\_DEFAULT</code></p>                                                                      | **Default:** `None`. Default for `script_options.post_script`.                                                                                                                                                                        |
| <p><code>OFSC\_SKIP\_DOWNLOAD\_SCRIPT\_DEFAULT</code><br>Key: <code>SKIP\_DOWNLOAD\_SCRIPT\_DEFAULT</code></p>                                                  | **Default:** `None`. Default for `script_options.skip_download_script`.                                                                                                                                                               |
| <p><code>OFSC\_AFTER\_DOWNLOAD\_SCRIPT\_DEFAULT</code><br>Key: <code>AFTER\_DOWNLOAD\_SCRIPT\_DEFAULT</code></p>                                                | **Default:** `None`. Default for `script_options.after_download_script`.                                                                                                                                                              |
| <p><code>OFSC\_NAMING\_SCRIPT\_DEFAULT</code><br>Key: <code>NAMING\_SCRIPT\_DEFAULT</code></p>                                                                  | **Default:** `None`. Default for `script_options.naming_script`.                                                                                                                                                                      |
| <p><code>OFSC\_DOWNLOAD\_LIMIT\_DEFAULT</code><br>Key: <code>DOWNLOAD\_LIMIT\_DEFAULT</code></p>                                                                | **Default:** `0`. Default for `performance_options.download_limit` (maximum download speed in bytes per second; 0 means unlimited).                                                                                                   |

**`FANSLY_STREAM_SEGMENTS` details**

**Environment variable:** `OFSC_FANSLY_STREAM_SEGMENTS` · **Default:** `8`

How many files of one Fansly stream (HLS segments, AES-128 keys, DASH segments) are fetched at once before ffmpeg joins them locally (`fansly_stream_download.py`). Fetched segments are kept so a stopped download can resume. 0 hands the whole stream to ffmpeg, one segment at a time, with no resume. Streams the local downloader can't handle still go to ffmpeg: live HLS (no `#EXT-X-ENDLIST`), HLS with encryption other than AES-128, and DASH that is protected, live, multi-period or uses unsupported addressing. Total concurrent downloads are still capped by `download_sems`.

**`SILENT_RECHECKS` details**

**Environment variable:** `OFSC_SILENT_RECHECKS` · **Default:** `3`

How many times to recheck a Fansly video that was saved without sound because the CDN refused its separate audio track and the direct file had no audio (`download/utils/silent.py`). Each check fetches the audio playlist and its first segment with fresh links, once at the end of the run that saved it and once on each later download run for that creator that includes videos. If the audio succeeds, the video is downloaded again and replaces the silent file once it passes checks. After this many refused checks, the video is kept as is. Checks that fail for other reasons (network, rate limit) don't count. 0 turns rechecks off.

**`FANSLY_FULL_SCAN_DAYS` details**

**Environment variable:** `OFSC_FANSLY_FULL_SCAN_DAYS` · **Default:** `7`

How often, in days, a Fansly download run scans a creator's timeline and messages in full. Between full scans, a run stops an area where the last finished scan began (see `advanced_options.incremental_downloads`). A post that appears later with an older date is found by the next full scan, so this is the longest it can be missed. 0 scans in full every time (`ofscraper/sites/fansly/incremental.py`).

#### Format strings

| Variable / Key                                                                             | Description                                                                                                                          |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>OFSC\_DIR\_FORMAT\_DEFAULT</code><br>Key: <code>DIR\_FORMAT\_DEFAULT</code></p>   | **Default:** `'{model_username}/{responsetype}/{mediatype}/'`. Default for `file_options.dir_format`.                                |
| <p><code>OFSC\_FILE\_FORMAT\_DEFAULT</code><br>Key: <code>FILE\_FORMAT\_DEFAULT</code></p> | **Default:** `'{filename}.{ext}'`. Default for `file_options.file_format`.                                                           |
| <p><code>OFSC\_METADATA\_DEFAULT</code><br>Key: <code>METADATA\_DEFAULT</code></p>         | **Default:** `'{configpath}/{profile}/.data/{model_id}'`. Default for `metadata` (folder pattern for each creator's `user_data.db`). |

#### Fixed values

| Variable / Key                                                                                   | Description                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_RESPONSE\_TYPE\_DEFAULT</code><br>Key: <code>RESPONSE\_TYPE\_DEFAULT</code></p>   | **Default:** a dict of 9 entries (see the source). Default for the `responsetype` map in `config.json` (accepts a JSON object via `OFSC_RESPONSE_TYPE_DEFAULT`).          |
| <p><code>OFSC\_FILTER\_DEFAULT</code><br>Key: <code>FILTER\_DEFAULT</code></p>                   | **Default:** `['Images', 'Audios', 'Videos']`. Default for `download_options.filter` (media types to download; accepts a comma-separated list via `OFSC_FILTER_DEFAULT`). |
| <p><code>OFSC\_SSL\_VALIDATION\_DEFAULT</code><br>Key: <code>SSL\_VALIDATION\_DEFAULT</code></p> | **Default:** `'custom'`. The default for `advanced_options.ssl_verify`, used when the config has no usable value.                                                         |

### Dates

Defined in `ofscraper/utils/of_env/values/date.py`.

| Variable / Key                                                                           | Description                                                                                                            |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_PROMPT\_DATE\_FORMAT</code><br>Key: <code>PROMPT\_DATE\_FORMAT</code></p> | **Default:** `'YYYY-MM-DD'`. Arrow date format for default last-seen dates in the interactive account filter prompts.  |
| <p><code>OFSC\_API\_DATE\_FORMAT</code><br>Key: <code>API\_DATE\_FORMAT</code></p>       | **Default:** `'YYYY-MM-DD HH:mm:ss'`. Arrow date/time format used for scan-range logs and `ofscraper db` date columns. |

### Expiry and timeouts

Defined in `ofscraper/utils/of_env/values/time.py`.

| Variable / Key                                                                                           | Description                                                                                             |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_THIRTY\_EXPIRY</code><br>Key: <code>THIRTY\_EXPIRY</code></p>                             | **Default:** `1800`. Cache lifetime, in seconds, for OnlyFans dynamic signing rules.                    |
| <p><code>OFSC\_DATABASE\_TIMEOUT</code><br>Key: <code>DATABASE\_TIMEOUT</code></p>                       | **Default:** `300`. Timeout, in seconds, for SQLite and PostgreSQL database locks and connections.      |
| <p><code>OFSC\_KEY\_EXPIRY</code><br>Key: <code>KEY\_EXPIRY</code></p>                                   | **Default:** `None`. Cache lifetime, in seconds, for Widevine decryption keys (`None` means no expiry). |
| <p><code>OFSC\_RESPONSE\_EXPIRY</code><br>Key: <code>RESPONSE\_EXPIRY</code></p>                         | **Default:** `5000000`. Cache lifetime, in seconds, for scraped paid-page responses.                    |
| <p><code>OFSC\_DBINTERVAL</code><br>Key: <code>DBINTERVAL</code></p>                                     | **Default:** `86400`. Minimum time, in seconds, between rotating `user_data_copy_N.db` backups.         |
| <p><code>OFSC\_DAY\_SECONDS</code><br>Key: <code>DAY\_SECONDS</code></p>                                 | **Default:** `86400`. Cache lifetime, in seconds, for username-to-model-ID lookups.                     |
| <p><code>OFSC\_THREE\_DAY\_SECONDS</code><br>Key: <code>THREE\_DAY\_SECONDS</code></p>                   | **Default:** `259200`. Cache lifetime, in seconds, for check-mode API caches.                           |
| <p><code>OFSC\_PROFILE\_DATA\_EXPIRY</code><br>Key: <code>PROFILE\_DATA\_EXPIRY</code></p>               | **Default:** `86400`. Cache lifetime, in seconds, for synchronous creator profile lookups.              |
| <p><code>OFSC\_PROFILE\_DATA\_EXPIRY\_ASYNC</code><br>Key: <code>PROFILE\_DATA\_EXPIRY\_ASYNC</code></p> | **Default:** `86400`. Cache lifetime, in seconds, for async creator profile lookups.                    |

### Dynamic rules

Defined in `ofscraper/utils/of_env/values/dynamic.py`.

| Variable / Key                                                                               | Description                                                                                                                                    |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_DYNAMIC\_RULE\_MANUAL</code><br>Key: <code>DYNAMIC\_RULE\_MANUAL</code></p>   | **Default:** `None`. JSON object containing custom OnlyFans dynamic signing rules, used when `dynamic-mode-default` is `manual`.               |
| <p><code>OFSC\_DYNAMIC\_OPTIONS</code><br>Key: <code>DYNAMIC\_OPTIONS</code></p>             | **Default:** `['digitalcriminals', 'manual', 'generic', 'xagler', 'rafa']`. Dynamic rule sources shown in the interactive config menu.         |
| <p><code>OFSC\_DYNAMIC\_OPTIONS\_ALL</code><br>Key: <code>DYNAMIC\_OPTIONS\_ALL</code></p>   | **Default:** a list of 13 items (see the source). Accepted values (including aliases) when validating `advanced_options.dynamic-mode-default`. |
| <p><code>OFSC\_DYNAMIC\_RULE\_DEFAULT</code><br>Key: <code>DYNAMIC\_RULE\_DEFAULT</code></p> | **Default:** `'digital'`. Default for `advanced_options.dynamic-mode-default` when unset or invalid.                                           |

### List names

Defined in `ofscraper/utils/of_env/values/list.py`.

| Variable / Key                | Description                                                                                     |
| ----------------------------- | ----------------------------------------------------------------------------------------------- |
| `OFSCRAPER_RESERVED_LIST`     | **Default:** `'ofscraper.main'`. Built-in user-list name representing all subscriptions.        |
| `OFSCRAPER_RESERVED_LIST_ALT` | **Default:** `'main'`. Short alias for the built-in all-subscriptions list.                     |
| `OFSCRAPER_ACTIVE_LIST`       | **Default:** `'ofscraper.active'`. Built-in user-list name representing active subscriptions.   |
| `OFSCRAPER_ACTIVE_LIST_ALT`   | **Default:** `'active'`. Short alias for the built-in active-subscriptions list.                |
| `OFSCRAPER_EXPIRED_LIST`      | **Default:** `'ofscraper.expired'`. Built-in user-list name representing expired subscriptions. |
| `OFSCRAPER_EXPIRED_LIST_ALT`  | **Default:** `'expired'`. Short alias for the built-in expired-subscriptions list.              |

### File paths

Defined in `ofscraper/utils/of_env/values/path/files.py`.

| Variable / Key                                                                 | Description                                                                                                      |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_CONFIG\_DIR</code><br>Key: <code>configPath</code></p>          | **Default:** `'.config/ofscraper'`. Folder relative to the home directory where `config.json` and profiles live. |
| <p><code>OFSC\_CONFIG\_FILE\_NAME</code><br>Key: <code>configFile</code></p>   | **Default:** `'config.json'`. Name of the main configuration file inside the config folder.                      |
| <p><code>OFSC\_AUTH\_FILE\_NAME</code><br>Key: <code>authFile</code></p>       | **Default:** `'auth.json'`. Name of the OnlyFans credentials file inside the profile folder.                     |
| <p><code>OFSC\_MAIN\_PROFILE\_NAME</code><br>Key: <code>mainProfile</code></p> | **Default:** `'main_profile'`. Key name in `config.json` that stores the default profile name.                   |

### Filename generation and temp files

Defined in `ofscraper/utils/of_env/values/path/general.py`.

| Variable / Key                                                                                   | Description                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_SKIP\_FILENAME\_RETRIVAL</code><br>Key: <code>SKIP\_FILENAME\_RETRIVAL</code></p> | **Default:** `False`. When on, the file name isn't built from `file_format`, so a naming script must supply it. Without a naming script, downloads fail.              |
| <p><code>OFSC\_SKIP\_MEDIADIR\_RETRIVAL</code><br>Key: <code>SKIP\_MEDIADIR\_RETRIVAL</code></p> | **Default:** `False`. When on, the media folder isn't built from `dir_format` or created, so a naming script must supply it. Without a naming script, downloads fail. |

#### Temporary files

| Variable / Key                                                                                   | Description                                                                           |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| <p><code>OFSC\_BATCH\_TEMPFILE\_CLEANUP</code><br>Key: <code>BATCH\_TEMPFILE\_CLEANUP</code></p> | **Default:** `False`. When on, removes leftover temporary files during batch cleanup. |

### Name and path lengths

Defined in `ofscraper/utils/of_env/values/path/length.py`.

| Variable / Key                                                                                             | Description                                                                              |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| <p><code>OFSC\_MAX\_TEXT\_LENGTH</code><br>Key: <code>MAX\_TEXT\_LENGTH</code></p>                         | **Default:** `70`. Wrap width, in characters, when writing downloaded post text files.   |
| <p><code>OFSC\_WINDOWS\_MAX\_PATH\_BYTES</code><br>Key: <code>WINDOWS\_MAX\_PATH\_BYTES</code></p>         | **Default:** `530`. Maximum full path length, in bytes, before truncation on Windows.    |
| <p><code>OFSC\_MAC\_MAX\_PATH</code><br>Key: <code>MAC\_MAX\_PATH</code></p>                               | **Default:** `255`. Maximum full path length, in characters, before truncation on macOS. |
| <p><code>OFSC\_LINUX\_MAX\_FILE\_NAME\_BYTES</code><br>Key: <code>LINUX\_MAX\_FILE\_NAME\_BYTES</code></p> | **Default:** `254`. Maximum filename length, in bytes, before truncation on Linux.       |

### Character sizes

Defined in `ofscraper/utils/of_env/values/path/bytes.py`.

| Variable / Key              | Description                                                                                                                               |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `NORMAL_CHAR_SIZE_WINDOWS`  | **Default:** `2`. Estimated byte size per ASCII character when measuring path length on Windows (used when `UTF` is unset).               |
| `SPECIAL_CHAR_SIZE_WINDOWS` | **Default:** `4`. Estimated byte size per non-ASCII character when measuring path length on Windows (used when `UTF` is unset).           |
| `SPECIAL_CHAR_SIZE_UNIX`    | **Default:** `4`. Estimated byte size per non-ASCII character when measuring path length on Unix-like systems (used when `UTF` is unset). |
| `NORMAL_CHAR_SIZE_UNIX`     | **Default:** `2`. Estimated byte size per ASCII character when measuring path length on Unix-like systems (used when `UTF` is unset).     |
| `UTF`                       | **Default:** `None`. Encoding name (for example `utf-8`) used to measure exact path byte length instead of the `*_CHAR_SIZE_*` estimates. |

## Network, retries and rate limits

For per-request-type rate-limit and 403 backoff keys and how backoff waits combine, see [Rate-limit & backoff settings](https://cloakedkeys.gitbook.io/ofsc/reference-and-help/reference/env/env-ratelimits.md).

### Connections, proxies and concurrency

Defined in `ofscraper/utils/of_env/values/req/req.py`.

#### Connection and Timeout

| Variable / Key                                                                               | Description                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_CONNECT\_TIMEOUT</code><br>Key: <code>CONNECT\_TIMEOUT</code></p>             | **Default:** `15`. Default connection timeout, in seconds, for HTTP sessions that don't pass their own.                                                                           |
| <p><code>OFSC\_POOL\_CONNECT\_TIMEOUT</code><br>Key: <code>POOL\_CONNECT\_TIMEOUT</code></p> | **Default:** `15`. Default time, in seconds, allowed to get a connection, for HTTP sessions that don't pass their own.                                                            |
| <p><code>OFSC\_READ\_TIMEOUT</code><br>Key: <code>OF\_READ\_TIMEOUT</code></p>               | **Default:** `60`. Longest wait for the next piece of a response (seconds), for requests that don't pass their own read timeout. [Details](#connections-proxies-and-concurrency). |
| <p><code>OFSC\_MAX\_CONNECTIONS</code><br>Key: <code>MAX\_CONNECTIONS</code></p>             | **Default:** `200`. Default maximum simultaneous connections for HTTP sessions that don't pass their own limit.                                                                   |
| <p><code>OFSC\_API\_MAX\_CONNECTION</code><br>Key: <code>API\_MAX\_CONNECTION</code></p>     | **Default:** `100`. Default maximum simultaneous connections for API sessions (OnlyFans and Fansly).                                                                              |
| <p><code>OFSC\_TOTAL\_TIMEOUT</code><br>Key: <code>TOTAL\_TIMEOUT</code></p>                 | **Default:** `None`. Default total request timeout, in seconds, for HTTP sessions that don't pass their own (`None` means no limit).                                              |
| <p><code>OFSC\_KEEP\_ALIVE</code><br>Key: <code>KEEP\_ALIVE</code></p>                       | **Default:** `20`. The most idle connections the sync client keeps open to use again. A count, not a time. The async client, which downloads, has no such limit.                  |
| <p><code>OFSC\_KEEP\_ALIVE\_EXP</code><br>Key: <code>KEEP\_ALIVE\_EXP</code></p>             | **Default:** `10`. How long an idle connection is kept open to use again (seconds). Applies to both clients. 0 keeps none: each connection is closed after use.                   |

**`OF_READ_TIMEOUT` details**

**Environment variable:** `OFSC_READ_TIMEOUT` · **Default:** `60`

Longest wait for the next piece of a response (seconds), for requests that don't pass their own read timeout. It isn't a limit on the whole response: a slow response that keeps sending is fine. On a kept connection that has answered before, a GET's answer must start within a third of this, or that connection is dropped and the request is retried. 0 means no limit (the session manager turns it into None).

#### Proxies

| Variable / Key                                             | Description                                                                                                                                                                                                                |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_PROXY</code><br>Key: <code>PROXY</code></p> | **Default:** `None`. Proxy URL for all HTTP sessions (`http://` or `https://` only; SOCKS isn't supported). When unset, most requests use no proxy, but some still follow `HTTP_PROXY`/`HTTPS_PROXY` from the environment. |

#### Chunking

| Variable / Key                                                                         | Description                                                                                                                       |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_CHUNK\_TIMEOUT\_SEC</code><br>Key: <code>CHUNK\_TIMEOUT\_SEC</code></p> | **Default:** `30`. Read timeout, in seconds, for download and Fansly stream requests (overrides `OF_READ_TIMEOUT` for downloads). |

#### Semaphore and Concurrency

| Variable / Key                                                                                                           | Description                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_SCRAPE\_PAID\_SEMS</code><br>Key: <code>SCRAPE\_PAID\_SEMS</code></p>                                     | **Default:** `10`. Maximum concurrent requests when scraping the paid page (`--scrape-paid`). |
| <p><code>OFSC\_SUBSCRIPTION\_SEMS</code><br>Key: <code>SUBSCRIPTION\_SEMS</code></p>                                     | **Default:** `5`. Maximum concurrent requests when fetching subscription lists and profiles.  |
| <p><code>OFSC\_SESSION\_MANAGER\_SYNC\_SEM\_DEFAULT</code><br>Key: <code>SESSION\_MANAGER\_SYNC\_SEM\_DEFAULT</code></p> | **Default:** `3`. Default maximum concurrent synchronous requests per `sessionManager`.       |
| <p><code>OFSC\_SESSION\_MANAGER\_SEM\_DEFAULT</code><br>Key: <code>SESSION\_MANAGER\_SEM\_DEFAULT</code></p>             | **Default:** `10`. Default maximum concurrent async requests per `sessionManager`.            |

#### Retry and Wait

| Variable / Key                                                                                                   | Description                                                                                                |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_MIN\_WAIT\_SESSION\_DEFAULT</code><br>Key: <code>OF\_MIN\_WAIT\_SESSION\_DEFAULT</code></p>       | **Default:** `2.0`. Default minimum wait, in seconds, between retries in `sessionManager`.                 |
| <p><code>OFSC\_MAX\_WAIT\_SESSION\_DEFAULT</code><br>Key: <code>OF\_MAX\_WAIT\_SESSION\_DEFAULT</code></p>       | **Default:** `3.0`. Default maximum wait, in seconds, between retries in `sessionManager`.                 |
| <p><code>OFSC\_NUM\_RETRIES\_SESSION\_DEFAULT</code><br>Key: <code>OF\_NUM\_RETRIES\_SESSION\_DEFAULT</code></p> | **Default:** `10`. Default maximum number of attempts for a request in `sessionManager`.                   |
| <p><code>OFSC\_MIN\_WAIT\_API</code><br>Key: <code>OF\_MIN\_WAIT\_API</code></p>                                 | **Default:** `2.0`. Minimum wait, in seconds, between retries for API, download, MPD and CDM key requests. |
| <p><code>OFSC\_MAX\_WAIT\_API</code><br>Key: <code>OF\_MAX\_WAIT\_API</code></p>                                 | **Default:** `3.0`. Maximum wait, in seconds, between retries for API, download, MPD and CDM key requests. |
| <p><code>OFSC\_DOWNLOAD\_NUM\_TRIES\_REQ</code><br>Key: <code>DOWNLOAD\_NUM\_TRIES\_REQ</code></p>               | **Default:** `5`. Maximum request-level attempts per download outside check mode.                          |
| <p><code>OFSC\_DOWNLOAD\_NUM\_TRIES\_CHECK\_REQ</code><br>Key: <code>DOWNLOAD\_NUM\_TRIES\_CHECK\_REQ</code></p> | **Default:** `2`. Maximum request-level attempts per download in check mode (`*_check` commands).          |

### API limits and retries

Defined in `ofscraper/utils/of_env/values/req/api.py`.

#### API Search Limits

| Variable / Key                                                                                                     | Description                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_MAX\_TIMELINE\_INDIVIDUAL\_SEARCH</code><br>Key: <code>MAX\_TIMELINE\_INDIVIDUAL\_SEARCH</code></p> | **Default:** `10`. Maximum number of `--post-id` IDs fetched individually for timeline posts before falling back to a full timeline scan. |
| <p><code>OFSC\_MAX\_ARCHIVED\_INDIVIDUAL\_SEARCH</code><br>Key: <code>MAX\_ARCHIVED\_INDIVIDUAL\_SEARCH</code></p> | **Default:** `10`. Maximum number of `--post-id` IDs fetched individually for archived posts before falling back to a full archived scan. |
| <p><code>OFSC\_MAX\_MESSAGES\_INDIVIDUAL\_SEARCH</code><br>Key: <code>MAX\_MESSAGES\_INDIVIDUAL\_SEARCH</code></p> | **Default:** `10`. Maximum number of `--post-id` IDs fetched individually for messages before falling back to a full messages scan.       |
| <p><code>OFSC\_MAX\_STREAMS\_INDIVIDUAL\_SEARCH</code><br>Key: <code>MAX\_STREAMS\_INDIVIDUAL\_SEARCH</code></p>   | **Default:** `10`. Maximum number of `--post-id` IDs fetched individually for streams before falling back to a full streams scan.         |

#### API Retry Counts

| Variable / Key                                                                                         | Description                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>OFSC\_API\_INDIVIDUAL\_NUM\_TRIES</code><br>Key: <code>API\_INDVIDIUAL\_NUM\_TRIES</code></p> | **Default:** `3`. Default maximum number of attempts for an API session request (`ofsession`), unless the caller passes `retries`.                                       |
| <p><code>OFSC\_RATE\_LIMIT\_NUM\_TRIES</code><br>Key: <code>RATE\_LIMIT\_NUM\_TRIES</code></p>         | **Default:** `8`. Number of tries for a request that keeps getting a 429. The backoff wait grows between tries, so these span minutes.                                   |
| <p><code>OFSC\_API\_NUM\_TRIES</code><br>Key: <code>API\_NUM\_TRIES</code></p>                         | **Default:** `10`. Used only as the denominator in `[attempt X/Y]` log messages (`commands/scraper/actions/utils/log.py`); doesn't control retry counts.                 |
| <p><code>OFSC\_API\_LIKE\_NUM\_TRIES</code><br>Key: <code>API\_LIKE\_NUM\_TRIES</code></p>             | **Default:** `5`. Default maximum number of attempts on the like/unlike session (`like.py`), though individual like/unlike requests override it with `LIKE_MAX_RETRIES`. |

#### API Page Limits

| Variable / Key                                                                                                 | Description                                                                                                        |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| <p><code>OFSC\_API\_MAX\_AREAS</code><br>Key: <code>API\_MAX\_AREAS</code></p>                                 | **Default:** `2`. Maximum number of post areas scanned at the same time for one creator.                           |
| <p><code>OFSC\_REASONABLE\_MAX\_PAGE</code><br>Key: <code>REASONABLE\_MAX\_PAGE</code></p>                     | **Default:** `50`. Target maximum number of concurrent pagination tasks for non-message areas.                     |
| <p><code>OFSC\_MIN\_PAGE\_POST\_COUNT</code><br>Key: <code>MIN\_PAGE\_POST\_COUNT</code></p>                   | **Default:** `50`. Minimum number of items per pagination task, to avoid spawning many workers for small accounts. |
| <p><code>OFSC\_REASONABLE\_MAX\_PAGE\_MESSAGES</code><br>Key: <code>REASONABLE\_MAX\_PAGE\_MESSAGES</code></p> | **Default:** `80`. Target maximum number of concurrent pagination tasks for messages.                              |

#### API Request Parameters

| Variable / Key                                                                                 | Description                                                                                                    |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_API\_TIMEOUT\_PER\_TASK</code><br>Key: <code>API\_TIMEOUT\_PER\_TASK</code></p> | **Default:** `500`. Total timeout, in seconds, for each API session request in main scraper and metadata runs. |
| <p><code>OFSC\_API\_REQ\_SEM\_MAX</code><br>Key: <code>API\_REQ\_SEM\_MAX</code></p>           | **Default:** `12`. Maximum concurrent API requests in main scraper and metadata runs.                          |
| <p><code>OFSC\_API\_REQ\_CHECK\_MAX</code><br>Key: <code>API\_REQ\_CHECK\_MAX</code></p>       | **Default:** `12`. Maximum concurrent API requests in check (`*_check`) and `manual` modes.                    |

### Authentication

Defined in `ofscraper/utils/of_env/values/req/auth.py`.

| Variable / Key                                                                               | Description                                                                              |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| <p><code>OFSC\_AUTH\_WARNING\_TIMEOUT</code><br>Key: <code>AUTH\_WARNING\_TIMEOUT</code></p> | **Default:** `1800.0`. Minimum time, in seconds, between repeated auth warning messages. |

### Anonymous requests

Defined in `ofscraper/utils/of_env/values/req/anon.py`.

| Variable / Key                                                                 | Description                                                                                                                                                                       |
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_ANON\_USERAGENT</code><br>Key: <code>ANON\_USERAGENT</code></p> | **Default:** `'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'`. User-Agent string for anonymous requests. |

### Dynamic rule downloads

Defined in `ofscraper/utils/of_env/values/req/git.py`.

| Variable / Key                                                                 | Description                                                                             |
| ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
| <p><code>OFSC\_GIT\_MIN\_WAIT</code><br>Key: <code>GIT\_MIN\_WAIT</code></p>   | **Default:** `1.0`. Minimum wait, in seconds, before retrying a dynamic-rules download. |
| <p><code>OFSC\_GIT\_MAX\_WAIT</code><br>Key: <code>GIT\_MAX\_WAIT</code></p>   | **Default:** `5.0`. Maximum wait, in seconds, before retrying a dynamic-rules download. |
| <p><code>OFSC\_GIT\_NUM\_TRIES</code><br>Key: <code>GIT\_NUM\_TRIES</code></p> | **Default:** `3`. Maximum number of attempts when downloading dynamic signing rules.    |

## DRM, CDM and Discord

### DRM manifests (MPD)

Defined in `ofscraper/utils/of_env/values/req/mpd.py`.

| Variable / Key                                                                                         | Description                                                                                                        |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| <p><code>OFSC\_MPD\_CONNECT\_TIMEOUT</code><br>Key: <code>MPD\_CONNECT\_TIMEOUT</code></p>             | **Default:** `45`. Connection timeout, in seconds, when fetching DRM manifests (MPD).                              |
| <p><code>OFSC\_MPD\_TOTAL\_TIMEOUT</code><br>Key: <code>MPD\_TOTAL\_TIMEOUT</code></p>                 | **Default:** `None`. Total request timeout, in seconds, when fetching DRM manifests (MPD) (`None` means no limit). |
| <p><code>OFSC\_MPD\_READ\_TIMEOUT</code><br>Key: <code>MPD\_READ\_TIMEOUT</code></p>                   | **Default:** `200`. Read timeout, in seconds, when fetching DRM manifests (MPD).                                   |
| <p><code>OFSC\_MPD\_POOL\_CONNECT\_TIMEOUT</code><br>Key: <code>MPD\_POOL\_CONNECT\_TIMEOUT</code></p> | **Default:** `45`. Time, in seconds, allowed to get a connection when fetching DRM manifests (MPD).                |
| <p><code>OFSC\_MPD\_MAX\_SEMS</code><br>Key: <code>MPD\_MAX\_SEMS</code></p>                           | **Default:** `10`. Maximum concurrent requests when fetching DRM manifests (MPD).                                  |
| <p><code>OFSC\_MPD\_NUM\_TRIES</code><br>Key: <code>MPD\_NUM\_TRIES</code></p>                         | **Default:** `5`. Maximum number of attempts when fetching DRM manifests (MPD).                                    |

### CDM

Defined in `ofscraper/utils/of_env/values/req/cdm.py`.

| Variable / Key                                                                               | Description                                                                                               |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_CDM\_TIMEOUT</code><br>Key: <code>CDM\_TIMEOUT</code></p>                     | **Default:** `40`. Total request timeout, in seconds, for CDM licence requests.                           |
| <p><code>OFSC\_CDM\_NUM\_TRIES</code><br>Key: <code>CDM\_NUM\_TRIES</code></p>               | **Default:** `8`. Maximum number of attempts for CDM licence requests outside check mode.                 |
| <p><code>OFSC\_CDM\_NUM\_TRIES\_CHECK</code><br>Key: <code>CDM\_NUM\_TRIES\_CHECK</code></p> | **Default:** `1`. Maximum number of attempts for CDM licence requests in check mode (`*_check` commands). |

### Discord

Defined in `ofscraper/utils/of_env/values/req/discord.py`.

| Variable / Key                                                                                 | Description                                                                                                                |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_DISCORD\_TOTAL\_TIMEOUT</code><br>Key: <code>DISCORD\_TOTAL\_TIMEOUT</code></p> | **Default:** `None`. Total request timeout, in seconds, when sending Discord webhook log messages (`None` means no limit). |
| <p><code>OFSC\_DISCORD\_MIN\_WAIT</code><br>Key: <code>DISCORD\_MIN\_WAIT</code></p>           | **Default:** `1.0`. Minimum wait, in seconds, before retrying a failed Discord webhook request.                            |
| <p><code>OFSC\_DISCORD\_MAX\_WAIT</code><br>Key: <code>DISCORD\_MAX\_WAIT</code></p>           | **Default:** `5.0`. Maximum wait, in seconds, before retrying a failed Discord webhook request.                            |
| <p><code>OFSC\_DISCORD\_NUM\_TRIES</code><br>Key: <code>DISCORD\_NUM\_TRIES</code></p>         | **Default:** `3`. Maximum number of attempts for each Discord webhook request.                                             |

## Logging, progress and UI

### Logging

Defined in `ofscraper/utils/of_env/values/logger.py`.

| Variable / Key                                                                             | Description                                                                                                                                                         |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_LOG\_DISPLAY\_TIMEOUT</code><br>Key: <code>LOG\_DISPLAY\_TIMEOUT</code></p> | **Default:** `0.8`. Base pause, in seconds, used when waiting after printing a warning (for example, `unique_name_warning()` sleeps for `LOG_DISPLAY_TIMEOUT * 3`). |

### Progress display

Defined in `ofscraper/utils/of_env/values/live.py`.

| Variable / Key                                                                                               | Description                                                                                         |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_SUPRESS\_API\_DISPLAY</code><br>Key: <code>SUPRESS\_API\_DISPLAY</code></p>                   | **Default:** `None`. Hides the API progress display when on. [Details](#progress-display).          |
| <p><code>OFSC\_SUPRESS\_DOWNLOAD\_DISPLAY</code><br>Key: <code>SUPRESS\_DOWNLOAD\_DISPLAY</code></p>         | **Default:** `None`. Hides the download progress display when on. [Details](#progress-display).     |
| <p><code>OFSC\_SUPRESS\_SUBSCRIPTION\_DISPLAY</code><br>Key: <code>SUPRESS\_SUBSCRIPTION\_DISPLAY</code></p> | **Default:** `None`. Hides the subscription progress display when on. [Details](#progress-display). |
| <p><code>OFSC\_SUPRESS\_LIKE\_DISPLAY</code><br>Key: <code>SUPRESS\_LIKE\_DISPLAY</code></p>                 | **Default:** `None`. Hides the like progress display when on. [Details](#progress-display).         |

**`SUPRESS_API_DISPLAY` details**

**Environment variable:** `OFSC_SUPRESS_API_DISPLAY` · **Default:** `None`

Hides the API progress display when on. The value is read as on/off: `true` or `1` (any case) is on, and anything else is off, which shows the display. This holds for the bare name too, which has no default to take a type from. It applies only while that screen is up. Unset, the display follows `--output` and `--no-rich`.

**`SUPRESS_DOWNLOAD_DISPLAY` details**

**Environment variable:** `OFSC_SUPRESS_DOWNLOAD_DISPLAY` · **Default:** `None`

Hides the download progress display when on. The value is read as on/off: `true` or `1` (any case) is on, and anything else is off, which shows the display. This holds for the bare name too, which has no default to take a type from. It applies only while that screen is up. Unset, the display follows `--output` and `--no-rich`.

**`SUPRESS_SUBSCRIPTION_DISPLAY` details**

**Environment variable:** `OFSC_SUPRESS_SUBSCRIPTION_DISPLAY` · **Default:** `None`

Hides the subscription progress display when on. The value is read as on/off: `true` or `1` (any case) is on, and anything else is off, which shows the display. This holds for the bare name too, which has no default to take a type from. It applies only while that screen is up. Unset, the display follows `--output` and `--no-rich`.

**`SUPRESS_LIKE_DISPLAY` details**

**Environment variable:** `OFSC_SUPRESS_LIKE_DISPLAY` · **Default:** `None`

Hides the like progress display when on. The value is read as on/off: `true` or `1` (any case) is on, and anything else is off, which shows the display. This holds for the bare name too, which has no default to take a type from. It applies only while that screen is up. Unset, the display follows `--output` and `--no-rich`.

### Subprocess log levels and free-space check

Defined in `ofscraper/utils/of_env/values/system.py`.

| Variable / Key                                                                                                                                       | Description                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>OFSC\_AFTER\_DOWNLOAD\_ACTION\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>AFTER\_DOWNLOAD\_ACTION\_SCRIPT\_SUBPROCESS\_LEVEL</code></p> | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_AFTER\_LIKE\_ACTION\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>AFTER\_LIKE\_ACTION\_SCRIPT\_SUBPROCESS\_LEVEL</code></p>         | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_NAMING\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>NAMING\_SCRIPT\_SUBPROCESS\_LEVEL</code></p>                                   | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_SKIP\_DOWNLOAD\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>SKIP\_DOWNLOAD\_SCRIPT\_SUBPROCESS\_LEVEL</code></p>                   | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_AFTER\_DOWNLOAD\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>AFTER\_DOWNLOAD\_SCRIPT\_SUBPROCESS\_LEVEL</code></p>                 | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_FINAL\_SCRIPT\_SUBPROCESS\_LEVEL</code><br>Key: <code>FINAL\_SCRIPT\_SUBPROCESS\_LEVEL</code></p>                                     | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_LOG\_SUBPROCESS\_LEVEL</code>, <code>OFSC\_LOG\_SUBPROCESS\_LEVELL</code><br>Key: <code>LOG\_SUBPROCESS\_LEVEL</code></p>             | **Default:** `10`. Log level for subprocess output that has no more specific setting. `OFSC_LOG_SUBPROCESS_LEVELL` is the old misspelled name, and it is still read.                            |
| <p><code>OFSC\_FFMPEG\_SUBPROCESS\_LEVEL</code><br>Key: <code>FFMPEG\_SUBPROCESS\_LEVEL</code></p>                                                   | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| <p><code>OFSC\_FFPROBE\_SUBPROCESS\_LEVEL</code><br>Key: <code>FFPROBE\_SUBPROCESS\_LEVEL</code></p>                                                 | **Default:** `10`. Log level for the output of this subprocess (the user script, ffmpeg or ffprobe named in the key). 0 turns that output off.                                                  |
| `OFSC_DATABASE_URL`                                                                                                                                  | **Default:** `''`. A PostgreSQL connection URL, such as postgresql://user:password\@host:5432/database. [Details](#subprocess-log-levels-and-free-space-check).                                 |
| <p><code>OFSC\_DISK\_SPACE\_CHECK\_PATH</code><br>Key: <code>DISK\_SPACE\_CHECK\_PATH</code></p>                                                     | **Default:** `'/'`. The path whose disk free space is compared with `download_options.system_free_min` (`ofscraper/utils/system/free.py`). It is not the save location unless you set it to be. |

**`OFSC_DATABASE_URL` details**

**Environment variable:** `OFSC_DATABASE_URL` · **Default:** `''`

A PostgreSQL connection URL, such as postgresql://user:password\@host:5432/database. Empty (the default) keeps one SQLite file per creator. With a URL, every creator's rows are kept in that PostgreSQL database instead; this needs the optional driver (the `postgres` extra, included in the Docker image).

### Menu choices

Defined in `ofscraper/utils/of_env/values/prompts.py`.

#### Main Prompt Choices

| Variable / Key                                                    | Description                                                                                                                  |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| <p><code>mainPromptChoices</code><br><em>(bare key only)</em></p> | **Default:** a dict of 6 entries (see the source). Menu entries of the interactive main menu. Not read from the environment. |

#### Config Prompt Choices

| Variable / Key                                                      | Description                                                                                                                       |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>configPromptChoices</code><br><em>(bare key only)</em></p> | **Default:** a dict of 12 entries (see the source). Menu entries of the interactive config editor. Not read from the environment. |

#### Action Prompt Choices

| Variable / Key                                                      | Description                                                                                                                       |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>actionPromptChoices</code><br><em>(bare key only)</em></p> | **Default:** a dict of 8 entries (see the source). Menu entries for picking actions interactively. Not read from the environment. |

#### Check Table Prompt Choices: the check command each table runs

| Variable / Key                                                          | Description                                                                                                                                         |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>checkTablePromptChoices</code><br><em>(bare key only)</em></p> | **Default:** a dict of 4 entries (see the source). Menu entries for picking which check table the Action Menu opens. Not read from the environment. |

#### Profiles Prompt Choices

| Variable / Key                                                        | Description                                                                                                                     |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>profilesPromptChoices</code><br><em>(bare key only)</em></p> | **Default:** a dict of 8 entries (see the source). Menu entries of the interactive profile menu. Not read from the environment. |

#### Model Prompt Choices

| Variable / Key                                              | Description                                                                                                                                               |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>modelPrompt</code><br><em>(bare key only)</em></p> | **Default:** a dict of 10 entries (see the source). Menu entries for filtering and sorting the creator list interactively. Not read from the environment. |
