"Full root access" is one of the first features listed on almost every VPS and dedicated server plan. It sounds powerful, and it is. But what does it actually let you do, why don't shared hosting plans include it, and how do you use it without accidentally wrecking your server or leaving it open to attackers?
What is root?
On Linux and other Unix-like systems, root is the superuser account. It has user ID 0 and is allowed to do anything on the system:
- Read, change or delete any file, including system files
- Install, update and remove software
- Start, stop and configure services such as the web server, database and firewall
- Create, modify and delete user accounts
- Change network settings and open or close ports
- Change kernel parameters, and on a full virtual machine or dedicated server, install a different kernel
Regular users are restricted by file permissions. Root ignores them. Root access simply means you are allowed to act as this account on your server.
Windows has a similar idea in the built-in Administrator account, but the term "root" belongs to the Linux and Unix world, where most web servers live.
Why shared hosting does not give you root
On shared hosting, many customers' websites run on one server. If any one of them had root, they could read everyone else's files, change server-wide settings or install software that affects all accounts. So shared hosting gives each customer a restricted user account and a control panel like cPanel or DirectAdmin, while the provider keeps root for themselves.
That restriction is a feature: the provider handles server software, security updates and configuration, so you do not have to.
What root access lets you do
With a VPS or dedicated server, the machine (or virtual machine) is yours alone, so you get root. That opens up a lot:
- Install any software: specific versions of Node.js, Python, PHP, Java, Go or database servers
- Run long-lived processes: background workers, game servers, bots, message queues
- Use Docker and other container tools
- Tune performance: adjust web server, database and kernel settings for your workload
- Configure your own firewall and security tools
- Host multiple sites and apps exactly the way you want
- Install a control panel if you prefer one
In short, root access turns hosting from "space to put a website" into "a server you can build anything on."
The risks of root access
The same power cuts both ways.
Mistakes are unforgiving
Root does not ask "are you sure?" A mistyped command can delete critical files, lock you out by misconfiguring SSH or the firewall, or break the package system. There is no undo.
Attackers want root
If an attacker gains root, they own the whole server. They can steal data, install malware, send spam or use it to attack others. Protecting root is the heart of server security.
You are responsible for maintenance
On an unmanaged server, root access comes with root responsibilities: security updates, backups, monitoring and fixing anything that breaks. Our guide to managed vs unmanaged servers covers how to decide how much of that you want to take on.
How to use root access safely
Don't work as root all the time
Create a regular user for daily work and give it permission to run administrative commands with sudo:
adduser yourname
usermod -aG sudo yourname
On some distributions, such as AlmaLinux and Rocky Linux, the group is wheel instead of sudo. Then run privileged commands only when needed:
sudo apt update
This adds a moment of intent before each powerful command, records what was run in the system logs, and limits the damage if your user account is compromised while a program runs without sudo.
Use SSH keys and disable password logins
Passwords can be guessed. SSH keys are far harder to break. Set up key-based login, then disable password authentication. Our step-by-step guide to setting up SSH keys on a Linux VPS shows how.
Disable direct root login over SSH
Once your sudo user works, edit /etc/ssh/sshd_config and set:
PermitRootLogin no
Restart the SSH service. Keep your current session open and test logging in from a second terminal before you disconnect, so a typo does not lock you out.
Keep the system updated
Apply security updates regularly, and consider enabling automatic security updates on Debian or Ubuntu with the unattended-upgrades package.
Run a firewall
Allow only the ports you need, typically SSH, HTTP and HTTPS. Tools like ufw on Ubuntu and firewalld on AlmaLinux make this straightforward.
Run services as unprivileged users
Web servers, databases and applications should run under their own limited accounts, not as root. That way, a vulnerability in your app does not hand an attacker the whole server.
Know your recovery options
Find out whether your provider offers a web-based console, rescue mode or snapshots. If you lock yourself out of SSH, these let you get back in and fix the problem.
Root access on different kinds of VPS
Not every "root" is equal. On a KVM virtual machine or a dedicated server, root controls the whole operating system, including the kernel. On container-based VPS platforms, you have root inside your container but cannot change the shared host kernel or load kernel modules, which can limit some software, such as certain VPN or container tools. If you need full control, check what virtualization the provider uses.
Do you actually need root access?
You probably do not if you run a WordPress site, a small business website or a blog. Shared hosting with a good control panel handles that well, without the maintenance.
You probably do if you:
- Deploy custom applications in Node.js, Python, Go or similar
- Need specific software versions or system packages
- Run Docker, background workers or non-web services
- Need to tune the server for performance
Wrap-up
Root access is complete administrative control over a Linux server. It lets you install and configure anything, which is why it comes with VPS and dedicated servers but not with shared hosting. Use it carefully: work from a sudo user, log in with SSH keys, disable direct root login, keep the system patched and run a firewall. Handled with care, root access is what makes a server truly yours.