Skip to main content

Private links

Reference for lk agent private-link, which connects deployed agents to private services in your AWS or Azure network.

Overview

Use lk agent private-link to connect deployed agents to private services in your AWS or Azure network. For setup, see Private Links. To install the CLI, see Install the CLI.

Create a private link

Create a private link to an endpoint service in your cloud account.

lk agent private-link create [options]

Options for private-link create:

  • --name NAME: NAME for the private link. Required.
  • --region REGION: LiveKit agent REGION for the link. This is the LiveKit region, not the cloud provider region. If unset in interactive mode, the CLI shows a picker of available regions.
  • --port PORT: TCP PORT to reach on the target service. Must match the port your endpoint service listens on. Required.
  • --endpoint ENDPOINT: The ENDPOINT to connect to: the AWS endpoint service name, the Azure Private Link Service alias, or the Azure Resource ID. Required.
  • --cloud-region REGION: Cloud provider REGION that hosts the resource. Required when --endpoint is an Azure Resource ID. For AWS, LiveKit derives the region from the endpoint service name, so you can omit it.
  • --json (alias -j): Output as JSON.

For --region values, see agent deployment regions.

The command returns the private link ID and prints the generated *.link hostname as Gateway DNS.

Examples

Create a link on AWS:

lk --project production agent private-link create \
--name customer-redis \
--region us-east \
--port 6379 \
--endpoint 'com.amazonaws.vpce.us-east-1.vpce-svc-0123456789abcdef0'

Create a link on Azure:

lk --project production agent private-link create \
--name customer-redis \
--region us-east \
--cloud-region eastus \
--port 10000 \
--endpoint '<AZURE_RESOURCE_ID>'

Check private link status

Show a private link's status and health. See status values.

lk agent private-link health-status [options]

Options for private-link health-status:

  • --id ID: Private link ID. Required.
  • --json (alias -j): Output as JSON.

Examples

lk --project production agent private-link health-status --id CAPL_MyLinkId

List private links

List all private links in the current project.

lk agent private-link list [options]

Options for private-link list:

  • --json (alias -j): Output as JSON.

Examples

lk --project production agent private-link list

Delete a private link

Delete a private link. Wait for the endpoint connection to disappear from your cloud console before deleting the provider-side resources.

lk agent private-link delete [options]

Options for private-link delete:

  • --id ID: Private link ID. Required.
  • --json (alias -j): Output as JSON.

Examples

lk --project production agent private-link delete --id CAPL_MyLinkId