Skip to content

Guide · 8 min read

First steps on a new Linux VPS

Update your server, create a sudo user, log in with SSH keys and turn on a firewall – the essentials for a new Ubuntu or Debian VPS.

Your new VPS is online and you have the root password from your welcome email. Before you install anything, spend ten minutes on these basics. The commands are for Ubuntu and Debian; run them as root.

1. Log in and update the system

Connect with SSH (replace the IP with your server's IP from the control panel):

ssh [email protected]

Then install all updates:

apt update && apt full-upgrade -y

If a new kernel was installed, restart once. For a clean restart, use the control panel (see why).

2. Create your own user with sudo

adduser alice
usermod -aG sudo alice

From now on, log in as this user and use sudo for admin tasks.

3. Log in with an SSH key instead of a password

On your own computer, create a key (if you don't have one yet) and copy it to the server:

ssh-keygen -t ed25519
ssh-copy-id [email protected]

Test that ssh [email protected] works without a password. Then, on the server, disable password and root logins:

sudo nano /etc/ssh/sshd_config
# set these lines:
PasswordAuthentication no
PermitRootLogin no

sudo systemctl restart ssh

Keep your current session open and test a new login in a second window before you close it. If you ever lock yourself out, the VNC console and rescue mode in the control panel still work.

4. Turn on a firewall

sudo apt install -y ufw
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status

Open further ports only for the services you run, for example sudo ufw allow 80,443/tcp for a web server.

5. Install security updates automatically

sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades

6. Keep your own backups

Servitro does not offer a backup service, so copy important data somewhere else regularly – for example with rsync, restic or borg to another server or storage.

Last updated 2026-10-25. Need help? Open a ticket – our team answers 24/7.