Prerequisites
- Install and configure the Nebius CLI.
-
Get the project ID and the tenant ID, and save them to environment variables:
-
Get the tunnel ID by listing tunnels in your project:
The command uses the project ID from your CLI profile configuration. Copy the ID of the tunnel that you want to connect to and save it to an environment variable:
Connecting a service
- Docker
- Helm
- VM
- Install Docker Engine.
-
Create a service account and save its ID:
To grant wider access instead of creating a dedicated group with the
applicationtunnel.agentrole, you can add the service account to theeditorsgroup. -
Create a group for Nebius Tunnels service accounts and save its ID:
-
Grant the group the
applicationtunnel.agentrole for the tunnel:To grant access to more tunnels, create the permit on a broader resource: a project or a tenant. A permit on a project applies to all tunnels in that project. A permit on a tenant applies to all tunnels in all projects in the tenant. -
Add the service account to the group:
-
Create a key pair:
-
Upload the public key and save its ID:
-
Create
config.yamlfor the agent:In the agent configuration,services.namecan contain up to 20 characters and must use only lowercase Latin letters and digits ([a-z0-9]). Don’t use dashes or dots. For multiple services, configure theservicessection like this: -
Run the agent using a cross-platform Docker image:
When the agent connects, it returns the public endpoint for each service. The endpoint format is:Where:
service_nameis theservices.namevalue from the agent configuration.tunnel_masked_IDis the mask of the tunnel ID without theapplicationtunnel-prefix and regional routing code. For example, forapplicationtunnel-<routing_code>abcdef1234, the tunnel ID mask isabcdef1234.regionis the region of the project where the tunnel was created, for exampleeu-north1.