> For the complete documentation index, see [llms.txt](https://docs.vdo.ninja/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vdo.ninja/advanced-settings/turn-and-stun-parameters/and-autorelay.md).

# \&autorelay

General Option! ([`&push`](/advanced-settings/setup-parameters/push.md), [`&room`](/advanced-settings/setup-parameters/room.md), [`&view`](/advanced-settings/mixer-scene-parameters/view.md), [`&scene`](/advanced-settings/mixer-scene-parameters/scene.md), [`&director`](/advanced-settings/director-parameters/director.md))

## Options

Examples:

* `&autorelay`
* `&autorelay=1`
* `&autorelay=0`

| Value                     | Description                                  |
| ------------------------- | -------------------------------------------- |
| `1`, `true`, `on`, `yes`  | Enable relay escalation during auto-recovery |
| `0`, `false`, `off`, `no` | Disable automatic forced-relay escalation    |

## Details

* Automatic relay escalation is enabled by default. `&autorelay=1` can make that intent explicit or override an earlier `&autorecover=0`.
* Direct P2P remains the initial behavior. The default ICE policy is `all`; this feature does not make new connections TURN-only.
* On a hard connection failure, recovery first attempts one normal ICE restart. If the peer is still not connected after the recovery window, it makes one relay-eligible ICE restart.
* Useful when direct P2P paths fail intermittently due to strict NAT/firewall/routing issues.
* This does not force relay from the start like [`&relay`](/advanced-settings/turn-and-stun-parameters/and-relay.md); it escalates when recovery logic decides it is needed.
* Escalation exits without changing the PC when auto-relay is disabled, no TURN server is configured, or the PC is already relay-forced by [`&relay`](/advanced-settings/turn-and-stun-parameters/and-relay.md) or privacy mode.
* [`&autorecover`](/advanced-settings/settings-parameters/and-autorecover.md) controls a broader recovery bundle. When both flags are present, the dedicated `&autorelay` value wins, so `&autorecover=1&autorelay=off` keeps the other bundle features while disabling forced relay.

{% hint style="info" %}
`&autorelay=0`, `&autorelay=off`, `&autorelay=false`, and `&autorelay=no` all prevent automatic relay escalation regardless of room size. Use `&turn=0` when TURN servers and relay candidates must be removed entirely, including normal browser ICE selection under policy `all`.
{% endhint %}

## Related

{% content-ref url="/pages/DZBeQMi8cY8xB2H6rICO" %}
[\&pendingicettl](/advanced-settings/turn-and-stun-parameters/and-pendingicettl.md)
{% endcontent-ref %}

{% content-ref url="/pages/zGrl2B1uV4Vm3OkTolja" %}
[\&autorecover](/advanced-settings/settings-parameters/and-autorecover.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MZX-rFCzgmIUyBitkaa" %}
[\&relay](/advanced-settings/turn-and-stun-parameters/and-relay.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vdo.ninja/advanced-settings/turn-and-stun-parameters/and-autorelay.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
