Skip to main content
On a Compute virtual machine, you cannot log into the Nebius AI Cloud CLI with your user account, because it requires opening the web console in a browser. However, you can still use the Nebius AI Cloud CLI with a service account, in one of two ways:

Prerequisites

Create a service account and add it to a group that has the roles needed for your operations. Usually, this means adding it to at least the default editors group. You do not need to install the Nebius AI Cloud CLI. It is preinstalled on every Compute VM.

Specify the service account on VM creation

When you create a VM, specify the service account ID in the VM specifications:
Add the --service-account-id parameter to the creation command:
nebius compute instance create \
  "$(cat /path-to-spec/instance.yaml)" \
  --service-account-id <service_account_ID>
Alternatively, add the service_account_id parameter to the VM specification:
...
spec:
  ...
  service_account_id: <service_account_ID>
Once the VM is ready, you can connect to it and use the Nebius AI Cloud CLI without any additional setup. The authorization token is automatically fetched from /mnt/cloud-metadata/token.

Set up a profile for the service account on the VM

If you haven’t specified a service account during VM creation, you can configure a Nebius AI Cloud CLI profile for that service account:
  1. Create an authorized key for the service account.
  2. Create a profile for the service account on your VM. Follow the instructions in How to set up the Nebius AI Cloud CLI.
After that, you can use the Nebius AI Cloud CLI.