<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_Your_First_VPS%3A_A_Beginner%27s_Tutorial</id>
	<title>Setting Up Your First VPS: A Beginner's Tutorial - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_Your_First_VPS%3A_A_Beginner%27s_Tutorial"/>
	<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Setting_Up_Your_First_VPS:_A_Beginner%27s_Tutorial&amp;action=history"/>
	<updated>2026-04-14T21:38:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://serverrental.store/index.php?title=Setting_Up_Your_First_VPS:_A_Beginner%27s_Tutorial&amp;diff=5758&amp;oldid=prev</id>
		<title>Admin: New guide article</title>
		<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Setting_Up_Your_First_VPS:_A_Beginner%27s_Tutorial&amp;diff=5758&amp;oldid=prev"/>
		<updated>2026-04-12T16:02:59Z</updated>

		<summary type="html">&lt;p&gt;New guide article&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Setting up your first VPS''' can seem daunting, but with this step-by-step tutorial you will have a fully configured, secure server ready for hosting websites or applications within an hour.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* A VPS from a provider like [https://powervps.net/?from=32 PowerVPS]&lt;br /&gt;
* An SSH client (Terminal on Mac/Linux, PuTTY or Windows Terminal on Windows)&lt;br /&gt;
* Basic command line knowledge&lt;br /&gt;
&lt;br /&gt;
== Step 1: Log In to Your VPS ==&lt;br /&gt;
&lt;br /&gt;
After purchasing a VPS, you will receive an IP address and root credentials. Connect:&lt;br /&gt;
&lt;br /&gt;
 ssh root@YOUR_VPS_IP&lt;br /&gt;
&lt;br /&gt;
Accept the host key fingerprint when prompted.&lt;br /&gt;
&lt;br /&gt;
== Step 2: System Update ==&lt;br /&gt;
&lt;br /&gt;
 apt update &amp;amp;&amp;amp; apt upgrade -y&lt;br /&gt;
&lt;br /&gt;
If the kernel was updated, reboot:&lt;br /&gt;
&lt;br /&gt;
 reboot&lt;br /&gt;
&lt;br /&gt;
== Step 3: Create a Non-Root User ==&lt;br /&gt;
&lt;br /&gt;
 adduser deploy&lt;br /&gt;
 usermod -aG sudo deploy&lt;br /&gt;
&lt;br /&gt;
Switch to the new user to verify:&lt;br /&gt;
&lt;br /&gt;
 su - deploy&lt;br /&gt;
 sudo apt install htop    # test sudo access&lt;br /&gt;
&lt;br /&gt;
== Step 4: Set Up SSH Keys ==&lt;br /&gt;
&lt;br /&gt;
On your '''local machine''' (not the VPS):&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -t ed25519 -f ~/.ssh/vps_key&lt;br /&gt;
 ssh-copy-id -i ~/.ssh/vps_key deploy@YOUR_VPS_IP&lt;br /&gt;
&lt;br /&gt;
Now log in without a password:&lt;br /&gt;
&lt;br /&gt;
 ssh -i ~/.ssh/vps_key deploy@YOUR_VPS_IP&lt;br /&gt;
&lt;br /&gt;
== Step 5: Harden SSH ==&lt;br /&gt;
&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/ssh/sshd_config&amp;lt;/code&amp;gt; on the VPS:&lt;br /&gt;
&lt;br /&gt;
 Port 2222&lt;br /&gt;
 PermitRootLogin no&lt;br /&gt;
 PasswordAuthentication no&lt;br /&gt;
 PubkeyAuthentication yes&lt;br /&gt;
 MaxAuthTries 3&lt;br /&gt;
&lt;br /&gt;
Restart SSH:&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl restart sshd&lt;br /&gt;
&lt;br /&gt;
'''Important:''' Keep your current session open and test the new config in a second terminal before closing.&lt;br /&gt;
&lt;br /&gt;
== Step 6: Install a Firewall ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt install ufw&lt;br /&gt;
 sudo ufw default deny incoming&lt;br /&gt;
 sudo ufw default allow outgoing&lt;br /&gt;
 sudo ufw allow 2222/tcp    # new SSH port&lt;br /&gt;
 sudo ufw allow 80/tcp&lt;br /&gt;
 sudo ufw allow 443/tcp&lt;br /&gt;
 sudo ufw enable&lt;br /&gt;
&lt;br /&gt;
== Step 7: Install Fail2Ban ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt install fail2ban&lt;br /&gt;
 sudo systemctl enable --now fail2ban&lt;br /&gt;
&lt;br /&gt;
This automatically blocks IPs that repeatedly fail login attempts.&lt;br /&gt;
&lt;br /&gt;
== Step 8: Install a Web Server ==&lt;br /&gt;
&lt;br /&gt;
=== Nginx ===&lt;br /&gt;
&lt;br /&gt;
 sudo apt install nginx&lt;br /&gt;
 sudo systemctl enable --now nginx&lt;br /&gt;
&lt;br /&gt;
Visit &amp;lt;code&amp;gt;http://YOUR_VPS_IP&amp;lt;/code&amp;gt; in a browser — you should see the Nginx welcome page.&lt;br /&gt;
&lt;br /&gt;
=== Configure a Basic Site ===&lt;br /&gt;
&lt;br /&gt;
Create &amp;lt;code&amp;gt;/etc/nginx/sites-available/mysite&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 server {&lt;br /&gt;
     listen 80;&lt;br /&gt;
     server_name example.com www.example.com;&lt;br /&gt;
     root /var/www/mysite;&lt;br /&gt;
     index index.html;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Enable it:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /etc/nginx/sites-available/mysite /etc/nginx/sites-enabled/&lt;br /&gt;
 sudo nginx -t&lt;br /&gt;
 sudo systemctl reload nginx&lt;br /&gt;
&lt;br /&gt;
== Step 9: Install SSL with Let's Encrypt ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt install certbot python3-certbot-nginx&lt;br /&gt;
 sudo certbot --nginx -d example.com -d www.example.com&lt;br /&gt;
&lt;br /&gt;
Certbot automatically configures HTTPS and sets up auto-renewal.&lt;br /&gt;
&lt;br /&gt;
== Step 10: Set Up Automatic Updates ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt install unattended-upgrades&lt;br /&gt;
 sudo dpkg-reconfigure unattended-upgrades&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;Yes&amp;quot; to enable automatic security updates.&lt;br /&gt;
&lt;br /&gt;
== What's Next? ==&lt;br /&gt;
&lt;br /&gt;
Your VPS is now secured and ready. Common next steps include:&lt;br /&gt;
&lt;br /&gt;
* Installing a database (MySQL, PostgreSQL)&lt;br /&gt;
* Setting up [[Docker and Kubernetes: Getting Started|Docker]]&lt;br /&gt;
* Deploying your application&lt;br /&gt;
* Configuring monitoring tools&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Understanding VPS Hosting: A Comprehensive Guide]]&lt;br /&gt;
* [[Server Security Best Practices]]&lt;br /&gt;
* [[How to Choose the Best VPS Provider]]&lt;br /&gt;
* [[Basic Server Administration Skills for Beginners]]&lt;br /&gt;
&lt;br /&gt;
[[Category:VPS Hosting]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>