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:
- Generate an SSH key on your local computer
- Copy the public key to the server
- 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.
Related articles
What is web hosting? Explanation for beginners
Discover what web hosting is and how it works. Complete explanation about servers, domains and different hosting types for beginners.
What is VPS Hosting?
VPS hosting explained: what is a Virtual Private Server, who is it suitable for and what are the advantages compared to shared hosting?
What is an SSL Certificate?
Everything about SSL certificates: what is SSL, why do you need it and how do you recognize a secure website? Essential for every website.
What is Uptime in Web Hosting?
What does uptime mean in web hosting? Learn about uptime percentages, SLA guarantees and why 99.9% uptime is important for your website.
How much storage do I need for my website?
Discover how much disk space you really need for your website. Practical guide with examples per website type.