Technical

Disable server shutdown/restart from the web interface with a custom Proxmox role

Disable server shutdown/restart from the web interface with a custom Proxmox role

Disable server shutdown/restart from the web interface by creating a custom role without Sys.PowerMgmt. That’s it. The old forum threads tell you to edit the GUI, but Proxmox has had role-based permissions for years — you just omit one privilege.

A cybersecurity expert inspecting lines of code on multiple monitors in a dimly lit office.

Why Sys.PowerMgmt matters

Proxmox decides what buttons you see based on your role’s privileges. The shutdown and restart buttons on a node or VM are tied to Sys.PowerMgmt. Take that away, and the buttons disappear. No more accidental reboots from someone clicking around.

Create the role

Go to Datacenter → Permissions → Roles → Create. Name it something like NoPower. Give it all the privileges you want the user to have, but leave Sys.PowerMgmt unchecked. That’s the whole trick.

If you want to base it on an existing role, click the dropdown and pick one, then uncheck Sys.PowerMgmt. For a read-only user, start with PVEAuditor and add VM.Config.Disk if they need to attach ISOs or something. But no Sys.PowerMgmt.

A detailed look at the interior of an industrial storage warehouse with metal shelves.

Assign it to a user or group

Now go to Datacenter → Permissions → Users (or Groups). Add the user, set the role to NoPower, and the path to whatever they should see — / for everything, or a specific pool. They’ll log in and the shutdown/restart buttons just won’t be there.

You can also assign the role to a group so new users get it automatically. And if you have an existing user, just edit their permissions and swap the role.

What it looks like

For a node, the top-right dropdown will still show “Reboot” and “Shutdown” but they’ll be greyed out or missing entirely depending on the Proxmox version. On a VM, the buttons in the top-right corner disappear. The user can still do everything else their role allows.

One thing: this doesn’t stop someone with shell access from running shutdown or reboot on the host. It only hides the web UI buttons. If you need to block actual power actions, you’d have to mess with sudoers or polkit, and that’s a different can of worms.

Why not edit the GUI?

The old advice was to edit /usr/share/pve-manager/js/pvemanagerlib.js and remove the buttons. That breaks on every update and is a pain to maintain. The role-based way survives upgrades and is way cleaner. Don’t bother with the GUI hack.

If you’ve got users who keep rebooting the wrong VM, this is the fix. Takes five minutes and you never think about it again.

Related: error:0A000126:SSL on Proxmox Web Interface: Fix the Unexpected EOF

Leave a comment

Comments are reviewed before they appear. Your email is never published.