# Backend options

Look up an option of the Backend.

Made from `platforma --help`, version `main 8c608ce13`. 219 options.

## Main Options

| Option                           | Environment variable              | Default | Description                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------- | --------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--version`                      |                                   |         | show version info and exit                                                                                                                                                                                                                                                                                                                                  |
| `--full-version`                 |                                   |         | show full version report and exit                                                                                                                                                                                                                                                                                                                           |
| `--debug-help=MAIN-ROOT`         |                                   |         | print a guide for block developers on debugging the backend (workdirs, block logs, log levels, local package registries) and exit. Pass --debug-help=PATH to substitute PATH as --main-root in every example command (defaults to $HOME/Platforma/local — the macOS Desktop App data directory).                                                            |
| `--print-auth-config`            |                                   |         | print the equivalent auth.\* provider config for the given legacy --sso-idp-\* flags, then exit. Other legacy modes print where to look instead of a generated block                                                                                                                                                                                        |
| `--force`                        | `PL_FORCE`                        |         | Force potentially dangerous operations. Used with --restore-db to overwrite existing database.                                                                                                                                                                                                                                                              |
| `--license=E-XXXXXXX`            |                                   |         | Platforma License obtained from https\://platforma.bio                                                                                                                                                                                                                                                                                                      |
| `--license-file=FILE`            |                                   |         | path to the file with Platforma License obtained from https\://platforma.bio. Default file is \~/.pl.license, if exists.                                                                                                                                                                                                                                    |
| `--fail-fast-on-invalid-license` | `PL_FAIL_FAST_ON_INVALID_LICENSE` |         | Exit with an error on an invalid or expired license instead of starting. By default the backend starts even with an invalid/expired license but serves only the license status to clients and runs no computations, so operators can diagnose the problem; with this flag it instead fails fast at startup and shuts down if a valid license is later lost. |

## Local storage

| Option                     | Environment variable | Default | Description                                                                                                                                                                                                                                                                    |
| -------------------------- | -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--main-root=DIRECTORY`    | `PL_MAIN_ROOT`       |         | local storage for all local data (database, downloaded software and so on).                                                                                                                                                                                                    |
| `--db-dir=DIRECTORY`       | `PL_DB_DIR`          |         | place to store database with all backend state. When you keep '--main-root' on network attached storage (like NFS, mounted S3 Bucket or so), it is better to keep database on local drive to have less performance issues on backend side. Defaults to '\<main-root>/rocksdb'. |
| `--work-dir=DIRECTORY`     | `PL_WORK_DIR`        |         | place to store working directories. Defaults to '\<main-root>/work'. Each instance uses the folder '\<work dir>/\<instance id>'.                                                                                                                                               |
| `--packages-dir=DIRECTORY` | `PL_PACKAGES_DIR`    |         | place to store downloaded packages (archives, installed software and so on). Defaults to '\<main-root>/packages'.                                                                                                                                                              |

## Logging options

| Option                                  | Environment variable                | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------------------------------------- | ----------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--log-dst=URL`                         | `PL_LOG_DESTINATION`                |         | logging destination URL. Supports: - 'dir://\<path>' - put log files into directory and do automatic rotation - 'stream://stdout' or 'stream://stderr' - write log to std stream - 'file://\<path>' write log to single file without rotation Specify multiple times to log to several destinations at once (e.g. stdout and a file on disk). Prefix a destination with '\<level>=//' to set a per-destination level (e.g. 'error=//stream://stdout'). It can only make that destination quieter than '--log-level', never more verbose. Defaults to 'dir://\<main-root>/log/' when not specified. |
| `--quiet`                               |                                     |         | disable default stdout/stderr logging                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `--log-level=LEVEL`                     | `PL_LOG_LEVEL`                      | `info`  | logging level: 'info', 'warn' (default: info)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `--log-rotation-size=SIZE`              | `PL_LOG_ROTATION_SIZE`              | `20MiB` | maximum log file size. Supports siffixes: MB, MiB, GB, GiB and so on. (default: 20MiB)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `--log-rotation-backups=N`              | `PL_LOG_ROTATION_BACKUPS`           | `20`    | maximum number of log files to keep (default: 20)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--no-log-rotation`                     | `PL_NO_LOG_ROTATION`                |         | disable automatic log rotation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--no-log-compression`                  | `PL_NO_LOG_COMPRESSION`             |         | do not compress log files with gzip after automatic rotation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `--log-component-level=COMPONENT=LEVEL` | `PL_LOG_COMPONENT_LEVEL`            |         | logging level for specific components. Format: 'COMPONENT=LEVEL'. For example: 'core', 'controllers', 'db', 'core-api'. Defaults is set by '--log-level' option.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `--log-force-global-level`              | `PL_LOG_FORCE_GLOBAL_LEVEL`         |         | Turn off filtering by components and use global level for all components.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `--no-log-tree-changelog`               | `PL_NO_LOG_TREE_CHANGELOG`          |         | disable the tree changelog: the per-transaction change summaries written to their own local file. Disabling it also stops the summaries from being built at all, saving the per-transaction cost.                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--log-tree-changelog-path=PATH`        | `PL_LOG_TREE_CHANGELOG_PATH`        |         | file to write the tree changelog (per-transaction change summaries) to. Must be a regular file: the changelog is never written to stdout/stderr, so it is never shipped off the machine. Defaults to '\<main-root>/log/treechangelog.log'.                                                                                                                                                                                                                                                                                                                                                         |
| `--log-tree-changelog-max-size=SIZE`    | `PL_LOG_TREE_CHANGELOG_MAX_SIZE`    |         | maximum tree changelog file size before it gets rotated. Supports suffixes: MB, MiB, GB, GiB and so on. Defaults to '1GiB'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `--log-tree-changelog-max-backups=N`    | `PL_LOG_TREE_CHANGELOG_MAX_BACKUPS` |         | maximum number of rotated tree changelog files to keep. Rotated files are gzipped unless '--no-log-compression' is given, which is what makes a deep history affordable. Defaults to 40.                                                                                                                                                                                                                                                                                                                                                                                                           |
| `--log-blocks-enabled`                  | `PL_LOG_BLOCKS`                     |         | enable blocks logs in controllers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--log-blocks-dst=URL`                  | `PL_LOG_BLOCKS_DESTINATION`         |         | logging destination URL for blocks logs. Supports: - 'dir://\<path>' - put log files into directory and do automatic rotation - 'stream://stdout' or 'stream://stderr' - write log to std stream - 'file://\<path>' write log to single file without rotation Defaults to 'dir://\<main-root>/log/blocks/' when not specified.                                                                                                                                                                                                                                                                     |

## Listen options

| Option                                                | Environment variable    | Default     | Description                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------- | ----------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--listen-address=dns-name-or-ip-address`             | `PL_LISTEN_ADDRESS`     | `127.0.0.1` | listen specified DNS name or IP address (default: 127.0.0.1)                                                                                                                                                                                                                                                                                                                               |
| `--listen-port=PORT`                                  | `PL_LISTEN_PORT`        | `6345`      | listen specified TCP port (default: 6345)                                                                                                                                                                                                                                                                                                                                                  |
| `--listen-http-port=PORT`                             | `PL_LISTEN_HTTP_PORT`   | `6347`      | listen specified HTTP port (default: 6347)                                                                                                                                                                                                                                                                                                                                                 |
| `--listen-tls=<cert-path>,<key-path>`                 | `PL_LISTEN_TLS`         | `disabled`  | Use TLS (https) on all listeners, the metrics and debug API ('--debug-port') listeners included. The listeners then refuse plain HTTP. Provide paths to x509 PEM-encoded certificate and private key. (default: disabled)                                                                                                                                                                  |
| `--self-signed-tls`                                   |                         |             | If true, backend will generate self-signed certificate in '\<main-root>/tls' directory. If files 'certificate.cer', 'certificate.key' already exist, they will be used.                                                                                                                                                                                                                    |
| `--self-signed-tls-org=ORG_NAME`                      | `PL_LISTEN_TLS_ORG`     | `Platforma` | When generating self-signed certificate, use 'ORG_NAME' as organization name in the certificate. (default: Platforma)                                                                                                                                                                                                                                                                      |
| `--self-signed-tls-domain=DOMAIN`                     | `PL_LISTEN_TLS_DOMAINS` |             | When generating self-signed certificate, allow these domains with the certificate (you can specify option several times).                                                                                                                                                                                                                                                                  |
| `--self-signed-tls-ip=IP`                             | `PL_LISTEN_TLS_IPS`     |             | When generating self-signed certificate, limit it to these IPs (you can specify option several times).                                                                                                                                                                                                                                                                                     |
| `--show-user-list-to=AUDIENCE[users\|admins\|nobody]` | `PL_SHOW_USER_LIST_TO`  |             | Set which client roles can get the list of users of this instance (AuthAPI.ListUsers). A role that cannot get the list gets a 'permission denied' error. 'users' - all users can get the list (default); 'admins' - only administrators can get the list. Use on multitenant instances, so that users of one tenant cannot see users of other tenants; 'nobody' - nobody can get the list. |

