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

# Private Services

> Register one service behind a tunnel on a Network, under a private hostname, without routing the subnet around it.

> [!WARNING]
>
> **Preview.** Not available yet.

A private service registers one destination behind a tunnel on a [*Network*](https://developers.telnyx.com/docs/network/overview.md), under a hostname that resolves only on that *Network*. Clients on the *Network* reach that service and get no route to the subnet around it.

```bash Workstation theme={null}
telnyx-edge network service add acme-prod wiki --tunnel chicago-dc --service https://10.20.3.7:8443 --hostname wiki.corp.internal
```

The service names its tunnel and the address that the tunnel process reaches. The API takes the same fields:

```json POST /v2/network_services theme={null}
{
  "name": "wiki",
  "network_id": "d8a7e0b1-2d64-4d62-aeb2-b77465835059",
  "hostname": "wiki.corp.internal",
  "tunnel_id": "abb096ba-61ae-4f9c-9269-98d8ed94f6aa",
  "service": "https://10.20.3.7:8443"
}
```

`wiki.corp.internal` resolves only for clients on `acme-prod`. Telnyx creates no public DNS record for it.

## Bind the Service

A function binds the service by its ID:

```toml func.toml theme={null}
[network_service.WIKI]
id = "b41c7e02-…"
```

The binding fixes the destination, so the URL of a request sets only its path:

```ts Function theme={null}
const page = await env.WIKI.fetch("/runbooks/deploys");
```

The request arrives at `10.20.3.7:8443` through the tunnel.
