SG SealGrid Athena Docs

Screen-Share Relay (TURN)

The built-in WebRTC technician screen-share connects the operator's browser directly to the target machine whenever the network allows it. When the two sides sit behind restrictive NAT or firewalls and a direct path can't be formed, Athena can route the media through a coturn TURN relay — a well-known, firewall-deterministic path that keeps screen-share working. This page covers configuring that relay and standing one up on a managed Linux host with a single click.

In the shipped default, screen-share is direct-first and the relay is left out of the media path. A relay is optional — configure one only when you need reliable screen-share across networks where a direct connection can't be established.

How the relay fits in#

When a screen-share session starts, the browser and the target agent attempt to negotiate the most direct media path available. If a relay is configured, the server mints short-lived relay credentials and hands both sides the relay address so media can fall back to the relay when a direct route fails. The relay never sees session content in the clear beyond forwarding the encrypted media stream — it exists to guarantee connectivity, not to inspect traffic.

Running the relay involves two independent pieces:

Configuring relay settings#

Under Settings → Agents → Remotes → WebRTC Screen Share, enable the integration and fill in the relay endpoint. The individual fields are composed into a single turn:host:port?transport=… URI when you save:

SettingConfig keyDefaultPurpose
Enable screen-shareRemoteSession:WebRtcEnabledtrueMaster switch for the WebRTC technician screen-share
SchemeRemoteSession:Turn:Schemeturnturn or turns
HostRemoteSession:Turn:HostemptyRelay hostname or IP reachable by both operator and agent
PortRemoteSession:Turn:Port3478Relay listening port
TransportRemoteSession:Turn:Transportudpudp or tcp
Credential TTLRemoteSession:Turn:CredentialTtlSeconds600Lifetime of the minted, time-limited relay credentials
Static auth secretRemoteSession:Turn:StaticAuthSecretemptyShared secret that must match the relay's static-auth-secret

The static auth secret is sensitive. For unattended deployments it is supplied out-of-band via the environment variable RemoteSession__Turn__StaticAuthSecret rather than being committed to a configuration file. The value must match the static-auth-secret on the relay, and the server and relay clocks must agree (NTP) for the time-limited credentials to validate.

One-click relay provisioning#

Rather than build a relay host by hand, Athena can stand up coturn on a machine you already manage. On the same WebRTC Screen Share settings screen, an Admin-only section lets you pick an online Linux agent and click Configure relay. Athena renders a coturn setup script from your saved relay settings and runs it on the selected agent over the existing secure agent channel — there is no SSH, no extra port to open, and no separate credential to manage.

Before provisioning, make sure that:

The provisioning run is idempotent and, on the target host, will:

Success is confirmed by an explicit health marker the script emits only when the coturn service is actually running — a zero exit code alone is not treated as success. If the marker isn't reported within the provisioning window, the action is reported as failed. When it succeeds, Athena automatically runs a Test Connection against the new relay and shows the result inline.

Verifying with Test Connection#

The Test Connection button on the WebRTC Screen Share settings probes the configured relay and reports whether it is reachable and whether the shared secret is accepted:

Result fieldMeaning
Reachable & credential acceptedThe relay answered and validated the minted credential — screen-share can fall back to it
Relay addressThe relay's server-reflexive/relay address returned by the probe
LatencyRound-trip time to the relay, in milliseconds, when available
Not configuredNo relay URI is set — this is the normal direct-first state, shown as an informational (not error) status

If Test Connection fails right after a successful provision, the most common causes are a secret mismatch between the server settings and the relay, or clock skew between the two hosts. Confirm both sides use the same secret and are time-synced. The same relay check is available per agent from Screen-Share Diagnostics, alongside the agent's helper version and last-session history.

REST API#

Provisioning is also available over the REST API for scripted rollouts. The relay host and secret come from the saved settings, so there is no request body:

ActionEndpointRole
Provision coturn onto a Linux agentPOST api/agents/{agentId}/provision-relayAdmin

The response body reports the outcome:

FieldMeaning
successWhether the relay came up (driven by the health marker, not the exit code alone)
markerFoundWhether the success marker was reported by the agent
exitCodeExit code from the provisioning run, when available
outputTail of the run's output (the secret is never echoed)
relayTestThe follow-up Test Connection result on success
messageHuman-readable summary of the outcome

A provisioning failure returns HTTP 200 with success=false in the body. Non-200 responses are reserved for authorization, validation (not a Linux agent, or offline), and agent-not-found errors.

PowerShell#

The Athena PowerShell module exposes provisioning as a single cmdlet so you can stand up (or re-apply) a relay from a script or the pipeline:

CmdletWhat it does
Install-AthenaRelayProvisions coturn onto the specified online Linux agent (-AgentId) using the saved relay settings; requires Admin
# Provision the relay onto a specific Linux agent
Install-AthenaRelay -AgentId "12345678-1234-1234-1234-123456789012"

# Or pipe the target in from Get-AthenaAgent
Get-AthenaAgent -Hostname "relay-host" | Install-AthenaRelay

The cmdlet returns the same result fields as the API (success, marker found, output, and the follow-up Test Connection), and re-running it simply re-applies the current settings — handy after you change the relay host, port, or secret.

Auditing#

Every provisioning action is written to the audit log with the target agent, the initiating user, the relay host and port, whether the success marker was found, and the overall result. The shared secret and the setup script itself are never recorded — only the redacted metadata is stored — so the audit trail is safe to forward to a SIEM.

Provisioning configures the selected agent as a shared media relay for screen-share. Choose a Linux host with a stable, reachable address that both operators and target machines can connect to on the configured port, and keep its clock in sync with the Athena server.