## Debugging API (DB dumps, performance profiling, etc.)

| Option              | Environment variable | Default     | Description                                                                                                                                                       |
| ------------------- | -------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--debug-enabled`   | `PL_DEBUG_ENABLED`   |             | enable the debug API (HTTP): database dumps (/db/state_raw, for --restore-db) and performance profiling. The debug API has no sign-in: keep it on a local address |
| `--debug-port=PORT` | `PL_DEBUG_PORT`      | `9091`      | port of the debug API (default: 9091)                                                                                                                             |
| `--debug-ip=IP`     | `PL_DEBUG_IP`        | `127.0.0.1` | IP address of the debug API. The debug API has no sign-in: do not use an address that other hosts can reach (default: 127.0.0.1)                                  |

## Telemetry options

| Option                     | Environment variable    | Default | Description                                                                                                                                                                                                                                                                                        |
| -------------------------- | ----------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--telemetry-endpoint=URL` | `PL_TELEMETRY_ENDPOINT` |         | URL of the service that receives block run records (usage telemetry). The backend sends the records as JSON over HTTP POST to '\<URL>/v1/exec_run_record'. Use an 'https\://' URL: with 'http\://' the records go over the network without encryption. Defaults to 'https\://mon.pl-open.science'. |

## Primary Storage options

