{"version":"2.1.328","anchor":"new-hidden-metadata-flag-for-cloud-sessions-on-self-hosted","canonical_anchor":"new-hidden-metadata-flag-for-cloud-sessions-on-self-hosted","heading":"Hidden --metadata flag labels cloud sessions on self-hosted environments","tier":"use","area":"Self-Hosted Runner","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328\/e\/new-hidden-metadata-flag-for-cloud-sessions-on-self-hosted","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.328","markdown":"### Hidden --metadata flag labels cloud sessions on self-hosted environments\n\nA new hidden, repeatable --metadata key=value flag labels a cloud session for a self-hosted environment's start script and needs --environment\n\n**Unclear.** It is not clear whether the server already passes these labels on to the start-up script.\n\n**What**\n\nA new command-line flag, `--metadata <key=value>`, attaches labels to a cloud session that runs on a self-hosted environment (machines you run yourself). The labels are for the script that starts the session's machine.\n\n- It is hidden from help and can be given more than once.\n\n- Like `--correlation-id`, it requires `--environment` with a self-hosted environment's ID.\n\n- A key is lower-case letters and digits with single `_` between them, and starts with a letter, as in `--metadata size=large`. Other shapes give an error, and duplicate keys are rejected.\n\n- The values are stored together with `correlation_id`.\n\n- `--metadata` and `--correlation-id` are added to the list of flags that already held `--resume-drops-turn`, `--project-config-root`, `--exec`, `--forward-home-settings` and `--attach-serve`.\n\n**Why**\n\nOperators of self-hosted environments can pass per-session settings, such as a machine size, to their own scripts without changing the scripts for every session.\n\n- Area: Self-Hosted Runner\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: no"}