> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Gateway and Orchestrator Interface

> Configure a node running both a gateway and an orchestrator on Livepeer. Covers deployment architecture, port allocation, self-routing behaviour, pricing alignment, and the off-chain gateway with on-chain orchestrator pattern.

> [!TIP]
>
> The most common combined deployment is an off-chain gateway routing to a dedicated on-chain orchestrator. The gateway handles inbound client traffic; the orchestrator handles on-chain protocol participation. Running both roles on one machine is supported but requires deliberate port separation.

***

Run both a gateway and an orchestrator when you need control over client traffic, routing, and workload execution end to end. This page explains the deployment patterns, port separation, self-routing choices, and price alignment rules that matter when one operator owns both roles.

For detailed gateway setup, see the [Gateway Setup](/v2/gateways/quickstart/gateway-setup.md) guide. For orchestrator setup, start with the [Orchestrator Setup Guide](/v2/orchestrators/setup/guide.md).

Deployment Patterns

## Deployment patterns

Three deployment patterns cover most use cases:

> [tab] Off-chain gateway + on-chain orchestrator
>
> **The most common pattern.** The gateway runs without on-chain participation — it holds no ETH, no keystore, and connects to your orchestrator directly via `-orchAddr`. The orchestrator runs with full on-chain registration and stake.
>
> The gateway routes jobs to the orchestrator via direct address specification, bypassing protocol discovery. Payment is handled by a remote signer or clearinghouse connected to the gateway.
>
> This pattern suits operators who want gateway capability without managing ETH deposits in the gateway process itself. The orchestrator handles all on-chain protocol activity.
>
> **Port layout:** Gateway on `:7935` (HTTP) and `:7935` (RTMP). Orchestrator on `:8935` (serviceAddr). No port conflict.

> [tab] Same machine (combined)
>
> Both gateway and orchestrator processes run on one machine. Each runs as a separate go-livepeer process with different flags and different ports.
>
> This pattern suits operators with a single high-capacity machine who want to eliminate network latency between gateway and orchestrator. Combined with an AI worker, this is the densest configuration possible for a single node.
>
> **Port conflict risk is high on same-machine deployments.** Assign distinct ports to each role. See port allocation below.

> [tab] Separate machines
>
> Gateway and orchestrator run on separate machines connected over the network. The gateway is configured with `-orchAddr <orchestrator-ip>:8935` for an off-chain gateway, or discovers the orchestrator via on-chain registration if running on-chain.
>
> This pattern is appropriate at scale. A gateway that faces external traffic scales independently from orchestrator registration and staking.

Port Allocation

## Port allocation

The two roles use different network interfaces and ports. On a single machine, assign each process its own non-overlapping ports.

<table>
  <thead>
    <tr>
      Role

      Flag

      Default port

      Purpose
    </tr>
  </thead>

  <tbody>
    <tr>
      Gateway

      `-httpAddr`

      `:7935`

      Gateway HTTP API for client connections
    </tr>

    <tr>
      Gateway

      `-rtmpAddr`

      `:1935`

      RTMP ingest port for video streams
    </tr>

    <tr>
      Orchestrator

      `-serviceAddr`

      `:8935`

      Public address gateways connect to for job execution
    </tr>

    <tr>
      Orchestrator

      `-cliAddr`

      `:7936`

      Internal livepeer\_cli management interface
    </tr>
  </tbody>
</table>

The default gateway and orchestrator ports stay separate on the same machine. Verify no other process is bound to them before starting both roles:

```bash icon="terminal" title="Check gateway and orchestrator ports" theme={null}
ss -tlnp | grep -E ':7935|:8935|:1935|:7936'
```

Self-Routing

## Self-routing

Self-routing is when a gateway you control routes jobs to an orchestrator you also control.

**Off-chain gateway to own orchestrator:** Configure the gateway with `-orchAddr <your-orchestrator-ip>:8935`. The gateway routes all jobs to the specified address. This is explicit self-routing — the gateway sends all work to your orchestrator.

**On-chain gateway discovering own orchestrator:** If both your gateway and orchestrator are on-chain, the gateway discovers your orchestrator through the normal protocol selection process, alongside all other active orchestrators. Your orchestrator competes on price and stake like any other.

Self-routing via explicit `-orchAddr` is appropriate when:

* Testing AI inference quality before serving jobs to clients
* Running a dedicated internal service (e.g. transcoding your own content)
* You want guaranteed routing to your own infrastructure without depending on protocol selection

Self-routing through on-chain discovery remains competitive. Your orchestrator still has to win on price, stake, and performance to receive the job. Use an off-chain gateway with direct `-orchAddr` when routing must stay dedicated.

**Pricing alignment:** The gateway's `-maxPricePerUnit` (or `-maxPricePerCapability` for AI) must be at or above the orchestrator's `-pricePerUnit` (or `price_per_unit` in `aiModels.json`). A gateway with a cap below the orchestrator's advertised price will fail to route any jobs to it.

Pricing Alignment

## Pricing alignment

When you control both gateway and orchestrator, configure the gateway's caps relative to the orchestrator's advertised prices:

```text icon="terminal" title="Price cap alignment rule" theme={null}
gateway -maxPricePerUnit  ≥  orchestrator -pricePerUnit
gateway -maxPricePerCapability  ≥  orchestrator aiModels.json price_per_unit (per pipeline)
```

A gateway cap exactly equal to the orchestrator price is sufficient for self-routing but leaves no margin for `autoAdjustPrice` adjustments (which increase the advertised price during gas spikes). Set the gateway cap 20 to 30% above the orchestrator base price to prevent job failures during gas price increases.

Example video pricing alignment:

```bash icon="terminal" title="Example price alignment" theme={null}
# Orchestrator startup
-pricePerUnit 1000
-autoAdjustPrice=true    # may raise advertised price during gas spikes

# Gateway startup (same operator)
-maxPricePerUnit 1300    # 30% above base to absorb autoAdjustPrice headroom
```

Monitoring Both Roles

## Monitoring both roles

Each role produces its own Prometheus metrics. On a single machine, ensure both processes export to different ports to avoid metric collisions.

**Orchestrator metrics to watch:**

* `livepeer_transcode_duration_seconds` — transcoding latency
* `livepeer_winning_ticket_count` — PM ticket win frequency
* `livepeer_reward_call_success` — reward call outcome per round

**Gateway metrics to watch:**

* `livepeer_broadcaster_sessions_total` — active inbound sessions
* `livepeer_broadcaster_upload_errors` — upload failures (may indicate orchestrator issues)

For production deployments running both roles, maintain separate log streams per process to avoid interleaving:

```bash icon="terminal" title="Separate log streams per role" theme={null}
# Two separate systemd units or Docker containers
# Gateway logs
journalctl -u livepeer-gateway -f

# Orchestrator logs
journalctl -u livepeer-orchestrator -f
```

## Related pages

> [card] [Gateway Setup](/v2/gateways/quickstart/gateway-setup.md)
>
> Full gateway configuration guide including payment mode selection and pipeline configuration.

> [card] [Gateway Relationships](/v2/orchestrators/guides/advanced-operations/gateway-relationships.md)
>
> How gateways discover and select orchestrators — selection criteria from the orchestrator side.

> [card] [Dual Mode Configuration](/v2/orchestrators/guides/deployment-details/dual-mode-configuration.md)
>
> Running video transcoding and AI inference from a single go-livepeer process.

> [card] [Pricing Strategy](/v2/orchestrators/guides/config-and-optimisation/pricing-strategy.md)
>
> Aligning orchestrator price with gateway caps for self-routing and commercial relationships.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.