| Option                                                  | Environment variable                      | Default | Description                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------- | ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--primary-storage-fs-url=URL`                          | `PL_PRIMARY_STORAGE_FS_URL`               |         | URL to access the primary storage from outside the cluster.                                                                                                                                                                                                                                                                                                                                            |
| `--primary-storage-s3=URL`                              | `PL_PRIMARY_STORAGE_S3`                   |         | S3 bucket to use as primary store for long-term results storage: - s3://\<bucket>\[/\<prefix-in-bucket>] (when you use official Amazon AWS S3) - http(s)://s3-service-endpoint/bucket\[/prefix-in-bucket] (when you use alternative S3-compatible services)                                                                                                                                            |
| `--primary-storage-s3-region=REGION`                    | `PL_PRIMARY_STORAGE_S3_REGION`            |         | AWS S3 region.                                                                                                                                                                                                                                                                                                                                                                                         |
| `--primary-storage-s3-key=KEY`                          | `PL_PRIMARY_STORAGE_S3_KEY`               |         | S3 service key ID.                                                                                                                                                                                                                                                                                                                                                                                     |
| `--primary-storage-s3-secret=SECRET`                    | `PL_PRIMARY_STORAGE_S3_SECRET`            |         | S3 service secret key.                                                                                                                                                                                                                                                                                                                                                                                 |
| `--primary-storage-s3-external-endpoint=URL`            | `PL_PRIMARY_STORAGE_S3_EXTERNAL_ENDPOINT` |         | S3 URL for Desktop App without bucket name (if you want it to differ from backend's)                                                                                                                                                                                                                                                                                                                   |
| `--primary-storage-s3-no-data-integrity`                | `PL_PRIMARY_STORAGE_S3_NO_DATA_INTEGRITY` |         | Disable data integrity protection for uploads. Some S3-compatible services may not support modern data integrity checking mode used by default. This causes errors during data uploads (XAmzContentSHA256Mismatch and similar). This type of errors were observed for Google Cloud Storage, Ceph and old MinIO versions. Try this option if Platforma Backend fails to upload data to your S3 storage. |
| `--primary-storage-gcs=URL`                             | `PL_PRIMARY_STORAGE_GCS`                  |         | GCS bucket to use as primary store for long-term results storage: - gs\://\<bucket>\[/\<prefix-in-bucket>] (when you use Google Cloud Storage)                                                                                                                                                                                                                                                         |
| `--primary-storage-gcs-project-id=PROJECT_ID`           | `PL_PRIMARY_STORAGE_GCS_PROJECT_ID`       |         | GCP project ID.                                                                                                                                                                                                                                                                                                                                                                                        |
| `--primary-storage-gcs-service-account=SERVICE_ACCOUNT` | `PL_PRIMARY_STORAGE_GCS_SERVICE_ACCOUNT`  |         | GCP service account to use for authentication.                                                                                                                                                                                                                                                                                                                                                         |

## Data Library options

| Option                                                          | Environment variable                           | Default | Description                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------- | ---------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--no-host-data-library`                                        | `PL_NO_HOST_DATA_LIBRARY`                      |         | Do not share server's filesystem as data library available in Desktop App.                                                                                                                                                                                                                                                                                                                             |
| `--data-library-name=LibID=DisplayName`                         | `PL_DATA_LIBRARY_NAME`                         |         | Set display name for a data library.                                                                                                                                                                                                                                                                                                                                                                   |
| `--data-library-fs=LibID=DIRECTORY`                             | `PL_DATA_LIBRARY_FS_PATH`                      |         | attach local FS directory as a data library                                                                                                                                                                                                                                                                                                                                                            |
| `--data-library-s3=LibID=URL`                                   | `PL_DATA_LIBRARY_S3_URL`                       |         | attach S3 bucket as a data library: - s3://\<bucket>\[/\<prefix-in-bucket>] (when you use official Amazon AWS S3) - http(s)://s3-service-endpoint/bucket\[/prefix-in-bucket] (when you use alternative S3-compatible services)                                                                                                                                                                         |
| `--data-library-s3-region=LibID=REGION`                         | `PL_DATA_LIBRARY_S3_REGION`                    |         | AWS S3 region.                                                                                                                                                                                                                                                                                                                                                                                         |
| `--data-library-s3-key=LibID=KEY`                               | `PL_DATA_LIBRARY_S3_KEY`                       |         | S3 service key ID.                                                                                                                                                                                                                                                                                                                                                                                     |
| `--data-library-s3-secret=LibID=SECRET`                         | `PL_DATA_LIBRARY_S3_SECRET`                    |         | S3 service secret key.                                                                                                                                                                                                                                                                                                                                                                                 |
| `--data-library-s3-key-file=LibID=FILE`                         | `PL_DATA_LIBRARY_S3_KEY_FILE`                  |         | path to a file holding the S3 service key ID; leading and trailing whitespace is removed. Cannot be combined with --data-library-s3-key for the same library                                                                                                                                                                                                                                           |
| `--data-library-s3-secret-file=LibID=FILE`                      | `PL_DATA_LIBRARY_S3_SECRET_FILE`               |         | path to a file holding the S3 service secret key; leading and trailing whitespace is removed. Cannot be combined with --data-library-s3-secret for the same library                                                                                                                                                                                                                                    |
| `--data-library-s3-external-endpoint=LibID=URL`                 | `PL_DATA_LIBRARY_S3_EXTERNAL_ENDPOINT`         |         | S3 URL for Desktop App without bucket name (if you want it to differ from backend's).                                                                                                                                                                                                                                                                                                                  |
| `--data-library-s3-no-data-integrity=LibID=true`                | `PL_DATA_LIBRARY_S3_NO_DATA_INTEGRITY`         |         | Disable data integrity protection for uploads. Some S3-compatible services may not support modern data integrity checking mode used by default. This causes errors during data uploads (XAmzContentSHA256Mismatch and similar). This type of errors were observed for Google Cloud Storage, Ceph and old MinIO versions. Try this option if Platforma Backend fails to upload data to your S3 storage. |
| `--data-library-s3-federation-role-arn=LibID=ARN`               | `PL_DATA_LIBRARY_S3_FEDERATION_ROLE_ARN`       |         | IAM role ARN assumed per-user via STS AssumeRoleWithWebIdentity using the caller's SSO/OIDC token. Presence of this flag for a LibID activates federated (per-user) access; mutually exclusive with --data-library-s3-key/-secret and requires --data-library-s3-region.                                                                                                                               |
| `--data-library-s3-federation-auth-provider=LibID=PROVIDER_ID`  | `PL_DATA_LIBRARY_S3_FEDERATION_AUTH_PROVIDER`  |         | id of the auth.\* provider whose OIDC session backs this library - the provider the IAM role trusts as its web-identity issuer. Required when more than one sso provider is configured, since OIDC subjects are unique only per issuer.                                                                                                                                                                |
| `--data-library-s3-federation-auth-token=LibID=TOKEN_KIND`      | `PL_DATA_LIBRARY_S3_FEDERATION_AUTH_TOKEN`     |         | names which of the IdP's tokens this library sends to STS - a token kind, not a token value. One of: access_token, id_token. Required together with --data-library-s3-federation-role-arn: STS accepts only a JWT carrying the 'sub' claim. Google issues an opaque access token, so a Google IdP needs id_token; an IdP issuing JWT access tokens bound to a resource audience needs access_token.    |
| `--data-library-gcs=LibID=URL`                                  | `PL_DATA_LIBRARY_GCS_URL`                      |         | attach GCS bucket as a data library: - gs\://\<bucket>\[/\<prefix-in-bucket>] (when you use Google Cloud Storage)                                                                                                                                                                                                                                                                                      |
| `--data-library-gcs-project-id=LibID=PROJECT_ID`                | `PL_DATA_LIBRARY_GCS_PROJECT_ID`               |         | GCP project ID.                                                                                                                                                                                                                                                                                                                                                                                        |
| `--data-library-gcs-service-account=LibID=SERVICE_ACCOUNT`      | `PL_DATA_LIBRARY_GCS_SERVICE_ACCOUNT`          |         | GCP service account to use for authentication. Special value 'authenticated-user' enables access on behalf of the signed-in user without WIF and STS involved. Requires Google SSO to be configured. Special value 'federated' is used for federated access mode (other SSO providers execpt Google, requires WIF to be configured in your infra).                                                     |
| `--data-library-gcs-json-key-file-path=LibID=PATH`              | `PL_DATA_LIBRARY_GCS_JSON_FILE_PATH`           |         | Path to GCP service account JSON file.                                                                                                                                                                                                                                                                                                                                                                 |
| `--data-library-gcs-auth-provider=LibID=PROVIDER_ID`            | `PL_DATA_LIBRARY_GCS_AUTH_PROVIDER`            |         | id of the auth.\* provider whose Google session supplies the access token sent to Cloud Storage. Required with --data-library-gcs-service-account=\<LibID>=authenticated-user. Cannot be combined with federated access mode (--data-library-gcs-federation-\*).                                                                                                                                       |
| `--data-library-gcs-federation-audience=LibID=AUDIENCE`         | `PL_DATA_LIBRARY_GCS_FEDERATION_AUDIENCE`      |         | WIF provider audience (//iam.googleapis.com/.../providers/...). Presence of this flag for a LibID activates FederatedStorage mode.                                                                                                                                                                                                                                                                     |
| `--data-library-gcs-federation-token-url=LibID=URL`             | `PL_DATA_LIBRARY_GCS_FEDERATION_TOKEN_URL`     |         | STS endpoint (default https\://sts.googleapis.com/v1/token).                                                                                                                                                                                                                                                                                                                                           |
| `--data-library-gcs-federation-scopes=LibID=SCOPES`             | `PL_DATA_LIBRARY_GCS_FEDERATION_SCOPES`        |         | Comma-separated OAuth scopes (default https\://www\.googleapis.com/auth/cloud-platform).                                                                                                                                                                                                                                                                                                               |
| `--data-library-gcs-federation-auth-provider=LibID=PROVIDER_ID` | `PL_DATA_LIBRARY_GCS_FEDERATION_AUTH_PROVIDER` |         | id of the auth.\* provider whose OIDC session backs this library - the provider the WIF pool provider trusts. Required when more than one sso provider is configured, since OIDC subjects are unique only per issuer.                                                                                                                                                                                  |
| `--data-library-gcs-federation-auth-token=LibID=TOKEN_KIND`     | `PL_DATA_LIBRARY_GCS_FEDERATION_AUTH_TOKEN`    |         | names which of the IdP's tokens this library sends to STS - a token kind, not a token value. One of: access_token, id_token. Required together with --data-library-gcs-federation-audience: STS accepts only a JWT carrying the 'sub' claim. Google issues an opaque access token, so a Google IdP needs id_token; an IdP issuing JWT access tokens bound to a resource audience needs access_token.   |

## Runner options

| Option                                                 | Environment variable               | Default   | Description                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------ | ---------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--runner-enable-docker`                               | `PL_RUNNER_ENABLE_DOCKER`          |           | Forcefully enable docker support for all runners.                                                                                                                                                                                                                                                                                                                                                                                  |
| `--runner-gpu-available=MODE[auto\|enabled\|disabled]` | `PL_RUNNER_GPU_AVAILABLE`          | `auto`    | Whether GPU is available for runners. 'auto' - auto-detect (Docker NVIDIA runtime probe; not available in K8s). 'enabled' - GPU is available; jobs may request GPU resources via .gpuMemory(). 'disabled' - GPU is unavailable; .gpuMemory() requests fail with an error. (default: auto)                                                                                                                                          |
| `--prune-docker-images-schedule=SCHEDULE`              | `PL_PRUNE_DOCKER_IMAGES_SCHEDULE`  | `@weekly` | Cron schedule for pruning docker images. By default, images are pruned every 7 day at 00:00 UTC. (default: @weekly)                                                                                                                                                                                                                                                                                                                |
| `--queue-runner=QUEUE:TYPE`                            | `PL_QUEUE_RUNNER`                  |           | Map queue to runner type. Format: queue:runner (e.g., 'ui-tasks:local', 'heavy:k8s') Valid types: local, k8s If any mapping is specified, all standard queues must be mapped. Required when K8s is configured.                                                                                                                                                                                                                     |
| `--default-docker-registry=REGISTRY`                   | `PL_DEFAULT_DOCKER_REGISTRY`       |           | Makes backend to use custom docker registry for all public Platforma blocks.                                                                                                                                                                                                                                                                                                                                                       |
| `--runner-max-job-attempts=N`                          | `PL_RUNNER_MAX_JOB_ATTEMPTS`       | `3`       | Maximum number of attempts a workflow may make for one job, counting the first run. Applies to all runner types. Published to workflows as the attempt limit; a command past it fails permanently. 1 disables fallbacks. Must be >= 1. (default: 3)                                                                                                                                                                                |
| `--runner-max-infra-job-attempts=N`                    | `PL_RUNNER_MAX_INFRA_JOB_ATTEMPTS` |           | Maximum number of attempts of one job that the infrastructure fails: the job could not be submitted, its software image could not be pulled, or its working directory was lost after the run. Applies to all runner types. A workflow restarts such a job up to this limit; it does not count against --runner-max-job-attempts. When 0 (default), 3 attempts are made. Must be >= 0.                                              |
| `--runner-max-cpu-request=CORES`                       | `PL_RUNNER_MAX_CPU_REQUEST`        |           | Maximum CPU cores that can be requested for single job. Applies to all runner types (local, k8s). All larger requests are shrunk to this value. When 0 (default), no limit is applied.                                                                                                                                                                                                                                             |
| `--runner-max-memory-request=AMOUNT`                   | `PL_RUNNER_MAX_MEMORY_REQUEST`     |           | Maximum memory (RAM) that can be requested for single job. Applies to all runner types (local, k8s). All larger requests are shrunk to this value. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no limit is applied.                                                                                                                                                                                        |
| `--runner-gpu-max-vram-request=AMOUNT`                 | `PL_RUNNER_GPU_MAX_VRAM_REQUEST`   |           | Maximum GPU memory (VRAM) that can be requested for single job. Applies to all runner types (local, k8s); per-driver flags override this when set. All larger requests are shrunk to this value, and the value is also the upper bound for GPU OOM retries. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. Required (here or via per-driver override) when --runner-gpu-available=enabled; must not be set when GPU is unavailable. |
| `--has-scratch-space`                                  | `PL_HAS_SCRATCH_SPACE`             |           | Tell blocks this deployment serves scratch (temporary) disk space requests. Advertises the 'scratchSpace:v1' client capability and the 'scratchSpace' workflow feature flag. Enable it only where scratch storage really exists: a block that sees the flag stops managing its own temporary files and relies on TMPDIR. Disabled by default.                                                                                      |
| `--runner-min-scratch-request=AMOUNT`                  | `PL_RUNNER_MIN_SCRATCH_REQUEST`    |           | Minimum scratch (temporary) disk space to give a job that asks for some. Applies to all runner types (local, k8s); per-driver flags override this when set. Set it to the smallest volume the deployment's storage can create. All smaller requests are grown to this value; a job that asks for no scratch space still gets none. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no minimum is applied.      |
| `--runner-max-scratch-request=AMOUNT`                  | `PL_RUNNER_MAX_SCRATCH_REQUEST`    |           | Maximum scratch (temporary) disk space that can be requested for single job. Applies to all runner types (local, k8s); per-driver flags override this when set. Set it to the largest volume the deployment can attach to one job. All larger requests are shrunk to this value. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no limit is applied.                                                          |
| `--runner-local-cpu=CORES`                             | `PL_RUNNER_LOCAL_CPU`              |           | number of CPU cores to use for local execution on current host. Defaults to number of CPU cores on the host                                                                                                                                                                                                                                                                                                                        |
| `--runner-local-memory=AMOUNT`                         | `PL_RUNNER_LOCAL_MEMORY`           |           | amount of memory (RAM) to use for local execution on current host. Supports traditional data size suffixes: KB, MB, GB, KiB, MiB, GiB. You can also set the value in % of total memory available on the host, by providing '%' symbol at the end of the value, i.e. 50%. Defaults to 95%                                                                                                                                           |

## Runner options (Kubernetes)

| Option                                 | Environment variable                    | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------------------------- | --------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--k8s-job-template=PATH`              | `PL_RUNNER_K8S_JOB_TEMPLATE`            |         | Path to YAML template for Kubernetes Job specs. This template should have volume configuration baked in. This option enables k8s integration.                                                                                                                                                                                                                                                                                                                                                                                                          |
| `--k8s-watch-config=PATH`              | `PL_RUNNER_K8S_WATCH_CONFIG`            |         | Path to watch configuration YAML (required). Defines GVR to watch, label selector templates, and status expressions.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `--k8s-namespace=NAMESPACE`            | `PL_RUNNER_K8S_NAMESPACE`               |         | Kubernetes namespace where jobs will be created. Defaults to namespace of platforma backend pod.                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `--k8s-job-name-prefix=PREFIX`         | `PL_RUNNER_K8S_JOB_NAME_PREFIX`         |         | Prefix to use for Kubernetes job names. The final job name has format \<PREFIX>-0x\<run-command-id>\[-\<command-name>]. Default: pl-<4 letters of the instance ID>.                                                                                                                                                                                                                                                                                                                                                                                    |
| `--k8s-kubeconfig=PATH`                | `PL_RUNNER_K8S_KUBECONFIG`              |         | Path to kubeconfig file. If empty, KUBECONFIG environment variable will be used, then default path from HOME directory, and finally in-cluster configuration.                                                                                                                                                                                                                                                                                                                                                                                          |
| `--k8s-context=CONTEXT`                | `PL_RUNNER_K8S_CONTEXT`                 |         | Kubeconfig context to use. If empty, current context from kubeconfig will be used.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--k8s-max-cpu-request=CORES`          | `PL_RUNNER_K8S_MAX_CPU_REQUEST`         |         | Maximum CPU cores that can be requested for single job. All larger requests would be 'shrinked' to given value in a hope they can run with less computation resource. When 0 (default), no limit is applied.                                                                                                                                                                                                                                                                                                                                           |
| `--k8s-max-memory-request=AMOUNT`      | `PL_RUNNER_K8S_MAX_MEMORY_REQUEST`      |         | Maximum memory (RAM) that can be requested for single job. Overrides --runner-max-memory-request for the K8s driver. All larger requests would be 'shrinked' to given value in a hope they can run with less computation resource. Supports traditional data size suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no limit is applied.                                                                                                                                                                                                      |
| `--k8s-gpu-max-vram-request=AMOUNT`    | `PL_RUNNER_K8S_GPU_MAX_VRAM_REQUEST`    |         | Maximum GPU memory (VRAM) that can be requested for single job. Overrides --runner-gpu-max-vram-request for the K8s driver. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. Must not be set when GPU is unavailable; see --runner-gpu-available.                                                                                                                                                                                                                                                                                                         |
| `--k8s-oom-retry`                      | `PL_RUNNER_K8S_OOM_RETRY`               |         | Enable OOM retries for K8s jobs. Off by default: an out-of-memory job fails immediately with its original error. When enabled, an OOM-killed job is re-run with doubled memory, capped at the queue's max RAM/GPU request.                                                                                                                                                                                                                                                                                                                             |
| `--k8s-job-wrapper-legacy`             | `PL_RUNNER_K8S_JOB_WRAPPER_LEGACY`      |         | Run job containers through the legacy job_script.sh shell entrypoint instead of the job-wrapper binary. The fallback for a wrapper defect. Disables the per-run CPU/RAM usage report (.pl/usage.json).                                                                                                                                                                                                                                                                                                                                                 |
| `--k8s-job-wrapper-dir=PATH`           | `PL_RUNNER_K8S_JOB_WRAPPER_DIR`         |         | Directory holding the job-wrapper binaries as linux-x64/job-wrapper and linux-aarch64/job-wrapper. Defaults to 'job-wrapper' next to the platforma executable, where the backend image ships them. When no binary is found there, jobs run through job_script.sh as if --k8s-job-wrapper-legacy was set.                                                                                                                                                                                                                                               |
| `--k8s-gpu-max-cpu-request=CORES`      | `PL_RUNNER_K8S_GPU_MAX_CPU_REQUEST`     |         | Maximum CPU cores that can be requested for a job that needs a GPU. GPU jobs run on a separate node pool whose per-node CPU differs from the batch pool. Larger requests are 'shrinked' to this value so the job lands on a real GPU node instead of staying Pending. When 0 (default), GPU jobs fall back to --k8s-max-cpu-request.                                                                                                                                                                                                                   |
| `--k8s-gpu-max-memory-request=AMOUNT`  | `PL_RUNNER_K8S_GPU_MAX_MEMORY_REQUEST`  |         | Maximum memory (RAM, not VRAM) that can be requested for a job that needs a GPU. GPU jobs run on a separate node pool whose per-node RAM differs from the batch pool. Larger requests are 'shrinked' to this value so the job lands on a real GPU node instead of staying Pending. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), GPU jobs fall back to --k8s-max-memory-request.                                                                                                                                                 |
| `--k8s-max-scratch-request=AMOUNT`     | `PL_RUNNER_K8S_MAX_SCRATCH_REQUEST`     |         | Maximum scratch (temporary) disk space that can be requested for single job. Overrides --runner-max-scratch-request for the K8s driver. Set it to the largest volume the cluster can attach to one job. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no limit is applied.                                                                                                                                                                                                                                                       |
| `--k8s-gpu-max-scratch-request=AMOUNT` | `PL_RUNNER_K8S_GPU_MAX_SCRATCH_REQUEST` |         | Maximum scratch disk space that can be requested for a job that needs a GPU. GPU jobs run on a separate node pool whose storage differs from the batch pool. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), GPU jobs fall back to --k8s-max-scratch-request.                                                                                                                                                                                                                                                                      |
| `--k8s-min-scratch-request=AMOUNT`     | `PL_RUNNER_K8S_MIN_SCRATCH_REQUEST`     |         | Minimum scratch (temporary) disk space to give a job that asks for some. Overrides --runner-min-scratch-request for the K8s driver. Set it to the smallest volume the cluster's storage class can create: a class that provisions performance, such as an EBS gp3 volume with a fixed IOPS number, refuses a volume below the size that number implies. All smaller requests are grown to this value; a job that asks for no scratch space still gets none. Supports suffixes: KB, MB, GB, KiB, MiB, GiB. When empty (default), no minimum is applied. |
| `--k8s-api-qps=N`                      | `PL_RUNNER_K8S_API_QPS`                 | `50`    | Requests per second that the runner sends to the Kubernetes API, for each of its two clients. Every job create, delete, and pod read waits for this limit, so a low value delays the jobs of a large burst. The Kubernetes API server applies its own limits on top of this one. When 0, the default of 50 is used. (default: 50)                                                                                                                                                                                                                      |
| `--k8s-api-burst=N`                    | `PL_RUNNER_K8S_API_BURST`               | `100`   | Requests that the runner can send to the Kubernetes API at once, above '--k8s-api-qps', before the rate limit applies. When 0, the default of 100 is used. (default: 100)                                                                                                                                                                                                                                                                                                                                                                              |
| `--k8s-kueue-cluster-queue=NAME`       | `PL_RUNNER_K8S_KUEUE_CLUSTER_QUEUES`    |         | Kueue ClusterQueue the jobs run in. Repeat the flag for each queue. When set, the CPU, RAM and job statistics of the instance come from these queues; with shared queues they cover every install on them. The backend needs read access (get) to these ClusterQueues. When empty (default), the statistics come from the runner and have no total.                                                                                                                                                                                                    |
| `--k8s-gpu-schedule-timeout=DURATION`  | `PL_RUNNER_K8S_GPU_SCHEDULE_TIMEOUT`    | `10m`   | How long a job that needs a GPU may wait for a GPU node before it fails with 'GPU missed'. Counts from job creation until the pod is scheduled; image pulls after scheduling are not counted. Must be shorter than the job template's AppWrapper warmupGracePeriodDuration (30m in the chart). When 0, the timeout is disabled and a GPU job waits as any other job does. (default: 10m)                                                                                                                                                               |

## Authentication options

| Option                                           | Environment variable               | Default    | Description                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------ | ---------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--auth-ldap-server=URL`                         | `PL_AUTH_LDAP_SERVER`              |            | enable LDAP authentication: - ldap(s)://\<ldap-server-address>/                                                                                                                                                                                                                                         |
| `--auth-ldap-start-tls`                          | `PL_AUTH_LDAP_START_TLS`           |            | whether to use 'StartTLS' message to secure plain ldap\:// connection with TLS. This is a secure alternative to ldaps\://                                                                                                                                                                               |
| `--auth-ldap-client-cert=<cert-path>,<key-path>` | `PL_AUTH_LDAP_CLIENT_CERT`         | `disabled` | Provide given TLS certificate to LDAP server when establishing TLS connection. This is required for LDAP servers that use certificate-based authentication of a client instead of regular basic auth. Provide x509 PEM-encoded certificate and private key. (default: disabled)                         |
| `--auth-ldap-trusted-cas=FILE`                   | `PL_AUTH_LDAP_TRUSTED_CAS`         |            | path to the file with CA certificates to be trusted by server when establishing TLS connection.                                                                                                                                                                                                         |
| `--auth-ldap-insecure-tls`                       | `PL_AUTH_LDAP_INSECURE_TLS`        |            | do not verify TLS certificate provided by server and trust it regardless of what CA issued it.                                                                                                                                                                                                          |
| `--auth-ldap-dn=DN`                              | `PL_AUTH_LDAP_DN`                  |            | path inside LDAP server for Bind operation. '%u' placeholder is replaced with user's login: - cn=%u,ou=users,dc=example,dc=com                                                                                                                                                                          |
| `--auth-ldap-search-rule=RULE`                   | `PL_AUTH_LDAP_SEARCH_RULES`        |            | Perform user search in LDAP before checking credentials. This allows to specify several DNs for users, but requires to have 'search' access to the LDAP catalogue. Format: \<filter>\|\<base DN> '%u' placeholder is replaced with user's login: - (cn=%u)\|ou=users,dc=example,dc=com                  |
| `--auth-ldap-search-user=USER`                   | `PL_AUTH_LDAP_SEARCH_USER`         |            | User to use for searching in LDAP (when at least one '--auth-ldap-search-rule' is set)                                                                                                                                                                                                                  |
| `--auth-ldap-search-password=PASSWORD`           | `PL_AUTH_LDAP_SEARCH_PASSWORD`     |            | Password to use for searching in LDAP (when at least one '--auth-ldap-search-rule' is set)                                                                                                                                                                                                              |
| `--sso-idp-issuer=URL`                           | `PL_SSO_IDP_ISSUER`                |            | OIDC issuer URL of the IdP for SSO login. Setting this enables SSO auth method. Discovery doc is fetched from '{issuer}/.well-known/openid-configuration' at runtime.                                                                                                                                   |
| `--sso-idp-id=ID`                                | `PL_SSO_IDP_ID`                    |            | Stable identifier of this IdP configuration. Keys persisted OIDC sessions to their refresh client, so changing it orphans existing sessions. Defaults to the SSO method name.                                                                                                                           |
| `--sso-idp-client-id=CLIENT_ID`                  | `PL_SSO_IDP_CLIENT_ID`             |            | Public OAuth client ID registered at the IdP as a native/public app.                                                                                                                                                                                                                                    |
| `--sso-idp-scopes=SCOPES`                        | `PL_SSO_IDP_SCOPES`                |            | Space-separated OIDC scope list. 'openid' is mandatory.                                                                                                                                                                                                                                                 |
| `--sso-idp-resource=AUDIENCE`                    | `PL_SSO_IDP_RESOURCE`              |            | Optional 'resource=' parameter (RFC 8707). Required by IdPs that issue JWT access tokens bound to a specific API audience (e.g. Logto).                                                                                                                                                                 |
| `--sso-idp-prompt=PROMPT`                        | `PL_SSO_IDP_PROMPT`                |            | OIDC 'prompt' parameter. One of: none, login, consent, select_account.                                                                                                                                                                                                                                  |
| `--sso-idp-access-type=TYPE`                     | `PL_SSO_IDP_ACCESS_TYPE`           |            | OIDC 'access_type' parameter. One of: online, offline. Google-specific: 'offline' is required for Google to issue a refresh token (other IdPs ignore it).                                                                                                                                               |
| `--sso-idp-redirect-port=PORT`                   | `PL_SSO_IDP_REDIRECT_PORTS`        |            | Loopback HTTP port on desktop for OAuth callback (RFC 8252). Specify multiple times to list alternates for port-contention handling. Every port must be pre-registered as a separate redirect URI at the IdP (http\://127.0.0.1:{port}/callback).                                                       |
| `--sso-idp-user-id-claim=CLAIM`                  | `PL_SSO_IDP_USER_ID_CLAIM`         | `sub`      | Top-level JWT claim that carries the stable Platforma user_id. May be a bare name (e.g. 'sub', 'oid') or a URL-shaped key (e.g. 'https\://platforma.bio/user_id'). (default: sub)                                                                                                                       |
| `--sso-idp-groups-claim=CLAIM`                   | `PL_SSO_IDP_GROUPS_CLAIM`          |            | Top-level JWT claim that carries the user's group memberships.                                                                                                                                                                                                                                          |
| `--sso-idp-subject-token-source=SOURCE`          | `PL_SSO_IDP_SUBJECT_TOKEN_SOURCE`  |            | Which IdP token to use as subject_token in cloud STS exchanges. One of: access_token, id_token.                                                                                                                                                                                                         |
| `--sso-idp-jwt-algorithm=ALG`                    | `PL_SSO_IDP_JWT_ALGORITHMS`        |            | Allowed JWT signing algorithm. Specify multiple times to allow more than one.                                                                                                                                                                                                                           |
| `--sso-idp-client-secret=SECRET`                 | `PL_SSO_IDP_CLIENT_SECRET`         |            | Confidential-client secret for the IdP token endpoint. Forwarded to the desktop, which performs the token exchange. Optional; public clients omit it. Cannot be combined with --sso-idp-client-secret-file.                                                                                             |
| `--sso-idp-client-secret-file=FILE`              | `PL_SSO_IDP_CLIENT_SECRET_FILE`    |            | Path to a file containing the IdP client secret. Cannot be combined with --sso-idp-client-secret.                                                                                                                                                                                                       |
| `--sso-method-name=NAME`                         | `PL_SSO_METHOD_NAME`               |            | Name of the SSO auth source (appears in AuthAPI.ListMethods). Defaults to 'sso'.                                                                                                                                                                                                                        |
| `--auth.ldap.url=ID=URL`                         | `PL_AUTH_LDAP_URL`                 |            | LDAP server URL: ldap\://host:port or ldaps\://host:port                                                                                                                                                                                                                                                |
| `--auth.ldap.user-dn=ID=DN`                      | `PL_AUTH_LDAP_USER_DN`             |            | direct-bind DN template; '%u' is replaced with the login (e.g. 'cn=%u,ou=users,dc=example,dc=com'). Cannot be combined with the search+bind flags                                                                                                                                                       |
| `--auth.ldap.bind-dn=ID=DN`                      | `PL_AUTH_LDAP_BIND_DN`             |            | DN of the service account used to search for users and groups                                                                                                                                                                                                                                           |
| `--auth.ldap.bind-password=ID=SECRET`            | `PL_AUTH_LDAP_BIND_PASSWORD`       |            | password of the auth.ldap.bind-dn service account                                                                                                                                                                                                                                                       |
| `--auth.ldap.bind-password-file=ID=FILE`         | `PL_AUTH_LDAP_BIND_PASSWORD_FILE`  |            | path to a file holding the password of the auth.ldap.bind-dn service account; leading and trailing whitespace is removed. Cannot be combined with auth.ldap.bind-password for the same provider                                                                                                         |
| `--auth.ldap.base-dn=ID=DN`                      | `PL_AUTH_LDAP_BASE_DN`             |            | base DN of the user search (e.g. 'ou=users,dc=example,dc=com')                                                                                                                                                                                                                                          |
| `--auth.ldap.user-filter=ID=FILTER`              | `PL_AUTH_LDAP_USER_FILTER`         |            | user search filter; '%u' is replaced with the login (e.g. '(uid=%u)')                                                                                                                                                                                                                                   |
| `--auth.ldap.search-rule=ID=FILTER\|BASE_DN`     | `PL_AUTH_LDAP_SEARCH_RULE`         |            | additional user search rule tried after auth.ldap.base-dn/user-filter (\<providerId>=\<filter>\|\<baseDN>, repeatable)                                                                                                                                                                                  |
| `--auth.ldap.group-base-dn=ID=DN`                | `PL_AUTH_LDAP_GROUP_BASE_DN`       |            | base DN for the reverse group search ('member=\<userDN>'), which finds groups the directory does not list on the user's memberOf attribute                                                                                                                                                              |
| `--auth.ldap.start-tls=ID=BOOL`                  | `PL_AUTH_LDAP_START_TLS`           |            | secure a plain ldap\:// connection with the StartTLS extension                                                                                                                                                                                                                                          |
| `--auth.ldap.trusted-ca=ID=FILE`                 | `PL_AUTH_LDAP_TRUSTED_CA`          |            | PEM file of CA certificates to trust for this server; a non-empty list replaces the system pool (\<providerId>=\<file>, repeatable)                                                                                                                                                                     |
| `--auth.ldap.client-cert=ID=CERT,KEY`            | `PL_AUTH_LDAP_CLIENT_CERT`         |            | client certificate presented to the server, for directories that authenticate the client by certificate: \<cert-path>,\<key-path>                                                                                                                                                                       |
| `--auth.ldap.insecure-tls=ID=BOOL`               | `PL_AUTH_LDAP_INSECURE_TLS`        |            | do not verify the server's TLS certificate. NEVER use in production; intended for test environments                                                                                                                                                                                                     |
| `--auth.provider-id=ID`                          | `PL_AUTH_PROVIDER_ID`              |            | declare an auth provider id (repeatable); the set of configured providers                                                                                                                                                                                                                               |
| `--auth.provider-type=ID=TYPE`                   | `PL_AUTH_PROVIDER_TYPE`            |            | provider type: sso \| htpasswd \| ldap                                                                                                                                                                                                                                                                  |
| `--auth.title=ID=TITLE`                          | `PL_AUTH_TITLE`                    |            | short label clients render for this login method, e.g. on the sign-in button; defaults to the method's built-in title                                                                                                                                                                                   |
| `--auth.description=ID=TEXT`                     | `PL_AUTH_DESCRIPTION`              |            | long-form text clients render beside the title; independent of --auth.title, and defaults to the method's built-in description                                                                                                                                                                          |
| `--auth.sso.issuer=ID=URL`                       | `PL_AUTH_SSO_ISSUER`               |            | OIDC issuer URL                                                                                                                                                                                                                                                                                         |
| `--auth.sso.client-id=ID=CLIENT_ID`              | `PL_AUTH_SSO_CLIENT_ID`            |            | OAuth client id                                                                                                                                                                                                                                                                                         |
| `--auth.sso.client-secret=ID=SECRET`             | `PL_AUTH_SSO_CLIENT_SECRET`        |            | OAuth client secret                                                                                                                                                                                                                                                                                     |
| `--auth.sso.client-secret-file=ID=FILE`          | `PL_AUTH_SSO_CLIENT_SECRET_FILE`   |            | path to a file holding the OAuth client secret; cannot be combined with auth.sso.client-secret for the same provider                                                                                                                                                                                    |
| `--auth.sso.scopes=ID=SCOPES`                    | `PL_AUTH_SSO_SCOPES`               |            | space-separated scopes; default 'openid profile email offline_access'                                                                                                                                                                                                                                   |
| `--auth.sso.resource=ID=AUDIENCE`                | `PL_AUTH_SSO_RESOURCE`             |            | optional 'resource=' parameter (RFC 8707), for IdPs that issue JWT access tokens bound to an API audience                                                                                                                                                                                               |
| `--auth.sso.prompt=ID=PROMPT`                    | `PL_AUTH_SSO_PROMPT`               |            | OIDC 'prompt' parameter: none \| login \| consent \| select_account                                                                                                                                                                                                                                     |
| `--auth.sso.access-type=ID=TYPE`                 | `PL_AUTH_SSO_ACCESS_TYPE`          |            | OIDC 'access_type' parameter: online \| offline. Google-specific: 'offline' is required for Google to issue a refresh token                                                                                                                                                                             |
| `--auth.sso.user-id-claim=ID=CLAIM`              | `PL_AUTH_SSO_USER_ID_CLAIM`        |            | top-level JWT claim carrying the provider's stable subject, e.g. 'sub' or 'oid'; default 'sub'                                                                                                                                                                                                          |
| `--auth.sso.subject-token-source=ID=SOURCE`      | `PL_AUTH_SSO_SUBJECT_TOKEN_SOURCE` |            | which IdP token is used as subject_token in cloud STS exchanges: access_token \| id_token                                                                                                                                                                                                               |
| `--auth.sso.redirect-port=ID=PORT`               | `PL_AUTH_SSO_REDIRECT_PORT`        |            | loopback HTTP port on desktop for the OAuth callback (RFC 8252); every port must be pre-registered at the IdP as http\://127.0.0.1:\<port>/callback (\<providerId>=\<port>, repeatable)                                                                                                                 |
| `--auth.sso.jwt-algorithm=ID=ALG`                | `PL_AUTH_SSO_JWT_ALGORITHM`        |            | allowed JWT signing algorithm (\<providerId>=\<alg>, repeatable); default RS256, ES256, ES384                                                                                                                                                                                                           |
| `--auth.htpasswd.file=ID=FILE`                   | `PL_AUTH_HTPASSWD_FILE`            |            | path to the htpasswd file                                                                                                                                                                                                                                                                               |
| `--auth.look-up-attr=ID=ATTR`                    | `PL_AUTH_LOOK_UP_ATTR`             | `login`    | user attribute matched to the incoming identity (default: login)                                                                                                                                                                                                                                        |
| `--auth.trust-unverified-email=ID=BOOL`          | `PL_AUTH_TRUST_UNVERIFIED_EMAIL`   |            | treat an email sent WITHOUT an email_verified claim as verified, so it can identify an existing user. Off by default; only for an IdP whose emails are authoritative but which sends no such claim (e.g. Entra ID). Requires auth.look-up-attr=email. Never overrides an explicit email_verified=false. |
| `--auth.map.login=ID=CLAIM`                      | `PL_AUTH_MAP_LOGIN`                |            | provider claim/attribute mapped to login; defaults to the provider's stable subject                                                                                                                                                                                                                     |
| `--auth.map.email=ID=CLAIM`                      | `PL_AUTH_MAP_EMAIL`                |            | provider claim/attribute mapped to email                                                                                                                                                                                                                                                                |
| `--auth.map.display-name=ID=CLAIM`               | `PL_AUTH_MAP_DISPLAY_NAME`         |            | provider claim mapped to display_name                                                                                                                                                                                                                                                                   |
| `--auth.map.full-name=ID=CLAIM`                  | `PL_AUTH_MAP_FULL_NAME`            |            | provider claim mapped to full_name                                                                                                                                                                                                                                                                      |
| `--auth.map.groups=ID=CLAIM`                     | `PL_AUTH_MAP_GROUPS`               |            | provider claim carrying group membership (login-time only, not stored)                                                                                                                                                                                                                                  |
| `--auth.extension-field=FIELD`                   | `PL_AUTH_EXTENSION_FIELD`          |            | declare a custom user extension field (repeatable)                                                                                                                                                                                                                                                      |
| `--auth.map-field=ID.FIELD=CLAIM`                | `PL_AUTH_MAP_FIELD`                |            | map a provider claim onto a declared extension field: \<providerId>.\<field>=\<claim> (repeatable)                                                                                                                                                                                                      |
| `--auth.create-users=ID=BOOL`                    | `PL_AUTH_CREATE_USERS`             |            | allow a login matching no existing user to provision one                                                                                                                                                                                                                                                |
| `--auth.admin-user=ID=REGEXP`                    | `PL_AUTH_ADMIN_USER`               |            | grant admin role to a login matching this regular expression in full (\<providerId>=\<regexp>, repeatable). Metacharacters in a literal login must be escaped (e.g. 'user\\.name').                                                                                                                     |
| `--auth.role.attr-regex=ID=ROLE=ATTR=REGEX`      | `PL_AUTH_ROLE_ATTR_REGEX`          |            | assign a role to a login whose user-model attribute value fully matches a regexp (\<providerId>=\<role>=\<attr>=\<regex>, repeatable)                                                                                                                                                                   |
| `--auth.role.group=ID=ROLE=GROUP`                | `PL_AUTH_ROLE_GROUP`               |            | assign a role to a login who belongs to the named group, matched exactly (\<providerId>=\<role>=\<group>, repeatable)                                                                                                                                                                                   |
| `--auth.role.group-regex=ID=ROLE=REGEX`          | `PL_AUTH_ROLE_GROUP_REGEX`         |            | assign a role to a login any of whose groups fully matches a regexp (\<providerId>=\<role>=\<regex>, repeatable). Needs a groups claim (auth.map.groups); not available with auth.google-group-fetch                                                                                                    |
| `--auth.google-group-fetch=ID=BOOL`              | `PL_AUTH_GOOGLE_GROUP_FETCH`       |            | fetch the signed-in user's Google groups from the Cloud Identity API at login, so group rules work for Google (whose token carries no groups claim). Off by default.                                                                                                                                    |
| `--auth.google-api-timeout=ID=DURATION`          | `PL_AUTH_GOOGLE_API_TIMEOUT`       |            | per-provider per-call timeout (TTL) for each Google Cloud Identity API call; only valid with --auth.google-group-fetch, unset defaults to 5s (\<providerId>=\<duration>).                                                                                                                               |
| `--auth.google-api-retries=ID=N`                 | `PL_AUTH_GOOGLE_API_RETRIES`       |            | per-provider retries after the first attempt for transient (429/5xx/transport) Google API failures; only valid with --auth.google-group-fetch, must be greater than 0, unset defaults to 2 (\<providerId>=\<n>).                                                                                        |
| `--auth-token=TOKEN`                             | `PL_AUTH_TOKEN`                    |            | use this token for authentication in single user mode. Cannot be combined with other auth settings (i.e. htpasswd or LDAP).                                                                                                                                                                             |
| `--auth-htpasswd=FILE`                           | `PL_AUTH_HTPASSWD`                 |            | enable authentication by static user DB stored in htpasswd file. Use standard 'htpasswd' tool from 'apache-utils' package to fill the file                                                                                                                                                              |
| `--master-secret=SECRET`                         | `PL_MASTER_SECRET`                 |            | master secret for JWT signing and resource signing (base64url-encoded, min 32 bytes decoded). Required for htpasswd/LDAP auth. Token-auth deployments derive it from the token automatically.                                                                                                           |
| `--master-secret-file=FILE`                      | `PL_MASTER_SECRET_FILE`            |            | path to file containing master secret (base64url-encoded, min 32 bytes decoded). Cannot be combined with --master-secret.                                                                                                                                                                               |
| `--admin-user=REGEXP`                            | `PL_ADMIN_USERS`                   |            | Grant admin role to logins matching this regular expression (full match). Admin role provides the same access as controller role. Metacharacters in a literal login must be escaped (e.g. 'user\\.name'). Can be specified multiple times.                                                              |

## Assets control

| Option                      | Environment variable     | Default | Description                                                                            |
| --------------------------- | ------------------------ | ------- | -------------------------------------------------------------------------------------- |
| `--assets-registry-url=URL` | `PL_ASSETS_REGISTRY_URL` |         | Custom url for asset registries (automatically replaces https\://bin.pl-open.science/) |

## Software packages

| Option                        | Environment variable  | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--package-registry=NAME=URL` | `PL_PACKAGE_REGISTRY` |         | add a software package registry. Format: 'NAME=URL'. Can be specified multiple times. Supported URL schemes: dir://PATH — local file-system endpoint http(s)://HOST/.. — remote HTTP endpoint Repeating the same NAME appends endpoints to that registry, in order; a package is resolved from each endpoint in turn (local-first, remote-fallback). If NAME matches a default registry (e.g. 'platforma-open', 'milaboratories'), its public URL endpoint is dropped — pass it again explicitly to keep it as fallback. |

## Special options

| Option                                  | Environment variable             | Default | Description                                                                                                                                                                                                                                                                                                                                          |
| --------------------------------------- | -------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--use-restricted-network-mode`         | `PL_USE_RESTRICTED_NETWORK_MODE` |         | start Platforma Backend in restricted network with limited access to global internet                                                                                                                                                                                                                                                                 |
| `--run-extended-self-check`             | `PL_RUN_EXTENDED_SELF_CHECK`     |         | Run extended self-check on startup. This enables configuration checks that may take long in some infrastructures.                                                                                                                                                                                                                                    |
| `--cancel-running-blocks`               |                                  |         | cancel running blocks and exit. This option prevents service from full start, performing automatic stop after all blocks are scheduled for cancellation.                                                                                                                                                                                             |
| `--invalidate-caches`                   |                                  |         | delete all field value cache records and exit. Causes removal of all cached resources and triggers all outcomes of this action (drop data from storages and so on).                                                                                                                                                                                  |
| `--only-verify-config`                  |                                  |         | Only verify configuration and exit. This makes Platforma Backend to perform all deep verification checks and exit once verification is done.                                                                                                                                                                                                         |
| `--migrate-blobs-to-primary=STORAGE_ID` |                                  |         | copy every blob whose only main incarnation lives in the given storage into the primary storage, attach a primary incarnation, and exit. Run this before switching a data-library storage from static to federative access so blobs stay readable after the access change.                                                                           |
| `--get-queue-limits`                    |                                  |         | Get limits for queues based on available CPU/RAM and exit. This allows to estimage how much of CPU/RAM will be available in each queue having given amount of CPU/RAM on server where Platforma Backend service will start. To alter amount of CPU/RAM for distibution between queues, use '--runner-local-memory' and '--runner-local-cpu' options. |
| `--show-license-info`                   |                                  |         | Show license payload information in human-readable format and exit.                                                                                                                                                                                                                                                                                  |
| `--restore-db=FILE`                     |                                  |         | Restore database from a gzipped dump file and exit. The dump file should be created via debug API endpoint '/db/state_raw'. Requires --debug-enabled flag (or PL_DEBUG_ENABLED=true) on the source platform. Example: curl -s http\://localhost:9091/db/state_raw \| gzip > backup.gz                                                                |
| `--gomaxprocs`                          |                                  |         |                                                                                                                                                                                                                                                                                                                                                      |

## DB backup options

| Option                                                    | Environment variable                        | Default       | Description                                                                                                                                                                                                                            |
| --------------------------------------------------------- | ------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--db-backup-interval=TIME`                               | `PL_DB_BACKUP_INTERVAL`                     | `24h`         | Interval between automatic DB backups. Set to 0 to disable. Default: 24h. (default: 24h)                                                                                                                                               |
| `--db-backup-keep=N`                                      | `PL_DB_BACKUP_KEEP`                         | `14`          | How many of the most recent automatic DB backups to keep. Older ones are deleted. Set to 0 to keep all (no rotation). Default: 14. (default: 14)                                                                                       |
| `--db-backup-prefix=PREFIX`                               | `PL_DB_BACKUP_PREFIX`                       | `db-backups/` | Object key prefix under which automatic DB backups are stored. (default: db-backups/)                                                                                                                                                  |
| `--db-backup-temp-dir=DIRECTORY`                          | `PL_DB_BACKUP_TEMP_DIR`                     |               | Directory used to spill the backup archive before upload. Defaults to the OS temporary directory.                                                                                                                                      |
| `--db-backup-storage-s3=URL`                              | `PL_DB_BACKUP_STORAGE_S3`                   |               | S3 bucket to store automatic DB backups in: - s3://\<bucket>\[/\<prefix-in-bucket>] (when you use official Amazon AWS S3) - http(s)://s3-service-endpoint/bucket\[/prefix-in-bucket] (when you use alternative S3-compatible services) |
| `--db-backup-storage-s3-region=REGION`                    | `PL_DB_BACKUP_STORAGE_S3_REGION`            |               | AWS S3 region.                                                                                                                                                                                                                         |
| `--db-backup-storage-s3-key=KEY`                          | `PL_DB_BACKUP_STORAGE_S3_KEY`               |               | S3 service key ID.                                                                                                                                                                                                                     |
| `--db-backup-storage-s3-secret=SECRET`                    | `PL_DB_BACKUP_STORAGE_S3_SECRET`            |               | S3 service secret key.                                                                                                                                                                                                                 |
| `--db-backup-storage-s3-no-data-integrity`                | `PL_DB_BACKUP_STORAGE_S3_NO_DATA_INTEGRITY` |               | Disable data integrity protection for uploads. Some S3-compatible services may not support modern data integrity checking mode used by default.                                                                                        |
| `--db-backup-storage-gcs=URL`                             | `PL_DB_BACKUP_STORAGE_GCS`                  |               | GCS bucket to store automatic DB backups in: - gs\://\<bucket>\[/\<prefix-in-bucket>] (when you use Google Cloud Storage)                                                                                                              |
| `--db-backup-storage-gcs-project-id=PROJECT_ID`           | `PL_DB_BACKUP_STORAGE_GCS_PROJECT_ID`       |               | GCP project ID.                                                                                                                                                                                                                        |
| `--db-backup-storage-gcs-service-account=SERVICE_ACCOUNT` | `PL_DB_BACKUP_STORAGE_GCS_SERVICE_ACCOUNT`  |               | GCP service account to use for authentication.                                                                                                                                                                                         |
| `--db-backup-storage-gcs-json-key-file-path=PATH`         | `PL_DB_BACKUP_STORAGE_GCS_JSON_FILE_PATH`   |               | Path to GCP service account JSON file.                                                                                                                                                                                                 |
| `--db-backup-storage-fs=DIRECTORY`                        | `PL_DB_BACKUP_STORAGE_FS`                   |               | Local filesystem directory to store automatic DB backups in.                                                                                                                                                                           |

## Provisioning options

| Option                                                   | Environment variable                   | Default | Description                                                                                                                                                                                                                                                                                            |
| -------------------------------------------------------- | -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--user-provisioning=URL`                                | `PL_USER_PROVISIONING`                 |         | CSV source for pre-start user provisioning. The URL scheme selects the backend: - s3://\<bucket>\[/\<key>] (official Amazon AWS S3) - http(s)://\<s3-endpoint>/\<bucket>\[/\<key>] (S3-compatible service) - gcs\://\<bucket>\[/\<key>] (Google Cloud Storage) - file:///\<absolute-path> (local file) |
| `--user-provisioning-match-attribute=ATTR[login\|email]` | `PL_USER_PROVISIONING_MATCH_ATTRIBUTE` | `login` | CSV column used to match provisioning rows to existing users. (default: login)                                                                                                                                                                                                                         |

## S3 provisioning credentials

| Option                                 | Environment variable             | Default | Description                                                                      |
| -------------------------------------- | -------------------------------- | ------- | -------------------------------------------------------------------------------- |
| `--user-provisioning-s3-region=REGION` | `PL_USER_PROVISIONING_S3_REGION` |         | AWS S3 region (required for s3:// URLs unless AWS_DEFAULT_REGION is set).        |
| `--user-provisioning-s3-key=KEY`       | `PL_USER_PROVISIONING_S3_KEY`    |         | S3 service key ID. Leave empty to use the standard AWS SDK credential discovery. |
| `--user-provisioning-s3-secret=SECRET` | `PL_USER_PROVISIONING_S3_SECRET` |         | S3 service secret key.                                                           |

## GCS provisioning credentials

| Option                                                    | Environment variable                       | Default | Description                                    |
| --------------------------------------------------------- | ------------------------------------------ | ------- | ---------------------------------------------- |
| `--user-provisioning-gcs-project-id=PROJECT_ID`           | `PL_USER_PROVISIONING_GCS_PROJECT_ID`      |         | GCP project ID.                                |
| `--user-provisioning-gcs-service-account=SERVICE_ACCOUNT` | `PL_USER_PROVISIONING_GCS_SERVICE_ACCOUNT` |         | GCP service account to use for authentication. |

## Options that the help does not show

`platforma --help` does not show this option, but the Backend (The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs.) accepts it:

| Option                      | Environment variable     | Default                                                   | What it does                                                                                                                                                                                                                                                                                                                                                                                              |
| --------------------------- | ------------------------ | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--blocks-registry-url=URL` | `PL_BLOCKS_REGISTRY_URL` | Empty: the Backend uses `https://blocks.pl-open.science/` | The address of a mirror of the Block registry (A service from which the Desktop App downloads Blocks. MiLaboratories runs the main one; a company can add its own.), with `/` at the end. The Backend replaces `https://blocks.pl-open.science/` with it in the addresses that it imports. See [Block registry mirror for the Backend](/configuration-registries/#block-registry-mirror-for-the-backend). |

## Next

- [Chart values](/reference-chart-values/)
- [Ports and endpoints](/reference-ports-and-endpoints/)

Source: https://docs.platforma.bio/reference-backend-options/
