Linux VPS

Proxmox users, permissions, API tokens and two-factor authentication

Stop using root for everything in Proxmox VE: create users and groups, grant roles on paths, add API tokens for automation and turn on TOTP two-factor login.

IntermediateProxmox VE2 min read

Proxmox users and permissions let each admin, customer or script have only the access they need. Logging in as root@pam for everything works, but one leaked password then controls every VM.

Before you start

  • Access as root@pam or another admin.
  • Know the two main realms: Linux PAM (system users on the node) and Proxmox VE authentication server (@pve, users stored by Proxmox, shared across a cluster).

Create a group and user

  1. Datacenter → Permissions → Groups → Create, for example admins or customer-a.
  2. Datacenter → Permissions → Users → Add: choose realm Proxmox VE authentication server, a username, password and the group.

Assign roles with Proxmox permissions

Permissions combine a path, a user or group, and a role.

PathRoleResult
/AdministratorFull control of everything
/vms/105PVEVMUserConsole, power and backups of VM 105 only
/pool/customer-aPVEVMAdminManage all VMs in the resource pool
/PVEAuditorRead-only view
  1. Datacenter → Permissions → Add → Group Permission.
  2. Pick the path, the group and the role, keep Propagate ticked to include child objects.

Tip: Resource pools (Datacenter → Permissions → Pools) group VMs and storage for one team or customer, so one permission on the pool covers all of them.

Create an API token

  1. Datacenter → Permissions → API Tokens → Add, select the user and a token ID such as automation.
  2. Untick Privilege Separation only if the token should have all the user's rights; otherwise give the token its own permissions.
  3. Copy the secret now; it is shown once.

Use it with a header like Authorization: PVEAPIToken=user@pve!automation=SECRET.

Turn on two-factor authentication

  1. Log in as the user and open Datacenter → Permissions → Two Factor (or the user menu → TFA).
  2. Add a TOTP entry, scan the QR code with an authenticator app and confirm with a code.
  3. Add Recovery Keys and store them safely.

Troubleshooting

  • User sees an empty tree: no permission has been assigned on any path.
  • Login failed for a @pve user: make sure the correct realm is selected on the login screen.
  • API token gets 403: privilege separation is on and the token has no permissions of its own.

Frequently asked questions

Should I disable root login?

Keep root@pam for emergencies with a strong password and 2FA, and use personal admin accounts day to day.

Can customers get their own VM access?

Yes, with PVEVMUser on their VMs, though a panel like Virtualizor or VirtFusion suits commercial hosting better.

Do @pve users work on all cluster nodes?

Yes, they are stored in the cluster configuration.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.