Skip to content

VPS setup for beginners: step-by-step guide

Last updated: 31 December 2025

Your first VPS: where to start?

Setting up a VPS can seem overwhelming, but with the right steps it's manageable. This guide walks you through the process from first login to working web server.

Step 1: Connect via SSH

After ordering your VPS, you'll receive login credentials. Connect via SSH:

Windows: use PuTTY or Windows Terminal Mac/Linux: open Terminal and type:

ssh root@your-server-ip

On first connection, the system asks if you trust the server. Type "yes" and enter your password.

Step 2: Update system

Immediately after logging in, update your system:

apt update && apt upgrade -y

This installs the latest security patches.

Step 3: Create new user

Never work as root. Create your own user:

adduser yourusername
usermod -aG sudo yourusername

Log out and log back in as your new user.

Step 4: Secure SSH

Increase security by disabling password login and using SSH keys:

  1. Generate an SSH key on your local computer
  2. Copy the public key to the server
  3. Adjust SSH configuration
sudo nano /etc/ssh/sshd_config
# Set PasswordAuthentication to no
sudo systemctl restart sshd

Step 5: Set up firewall

Activate the UFW firewall:

sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable

Step 6: Install web server

Nginx (recommended)

sudo apt install nginx
sudo systemctl start nginx
sudo systemctl enable nginx

Apache

sudo apt install apache2
sudo systemctl start apache2
sudo systemctl enable apache2

Visit your server IP in the browser. You'll now see the default welcome page.

Step 7: Install PHP

For WordPress and other PHP applications:

sudo apt install php-fpm php-mysql php-curl php-xml php-mbstring

Step 8: Install database

sudo apt install mariadb-server
sudo mysql_secure_installation

Go through the security wizard and set a root password.

Next steps

  • Install a control panel (optional): Plesk, cPanel or free alternatives like Webmin
  • Configure SSL with Let's Encrypt
  • Set up automatic backups
  • Configure monitoring

Tips for beginners

  • Create snapshots before major changes
  • Document everything you do
  • Test in a staging environment
  • Start small and build up

Frequently Asked Questions

How long does it take to implement this?

Implementation time varies per situation. Simple configurations can be done within an hour, more complex setups may take several hours to a day.

What are the costs?

Costs depend on your hosting provider and package. Many basic features are included for free, advanced features may incur additional costs.

Do I need technical knowledge?

You need little technical knowledge for the basics. Most hosting providers offer extensive documentation and support to help you.

Was this article helpful?

Compare hosting packages directly to find the best choice for your situation.