How to Set Up a VPS: A Step-by-Step Guide for Beginners
How to Set Up a VPS: A Step-by-Step Guide for Beginners
Setting up a VPS is simpler than most beginners expect. In this guide you will order a VPS, connect to it securely over SSH, do essential first-time hardening, and get your first website online — step by step. If you are still deciding, start with what is a VPS.
Step 1: Choose and order your VPS
Pick a plan that fits your needs — for a first website or small app, 1–2 vCPU and 4–8 GB RAM is plenty. During checkout you will usually choose:
- Server location — pick the one closest to your visitors for lower latency (e.g. India for Indian audiences)
- Operating system — Ubuntu 24.04 LTS is the most beginner-friendly choice
After payment, your server is deployed automatically and you receive its IP address and root password by email — usually within minutes.
Step 2: Connect to your VPS over SSH
SSH is the secure way to control your server from your computer.
- Windows: open PowerShell (or use PuTTY) and run:
ssh root@YOUR_SERVER_IP - Mac / Linux: open Terminal and run:
ssh root@YOUR_SERVER_IP
Enter your root password when prompted. You are now logged into your server.
Step 3: Update the server
Always update first. On Ubuntu/Debian run:
apt update && apt upgrade -y
This installs the latest security patches.
Step 4: Secure your VPS (essential)
Basic hardening protects you from the automated attacks that hit every public server:
- Create a non-root user and log in as that user instead of root
- Set up SSH keys and disable password login (far more secure)
- Enable a firewall — allow only the ports you need (e.g. SSH 22, web 80/443):
ufw allow OpenSSH && ufw allow 80,443/tcp && ufw enable - Install Fail2ban to block repeated login attempts
Step 5: Install a web server
To host a website, install a web server stack. The quickest options:
- LEMP (Nginx + MySQL/MariaDB + PHP) — fast and popular
- A free control panel (like a web dashboard) if you prefer a point-and-click interface over the command line
Then point your domain's A record to your server's IP address, add an SSL certificate (free with Let's Encrypt), and upload your site.
Step 6: Keep it healthy
- Apply updates regularly
- Set up off-server backups
- Monitor uptime and resource usage
Prefer not to manage all this yourself? See managed vs unmanaged VPS.
Frequently asked questions
How long does it take to set up a VPS?
The server itself deploys in minutes. A basic secured web server is usually up within 30–60 minutes for a beginner following a guide.
Do I need coding skills to use a VPS?
No coding, but you do need to run a few commands. Copy-paste from a guide is enough to get started; a control panel removes even that.
Which OS should a beginner choose?
Ubuntu LTS — it is the most documented and beginner-friendly Linux distribution.