VPS Beginner Tutorial

From Zero to Your Own Cloud Storage in 30 Minutes

📋 Progress Tracker

📖 Overview & Requirements ESSENTIAL

What You'll Build

By the end of this tutorial, you'll have:

💰 Cost Breakdown

  • Monthly: €4.51/month for Hetzner Cloud VPS
  • Domain (optional): ~$10/year
  • Total first year: ~$65 (vs $120+ for Google/Dropbox)

What You Need Before Starting

What is a VPS (Virtual Private Server)?

A VPS is like renting a computer in a professional data center. Instead of buying physical hardware, you get a "virtual" computer that runs on powerful servers.

Think of it like: Renting an apartment vs buying a house. You get your own space, but the building maintenance is handled by someone else.

Benefits: Always online (99.9% uptime), fast internet, no electricity costs at home, professional backups, easy upgrades

🏗️ Sign Up for VPS ESSENTIAL

Why Hetzner Cloud?

Go to Hetzner Cloud
  • Click "Sign Up" in the top right
  • Use your real email address (you'll need to verify it)
  • Choose a strong password (or use your password manager)
Verify your email address
  • Check your email for Hetzner verification
  • Click the verification link
  • Complete the email verification process
Add payment method
  • Go to "Billing" in your Hetzner console
  • Add your credit card or PayPal
  • You won't be charged until you create a server
⚠️ Important: Hetzner requires identity verification for new accounts. Have your ID/passport ready - this is normal for European companies due to regulations.

🖥️ Create Your Server ESSENTIAL

Create new project
  • Log into your Hetzner console
  • Click "New Project"
  • Name it "My Personal Cloud" or similar
Create server
  • Click "Add Server"
  • Location: Choose closest to you (Nuremberg/Helsinki/Ashburn)
  • Image: Ubuntu 22.04 (most stable)
  • Type: CX31 (2 vCPU, 8 GB RAM, 80 GB SSD) - €4.51/month
  • Networking: Leave defaults (IPv4 enabled)
Configure access
  • SSH Keys: Skip for now (we'll use password first)
  • User Data: Leave empty
  • Name: "personal-cloud-1" or similar
  • Click "Create & Buy Now"
Wait for server creation
  • Server will be ready in ~30 seconds
  • You'll see a green "Running" status
  • Note down the IP address (looks like 1.2.3.4)
  • Check your email for root password
💡 What just happened?
You just rented a computer in a German data center. It has:
  • 2 CPU cores (like a decent laptop)
  • 8GB RAM (more than many phones)
  • 80GB storage (plenty for thousands of photos)
  • 1000 Mbps internet (faster than most homes)

🔌 Connect to Your Server ESSENTIAL

What is SSH (Secure Shell)?

SSH is a secure way to connect to and control a remote computer using text commands. It's like having a direct phone line to your server.

Think of it like: Remote desktop, but using text commands instead of clicking with a mouse. More efficient and secure.

Why use it: All server management happens through SSH - it's the standard way to control Linux servers.

Option 1: Web Console (Easiest for Beginners)

Use Hetzner's web console
  • In your server panel, click the server name
  • Click "Console" tab
  • Click "Open Console in Browser"
  • Login as "root" with the password from email

Option 2: SSH Client (More Professional)

Windows users: Install SSH client
  • Windows 10/11: SSH is built-in (use Command Prompt)
  • Or download PuTTY for a GUI
Connect via SSH
# Replace 1.2.3.4 with your server's IP ssh root@1.2.3.4 # Type 'yes' when asked about fingerprint # Enter the password from your email
✅ Success Check: You should see something like "root@ubuntu-server:~#" - this means you're connected!

🏠 Install CasaOS ESSENTIAL

What is CasaOS?

CasaOS is like having an app store for your server. Instead of typing complex commands, you get a beautiful web interface where you can install services with one click.

Think of it like: The Apple App Store or Google Play Store, but for server software. Click "install" and it handles all the technical setup.

Makes easy: Installing Nextcloud, password managers, media servers, and 100+ other applications without any technical knowledge.

Update your server
# Update package list apt update # Upgrade installed packages apt upgrade -y

This ensures your server has the latest security updates. Takes 2-3 minutes.

Install CasaOS
# Download and install CasaOS curl -fsSL https://get.casaos.io | sudo bash

This command downloads and installs CasaOS automatically. Takes 3-5 minutes.

Access CasaOS web interface
  • Open your web browser
  • Go to: http://YOUR-SERVER-IP (replace with your IP)
  • You should see the CasaOS welcome screen
  • Follow the setup wizard (create username/password)

🔧 Can't Access CasaOS?

  • Make sure you're using http:// not https://
  • Try http://YOUR-SERVER-IP:81 instead
  • Check if firewall is blocking: ufw status
  • If ufw is active: ufw allow 80,81,443/tcp
✅ Success Check: You should see CasaOS dashboard with colorful tiles and an app store icon.

☁️ Install Nextcloud ESSENTIAL

What is Nextcloud?

Nextcloud is your personal Google Drive replacement. It provides file storage, photo backup, document editing, calendar, contacts, and much more - all under your control.

Think of it like: Google Workspace (Drive, Docs, Calendar, Photos) but running on your own server instead of Google's.

Key features: Unlimited storage, file sync across devices, document editing, calendar, contacts, photo galleries, mobile apps

Open CasaOS App Store
  • In CasaOS dashboard, click "App Store" icon
  • Search for "Nextcloud"
  • Click on the official Nextcloud app
Install Nextcloud
  • Click "Install" button
  • Leave default settings (CasaOS handles everything)
  • Wait 3-5 minutes for installation
  • You'll see Nextcloud appear in your dashboard
Initial Nextcloud setup
  • Click the Nextcloud tile in CasaOS
  • Create admin username and password
  • Leave database settings as default
  • Click "Finish Setup"
Explore your new cloud
  • Upload some test files
  • Try the photo gallery
  • Check out the calendar and contacts
  • Install mobile apps from app stores
📱 Mobile Access:
🎉 Congratulations! You now have your own cloud storage that rivals Google Drive, completely under your control!

🌐 Setup Domain Name OPTIONAL

Why Get a Domain?

Instead of remembering 1.2.3.4, you can access your cloud at mycloud.example.com. This also enables proper SSL certificates for security.

Purchase a domain
  • Recommended registrars: Namecheap, Porkbun
  • Choose something memorable like yourname-cloud.com
  • Cost: ~$10-15/year depending on extension
Configure DNS
  • In your domain registrar's control panel
  • Create an A record pointing to your server IP
  • Example: cloud.yourdomain.com → 1.2.3.4
  • DNS changes take 10-60 minutes to propagate
Enable HTTPS in CasaOS
  • Go to CasaOS Settings
  • Find SSL/Certificate section
  • Enter your domain name
  • Enable Let's Encrypt automatic certificates
💡 Free Alternative: Use DuckDNS for a free subdomain like yourname.duckdns.org

🔒 Security Essentials ESSENTIAL

⚠️ Critical: Your server is exposed to the internet. These security steps are not optional!
Enable firewall
# Allow essential ports ufw allow 22/tcp # Allow web traffic ufw allow 80,443/tcp # Allow CasaOS ufw allow 81/tcp # Enable firewall ufw enable
Install fail2ban (blocks brute force attacks)
apt install fail2ban -y systemctl enable fail2ban systemctl start fail2ban
Enable automatic security updates
apt install unattended-upgrades -y dpkg-reconfigure -plow unattended-upgrades # Select "Yes" when prompted
Change default passwords
  • Change your server root password: passwd
  • Use a strong password (20+ characters, mixed case, numbers, symbols)
  • Consider using SSH keys instead of passwords (advanced)
🛡️ Advanced Security (Optional):
  • Setup SSH key authentication
  • Change SSH port from 22 to something else
  • Install intrusion detection (AIDE)
  • Setup VPN access only

💾 Backup Setup ESSENTIAL

Why Backups Matter

Your VPS could fail, get hacked, or you might accidentally delete something. The 3-2-1 rule: 3 copies of data, 2 different storage types, 1 offsite.

Enable Hetzner snapshots
  • Go to your Hetzner console
  • Click your server → "Snapshots"
  • Create a manual snapshot first
  • Enable automatic daily snapshots (+€1.30/month)
Setup Nextcloud external storage backup
  • Get a cloud storage account (Google Drive, Dropbox, etc.)
  • In Nextcloud: Apps → External storage
  • Configure external storage as backup destination
  • Setup automatic sync of important files
Install backup software (Advanced)
# Install Duplicati via CasaOS app store # Or use command line tools apt install duplicity -y
💡 Backup Strategy:
  • Level 1: Hetzner snapshots (server-level backup)
  • Level 2: Nextcloud external storage (file-level backup)
  • Level 3: Download important files locally

🔧 Maintenance & Updates ESSENTIAL

Weekly Tasks (5 minutes)

Check system updates
apt update && apt list --upgradable # Apply non-kernel updates apt upgrade -y
Check CasaOS for app updates
  • Open CasaOS dashboard
  • Look for update notifications
  • Update apps one by one (test after each)

Monthly Tasks (15 minutes)

Review security logs
# Check failed login attempts fail2ban-client status sshd # Check system logs journalctl --since "1 month ago" -p err
Test your backups
  • Download a few files from your backup
  • Verify Hetzner snapshots are working
  • Test restore process (in a test environment)
Monitor disk space
df -h # Clean up if needed apt autoremove -y apt autoclean
⚠️ Before Major Updates: Always create a snapshot first! Major updates can break things, and you'll want a way to roll back.

🚀 Adding More Services NICE TO HAVE

Popular Next Steps

Password Manager (Vaultwarden)
  • Install from CasaOS app store
  • Replaces LastPass/1Password
  • Access at yourserver.com/vaultwarden
  • Setup guide: Vaultwarden Wiki
Photo Management (PhotoPrism)
  • AI-powered photo organization
  • Face recognition and auto-tagging
  • Replaces Google Photos
  • Requires more RAM (consider upgrading to CX41)
Media Server (Jellyfin)
  • Your personal Netflix
  • Stream movies, TV shows, music
  • Works on all devices
  • Consider adding storage volume for media
Document Editor (OnlyOffice)
  • Integrates with Nextcloud
  • Full Microsoft Office compatibility
  • Real-time collaboration
  • Replaces Google Docs/Microsoft 365

Resource Considerations

📊 When to Upgrade Your VPS:
  • CX31 (current): Good for 1-3 services, light usage
  • CX41 (€8.21/month): 4 vCPU, 16GB RAM - good for 5-10 services
  • CX51 (€15.73/month): 8 vCPU, 32GB RAM - handles everything

You can upgrade anytime with zero downtime in Hetzner console!

Advanced Setups

🎉 Tutorial Complete!

Congratulations! You now have:

You've taken the first step toward digital independence!