Skip to content

Proxmox sign-in & API tokens

Every connection under Nodes signs in to the Proxmox VE API with one of three methods. The node’s Connection card shows which one, in the User line:

User lineSign-in
nexovirt@pve!nx… with the badge NexoVirt API tokenNexoVirt’s own API token (recommended)
user@realm!name with the badge API tokenAn API token you created yourself
root@pam (or another user) without a badgeUser name and password

Since panel 1.3.80 the node agent creates a Proxmox user nexovirt@pve with an API token for the panel, and the panel signs in with that token instead of the root password. This means:

  • No root password is stored in the panel database.
  • Root can use two-factor login in Proxmox: the token is not affected by it.
  • Every panel and every connection gets its own token (nx<panel id>h<connection id>), so two panels on the same cluster never replace each other’s token.

The user nexovirt@pve gets the comment NexoVirt panel and the role Administrator on /. The agent creates it only when it does not exist yet. A user with that name that NexoVirt did not create is left alone, and a nexovirt@pve user you disabled is never enabled again.

In the Add node wizard, leave Password or token secret empty and continue with the agent setup. Onboarding creates the token over the SSH connection (step Create NexoVirt API token) and the connection signs in with it right away. See Nodes & onboarding.

Existing connections move by themselves:

  1. Update the panel, then run Update all agents on the Nodes page. The switch needs agent 0.35.1 or newer on the connection.
  2. Within a few minutes the panel asks the agent for a token, checks it live against Proxmox (it must read the API and hold the rights the panel needs) and only then stores it. The stored password is deleted afterwards.
  3. If anything fails, the connection keeps its password and NexoVirt tries again every few minutes. The node’s Connection card shows the reason as a warning (“NexoVirt API token: …”); the warning goes away once the token works.

When Proxmox refuses the token later (it was deleted, for example), the agent creates a new one and the panel switches to it.

Settings > Security, tab Accounts, section Proxmox sign-in: switch off Sign in to Proxmox with NexoVirt’s own API token. Connections that already use the token keep it. To go back to a password, edit the connection and enter the password: NexoVirt then never switches that connection again.

You can also create a token yourself in Proxmox (Datacenter > Permissions > API Tokens) and enter it in the wizard or under Edit connection: API token name is the part after ! (for example panel for root@pam!panel), Password or token secret is the secret Proxmox showed once.

Proxmox reserves some settings for root@pam and refuses them for every API token, even root’s own, and for every other user:

  • container features other than nesting (keyctl, FUSE, NFS/CIFS mounts), also turning them off
  • bind mounts of a host folder into a container
  • PCI passthrough to a VM
  • custom QEMU arguments (args), and the lock NexoVirt sets on the old copy after a migration
  • the disk choice of a backup job (its vzdump hook)
  • restoring a container backup that has bind mounts or custom lxc.* settings

On connections that do not sign in as root@pam, NexoVirt sends these to the node agent, which applies them as root on the guest’s own node. The agent checks each value first: bind mounts only from folders below /srv, /mnt, /media, /data or /opt (more can be listed in /etc/nexovirt/bind-roots on the node) and only into unprivileged containers, no system or storage folders, no PCI bridges or devices the node uses itself. When the agent refuses a value, the action fails with “Proxmox lets only root change this setting, so the node agent applies it. It was not applied:” and the reason.

Guest consoles work with every sign-in method. The node shell (Console on a node page) is different: Proxmox gives a direct node shell only to root@pam, so with a token or another user the console shows a login prompt. Sign in as root there.

If every guest console says “connected” and then “disconnected” right after an update, a console proxy from before the update is still running. Panels before 1.3.83 could start a second proxy outside the nexovirt-console service, which systemctl restart does not reach (the service journal then shows it restarting every few seconds). Stop it on the panel server as root with pkill -f "WorkerMan: master"; the service starts the current proxy within seconds. From panel 1.3.83 the console watchdog does this by itself.

A cross-connection migration writes the guest’s settings on the target through a temporary API token, so the target refuses custom QEMU arguments (args) whatever sign-in the connections use. The migration check refuses such VMs up front (“Remove these settings before migrating”); remove the arguments first, or move the VM by backup and restore. Container features like keyctl are moved: the panel takes them off for the transfer and the agent sets them again on the target.

NexoVirt is developed and designed by Nucez Software, your partner for custom software and web design.