VPS security · Practical guide

A practical first-hour checklist for a new VPS

Check access, install updates, review open ports and plan recovery before putting a new VPS into service.

Archive placement: February 2026

An engineer working on server network connections

A new VPS needs more than an application installation. Work through access, updates, firewall rules and recovery first, then verify the service from a visitor’s point of view. The steps below give you a manageable baseline without turning a small business server into a complicated infrastructure project.

1. Confirm access and the operating system

Sign in with the service details and check the system version. Use your own named administrator account where appropriate, and keep the browser console available. Do not disable your only working login while creating a replacement.

On the VPS: identify the system and account
cat /etc/os-release
id

The release matters because package names and service settings differ. Use documentation for that release rather than a command sequence for another distribution. Set up and test an SSH key before making it your only access method.

2. Create and test a named administrator

If your initial login is root, create a separate named account for routine administration. Run the following as root on Ubuntu; replace vpsuser with the name you want. If your image already supplied a working sudo account, use it instead of creating a duplicate.

On the VPS, when creating a new administrator is necessary
adduser vpsuser
usermod -aG sudo vpsuser

Keep the root session open. From a second terminal, sign in as the new user and run sudo -v. Install your own public SSH key for that user using our SSH key guide. A working root key does not automatically work for another account. Do not disable the initial login until the replacement is proven.

3. Install available updates

On Ubuntu, refresh the package list, then review and install updates. These commands leave the confirmation prompt enabled so you can see what will change. Take a recovery copy first if the VPS already contains important data.

On an Ubuntu VPS
sudo apt update
sudo apt upgrade

Some updates require service restarts or a reboot. Read the messages and plan the interruption. After a reboot, make a fresh SSH connection and check that the applications you need have started.

4. Set a hostname and check the clock

A meaningful hostname makes console sessions and logs easier to recognise. Choose a name you control, such as server.example.com. Setting it does not automatically create public DNS, an SSL certificate or reverse DNS.

On the VPS: set the chosen hostname and inspect time synchronisation
sudo hostnamectl set-hostname server.example.com
hostnamectl
timedatectl

The clock should show the correct time and active synchronisation. A wrong clock can break certificate checks, login codes and log comparisons. Correct the time service if it is unsynchronised; do not compensate by weakening certificate validation. Use UTC in operational notes if your team works across time zones.

5. Check what is exposed

Review listeners before opening more firewall ports. A basic website may need only SSH, HTTP and HTTPS. Use both the Control Panel and guest firewalls deliberately, with console access ready while testing.

On the VPS: review listeners
sudo ss -ltnp

Remove software you do not need through the package manager rather than stopping unfamiliar processes at random. Keep databases private unless remote access is necessary and protected. Confirm IPv4 and IPv6 behavior from outside the server.

6. Leave yourself a recovery plan

Record the administrator account and essential application paths. Choose an optional paid VPS backup plan if you need manual backups or a schedule, and keep an independent copy of important application data. Check that you understand what a restore replaces.

Finally, test the application from another device and make sure monitoring reaches the public address customers use. Keep these setup notes so the next maintenance session starts from known facts. Update them when your software or access arrangements change.

7. Prove the baseline survives a restart

Before a planned reboot, confirm no package installation or database operation is still running. Use sudo reboot only when you can tolerate the interruption and have console access ready. Reconnect afterward using the named account and SSH key rather than relying on the old terminal.

After reconnecting: inspect the system and recent boot
uptime
systemctl --failed
sudo journalctl -b -p err --no-pager

Review any failed unit before installing more software. Some historical log messages are harmless, but a failed web service or storage problem needs attention. Check the application externally once it is installed, and record its service name, configuration path and backup location. The setup is ready when a fresh login, public service check and recovery plan all work, not merely when the server responds to ping.

Common questions

Do I need to run all of this as root?

No. Use the named administrator and sudo for individual tasks. The account-creation example is labelled for the initial root session; later examples assume a sudo-enabled user.

Is a VPS backup the same as an application backup?

No. A VPS restore can replace the whole server. Keep separate copies of important files and database exports, and understand the data loss window before restoring either type. Manual and automatic VPS backup options are paid features.

Further reading

← Back to all guidesDiscuss your hosting setup ↗