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

# Standalone component files

> The configuration file each Routr 3 image reads when a component runs on its own: path, keys, defaults and an example per component.

When the components run as separate containers, as in the Helm chart or a split Compose stack, each reads its own file. The image sets `CONFIG_PATH` to the file's path; mount your file there.

| Image | Component | `CONFIG_PATH` | Port |
| - | - | - | - |
| `fonoster/routr-edgeport` | EdgePort | `/etc/routr/edgeport.yaml` | `5060`–`5063` |
| `fonoster/routr-dispatcher` | Message Dispatcher | `/etc/routr/dispatcher.yaml` | `51901` |
| `fonoster/routr-location` | Location | `/etc/routr/location.yaml` | `51902` |
| `fonoster/routr-rtprelay` | RTPRelay | `/etc/routr/rtprelay.yaml` | `51903` |
| `fonoster/routr-connect` | Connect processor | `/etc/routr/connect.yaml` | `51904` |
| `fonoster/routr-pgdata` | Data API | `/etc/routr/data.yaml` | `51907` |
| `fonoster/routr-requester` | Requester | `/etc/routr/requester.yaml` | `51909` |
| `fonoster/routr-registry` | Registry | `/etc/routr/registry.yaml` | `8080` (`/healthz`) |

Every file follows the rules of `routr.yaml`: placeholders, `secret://` references, the [server keys](https://docs.routr.io/reference/configuration.md#server-keys) on every gRPC service and the [client keys](https://docs.routr.io/reference/configuration.md#client-keys) for every peer a component dials. Every file also takes `logLevel` (`debug`, `info`, `warn` or `error`, default `info`) and [`telemetry`](https://docs.routr.io/reference/configuration#telemetry) at its root.

Most files keep their Routr 2 shape, so a Routr 2 file still loads. Every file requires `apiVersion`: `v2beta1`, `v2` or `v3`; the examples use `v3`. They differ from `routr.yaml` in one way: except for `connect.yaml`, `rtprelay.yaml`'s `spec` and the Data API's `spec.data`, they ignore keys they don't know, as Routr 2 did.

## edgeport.yaml

Routr 2's `edgeport.yaml`, unchanged. The `spec` keys are those of [`spec.edgeport`](https://docs.routr.io/reference/configuration#spec-edgeport), with these differences:

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | Required. `EdgePort` |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `ref` | string | | Required. The EdgePort's reference, written in `X-Edgeport-Ref` |
| `metadata.region` | string | | A label |
| `spec.methods` | list of strings | | Required. No default here |
| `spec.processor.addr` | string | | Required. `host:port` of the Dispatcher |
| `spec.processorAuth` | object | Plaintext | How to reach the Dispatcher. See [client keys](https://docs.routr.io/reference/configuration.md#client-keys) |
| `spec.health` | object | Off | `GET /healthz` for an orchestrator, with `bindAddr` (default `0.0.0.0:8080`): what `ENABLE_HEALTHCHECKS` turned on. `routr.yaml` has it as `spec.health` |

```yaml edgeport.yaml theme={"system"}
kind: EdgePort
apiVersion: v3
ref: edgeport-01
metadata:
  region: default
spec:
  processor:
    addr: dispatcher:51901
  externalAddrs:
    - 203.0.113.10
  localnets:
    - 10.0.0.0/8
  methods: [REGISTER, INVITE, ACK, BYE, CANCEL, REFER, NOTIFY, MESSAGE]
  transport:
    - protocol: udp
      port: 5060
    - protocol: tcp
      port: 5060
```

Like every other component, the standalone EdgePort reads `CONFIG_PATH` and nothing else from its environment. Routr 2's EdgePort variables are keys of this file; see [Environment variables](https://docs.routr.io/reference/environment-variables.md#edgeport) for the map.

## dispatcher.yaml

Routr 2's `dispatcher.yaml`, plus authentication.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind`, `ref` | string | | Required, not empty |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `spec.bindAddr` | string | `0.0.0.0:51901` | Where its Processor service listens |
| `spec.processors` | list | | Required, at least one |
| `spec.processors[].ref` | string | | Required |
| `spec.processors[].addr` | string | | Required. `host:port` of the processor |
| `spec.processors[].methods` | list of strings | | Required. SIP method names, such as `INVITE`. Requests inside a call go to the processor that takes `INVITE`, whatever their method |
| `spec.processors[].matchFunc` | string | | Required. A JavaScript arrow function over the request, such as `req => true` |
| `spec.middlewares` | list | | Each entry takes `ref` and `addr` (required) and `postProcessor` (boolean: run after the processor) |
| `spec.backendAuth` | object | Plaintext | How to reach every processor and middleware. See [client keys](https://docs.routr.io/reference/configuration.md#client-keys) |
| `spec.recording` | object | Off | As [`spec.dispatcher.recording`](https://docs.routr.io/reference/configuration#spec-dispatcher) |
| [Server keys](https://docs.routr.io/reference/configuration.md#server-keys) | | | Under `spec`. Who may call it |

```yaml dispatcher.yaml theme={"system"}
kind: MessageDispatcher
apiVersion: v3
ref: message-dispatcher
spec:
  bindAddr: 0.0.0.0:51901
  processors:
    - ref: connect-processor
      addr: connect:51904
      matchFunc: req => true
      methods: [REGISTER, MESSAGE, INVITE, ACK, BYE, CANCEL, REFER, NOTIFY]
```

## location.yaml

Routr 2's `location.yaml`, plus authentication.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | Required. `Location` |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `metadata` | object | | Required, may be empty |
| `spec.bindAddr` | string | `0.0.0.0:51902` | Where it listens |
| `spec.cache` | object | `provider: memory` | As [`spec.location.cache`](https://docs.routr.io/reference/configuration#spec-location). `provider` is required when `cache` is set |
| [Server keys](https://docs.routr.io/reference/configuration.md#server-keys) | | | Under `spec`. Who may call it |

```yaml location.yaml theme={"system"}
kind: Location
apiVersion: v3
metadata:
  region: default
spec:
  bindAddr: 0.0.0.0:51902
  cache:
    provider: redis
    parameters: host=redis,port=6379
```

## connect.yaml

New in Routr 3: Routr 2's Connect read these settings from its environment. The names are the same, in camelCase under `spec`. Unknown keys are rejected.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | `Connect` when set |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `spec.locationAddr` | string | | Required. `host:port` of the Location |
| `spec.locationAuth` | object | Plaintext | How to reach it |
| `spec.apiAddr` | string | | Required. `host:port` of the Data API |
| `spec.apiAuth` | object | Plaintext | How to reach it. The Data API requires authentication beyond loopback, so this usually holds an `apiKey` |
| `spec.trustedEdgePortAddresses` | list of strings | `[]` | IPs, CIDRs or DNS names of peer EdgePorts whose forwarded requests skip routing. A name is kept resolved in the background and fails closed, as in `trustedRegistryAddresses`. Empty trusts none |
| `spec.trustedEdgePorts` | list of strings | `[]` | Narrows which `X-Edgeport-Ref` values are honored. Empty accepts any from a trusted address |
| `spec.trustedRegistryAddresses` | list of strings | `[]` | IPs, CIDRs or DNS names of the Requesters that send the Registry's REGISTER. `X-Gateway-Auth` is honored from them and from nobody else. Empty honors it from nobody |
| Every key of [`spec.connect`](https://docs.routr.io/reference/configuration#spec-connect) | | | `bindAddr`, `nonceMaxAge`, `registerDefaultExpires`, the verifier keys, `untrustedHeadersToStrip` and the server keys |

A DNS name in `trustedRegistryAddresses` is resolved every 10 seconds. If it stops resolving, Connect keeps its last addresses for 30 seconds and then trusts nothing. With a Registry, set this key, or the Trunks' REGISTER requests are refused.

```yaml connect.yaml theme={"system"}
apiVersion: v3
kind: Connect
spec:
  bindAddr: 0.0.0.0:51904
  locationAddr: location:51902
  apiAddr: apiserver:51907
  apiAuth:
    apiKey: secret://env/ROUTR_API_KEY
    tls:
      caFile: /etc/routr/certs/ca.crt
  nonceMaxAge: 300
  registerDefaultExpires: 3600
  trustedRegistryAddresses: [requester]
```

## data.yaml

The Data API reads a file in the shape of `routr.yaml` and uses only `logLevel`, `telemetry` and `spec.data`. Other sections are ignored, so RoutrOne's file works too. The keys are those of [`spec.data`](https://docs.routr.io/reference/configuration#spec-data).

```yaml data.yaml theme={"system"}
apiVersion: v3
kind: Routr
spec:
  data:
    backend: postgres
    url: secret://env/DATABASE_URL
    encryptionKey: secret://env/CLOAK_ENCRYPTION_KEY
    apiKeys:
      - secret://env/ROUTR_API_KEY
    tls:
      certFile: /etc/routr/certs/server.crt
      keyFile: /etc/routr/certs/server.key
```

The image no longer runs the database migrations or generates certificates. Routr 3 runs on Routr 2's schema; to create a new database, run the `fonoster/routr-pgdata-migrations` image, built from `ops/pgdata-migrations` with Routr 2's migrations unchanged, which the Helm chart runs at its `appVersion`.

## requester.yaml

New in Routr 3: Routr 2's Requester read no file. Without `CONFIG_PATH` it takes the defaults, which bind every address with no authentication, and so it refuses to start.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | Required. `Requester` |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `metadata` | object | | Required, may be empty |
| `spec.bindAddr` | string | `0.0.0.0:51909` | `host:port` where it listens |
| `spec.sipHost` | string | The host's local IP | Where its SIP listening points bind and what `Via` and `Contact` name |
| [Server keys](https://docs.routr.io/reference/configuration.md#server-keys) | | | Under `spec`. Beyond loopback it requires authentication, as the Data API does |

```yaml requester.yaml theme={"system"}
kind: Requester
apiVersion: v3
metadata: {}
spec:
  bindAddr: 0.0.0.0:51909
  apiKeys:
    - secret://env/ROUTR_API_KEY
```

## registry.yaml

Routr 2's `registry.yaml`, plus authentication.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | Required. `Registry` |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `spec.requesterAddr` | string | | Required. `host:port` of the Requester |
| `spec.requesterAuth` | object | Plaintext | How to reach it |
| `spec.apiAddr` | string | | Required. `host:port` of the Data API |
| `spec.apiAuth` | object | Plaintext | How to reach it |
| `spec.registerInterval` | number | `60` | Seconds between rounds. Above `0` |
| `spec.cache.provider` | string | `memory` | `memory` or `redis`: where registrations are kept |
| `spec.cache.parameters` | string | `host=localhost,port=6379` with `redis` | As for the Location |
| `spec.methods` | list of strings | | The REGISTER's `Allow` header |
| `spec.edgePorts` | list | | Required. Each entry takes `address` (required) and `region`. The first is used |
| `spec.enableHealthchecks` | boolean | `true` | Serve `GET /healthz` on port `8080`. Routr 2 read `ENABLE_HEALTHCHECKS` |

```yaml registry.yaml theme={"system"}
kind: Registry
apiVersion: v3
spec:
  requesterAddr: requester:51909
  requesterAuth:
    apiKey: secret://env/ROUTR_API_KEY
    # This Requester serves no TLS: accept the key in clear on this network
    insecure: true
  apiAddr: apiserver:51907
  apiAuth:
    apiKey: secret://env/ROUTR_API_KEY
    tls:
      caFile: /etc/routr/certs/ca.crt
  registerInterval: 60
  methods: [INVITE, MESSAGE]
  edgePorts:
    - address: edgeport:5060
```

## rtprelay.yaml

Routr 2's `rtprelay.yaml`, which now also holds what Routr 2 read from `RTPENGINE_HOST`, `RTPENGINE_PORT` and `RTPENGINE_TIMEOUT`. The file is required. `spec` rejects unknown keys.

| Key | Type | Default | Description |
| - | - | - | - |
| `kind` | string | | Required. `RTPRelay` |
| `apiVersion` | string | | Required. `v2beta1`, `v2` or `v3` |
| `spec.bindAddr` | string | `0.0.0.0:51903` | Where its middleware service listens |
| `spec.rtpengine.host` | string | | Required. The RTPEngine host |
| `spec.rtpengine.port` | integer | `22222` | Its NG control port |
| `spec.rtpengine.timeoutMs` | integer | `5000` | How long a command waits for an answer |
| `spec.profiles` | map | | As [`spec.rtprelay.profiles`](https://docs.routr.io/reference/configuration#spec-rtprelay) |
| [Server keys](https://docs.routr.io/reference/configuration.md#server-keys) | | | Under `spec`. Who may call it |

```yaml rtprelay.yaml theme={"system"}
kind: RTPRelay
apiVersion: v3
spec:
  rtpengine:
    host: rtpengine
  profiles:
    phone-to-secure-phone:
      SDES:
        - only-AES_CM_128_HMAC_SHA1_80
```

## Related

> [card] [routr.yaml](https://docs.routr.io/reference/configuration.md)
>
> Every key, and how values and secrets resolve.

> [card] [Helm values](https://docs.routr.io/reference/helm-values.md)
>
> The chart writes these files from its values.


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