PTENES
MODULE 3.1

🖥️ VPS: Your Computer in the Cloud

A VPS is a computer you rent that stays on 24 hours a day, 7 days a week, in a data center. It's where you'll host your projects, run your programs, and have a real server. Here you'll learn what it is, how to choose one, and how to rent your first one.

6
Topics
45
Minutes
Basic
Level
Hands-on
Type
1

What Is a VPS

VPS stands for Virtual Private Server (Virtual Private Server). In plain English, it’s a cloud computer that you rent. It’s not on your desk; it’s in a data center (a giant warehouse full of servers), always on, with fast internet and a fixed address. You control this computer over the internet as if you were sitting right in front of it.

the keyboard is you YOUR PC internet SSH CLOUD (DATA CENTER) VPS always on STATIC IP 203.0.113.7 the server address

🧠 Analogy: Renting a Computer in the Cloud

Imagine you need a computer that stays on forever, but you don’t want to leave your own PC on day and night (using electricity, making noise, and possibly going down when the power goes out). So you rents a: another company takes care of the physical machine, power, internet, and cooling. You just use it, pay monthly, and access it from anywhere.

  • •Your PC: shuts down when you sleep, gets stuck at home
  • •The VPS: never shuts down, has a fixed IP, and is accessible worldwide
  • •You pay: a monthly fee (generally $4 to $12/month)
  • •"Virtual": one physical machine is divided into several isolated VPSs

💡 Why not use only Vercel?

In track 2, you used Vercel, which is great for websites and front ends. But it's limited: you don't control the machine, run long-running processes, or install whatever you want. The VPS gives you full control: it's real Linux where you install databases, bots, heavy APIs, games, and automations that run all day. More power, more responsibility.

2

Providers: DigitalOcean, Hetzner, Contabo

There are dozens of companies that rent VPSs. For beginners, three stand out: DigitalOcean (the easiest one), Hetzner (best price for performance) and Contabo (more memory for the same price). They all work the same way: you create an account, choose a plan, and have a server ready in 60 seconds.

🌊

DigitalOcean

The most beginner-friendly option. A simple dashboard, lots of documentation, and excellent tutorials.

  • •Starting at ~$6/month
  • •Calls the VPS a "Droplet"
  • •Free credits to try it out
💸

Hetzner

The best value on the market. German company, servers in Europe and the U.S.

  • •Starting at ~4 dollars/month
  • •Calls the VPS a "Cloud Server"
  • •Great for serious projects
💾

Contabo

Lots of RAM and disk space at the lowest price. Good for those who need room.

  • •Starting at ~$5/month
  • •Generous RAM on low-cost plans
  • •Slightly slower support

👁 What you’ll see on the provider’s website

When you open any of these sites, you’ll find a pricing table like this:

# Plan table (example)

Plan vCPU RAM Disk Price

Basic 1 1 GB 25 GB ~5/month

Standard 2 4 GB 80 GB ~12/month

Pro 4 8 GB 160 GB ~24/month

vCPU = processing power. RAM = memory for running programs. Disk = space to store files. To get started, the cheapest plan is enough.

✓ What TO DO when choosing

  • ✓Start with the cheapest plan (you can upgrade later)
  • ✓Choose a region near your users
  • ✓Check whether it charges by the hour (you can delete it and stop paying)

✗ What NOT to do

  • ✗Hiring the most expensive plan “just in case”
  • ✗Forget about a VPS left running and generating charges
  • ✗Ignore the region and put the server on the other side of the world
3

Hiring Your First VPS

Creating a VPS takes less than two minutes. The process is similar with any provider: you answer four questions (region, size, system e how it will get in), click "Create," and you're done. Let's go step by step.

1

Choose a Region

Where the server will physically be located. The closer it is to you and your users, the faster it will be.

# Common options

New York / NYC -> Eastern US

Frankfurt / FRA -> Europe

Sao Paulo / GRU -> Brazil (when available)

For Brazil: if there's no region in Brazil, choose "New York" or "Miami." The speed difference is small.

2

Choose the Size

How much CPU, RAM, and disk space. Start small: you can increase them later without losing your data.

# Recommended for your first project

1 vCPU, 1 GB RAM, 25 GB of disk

# It costs around

5 to 6 dollars per month

3

Choose the Image

Which operating system the server will use. Always choose Linux Ubuntu, the most common option with the most tutorials.

# Select the latest LTS version

Ubuntu 24.04 (LTS)

# LTS = Long Term Support (extended support)

# = more stable, ideal for servers

4

Set Up Access (Password or SSH Key)

How you'll connect to the server. Two options: password (simpler) or SSH key (more secure).

# Option A: Password

Create a strong password and WRITE IT DOWN somewhere safe

# Option B: SSH key (recommended)

Paste your public key (we'll cover this in module 3.2)

For now, the password is a good size. In the next module, you'll learn SSH.

⚠️ Common Error

Problem: "I created the VPS, wrote down the wrong password, and now I can’t log in."
Solution: In the provider’s dashboard, there’s an option to reset the root password (Reset Root Password). It generates a new temporary password and emails it to you. Use it to sign in, then change it right away. So always write down the password before closing the screen.

4

First Access via the Web Console

With the VPS created, you need to go into it. The fastest way (and one that doesn't require configuring anything) is the web console: a terminal that opens in the browser, directly in the provider's dashboard. It's like sitting in front of the actual server.

👁 What you’ll see on the screen

When you click the "Console" (or "Launch Console") button in the dashboard, a black window opens and asks you to log in. Type root and the password you set:

Ubuntu 24.04 LTS meu-vps tty1

meu-vps login: root

Password: (enter the password — nothing appears)

# If the password is correct, you'll see:

Welcome to Ubuntu 24.04 LTS

root@meu-vps:~#

O # At the end, it indicates that you’re logged in as root (the server administrator). Now any command you type runs inside the VPS, not on your PC.

First commands to “start” the server

The same commands from Track 1 work here. Test to confirm everything is set up correctly:

# Who am I on this server?

root@meu-vps:~# whoami

root

# Where am I?

root@meu-vps:~# pwd

/root

# Which system is running?

root@meu-vps:~# uname -a

Linux meu-vps 6.8.0 x86_64 GNU/Linux

⚠️ Common Error

Problem: "I type the password, but it doesn’t appear on the screen. It seems like it isn’t working."
Solution: This is normal and intentional. On Linux, the password never appears as you type (not even asterisks). This is protection so no one can see it over your shoulder. Type carefully and press Enter. If you make a mistake, it will ask again.

💡 Tip: The web console is just the beginning

The web console is great for your first login and for emergencies (when you lock yourself out). But it’s inconvenient for everyday use: it’s hard to paste text, and it’s slower. In the next module, you’ll learn SSH, which connects your terminal directly to the server, with copy and paste working normally.

5

Understanding Linux on the Server

Your VPS runs Linux, a different operating system from Windows and Mac, but one that follows the same logic of folders and commands you’ve already seen. Three concepts are essential: who the root, such as folders and how to install programs with apt.

🧠 Analogy: Root Is the Building Owner

The user root is the server’s absolute administrator: it can do anything, open any port, modify any file, and install or delete whatever it wants. It’s the "building owner" with the master key. That’s also why it’s dangerous: one wrong command as root can break the entire system.

  • •root: full power, prompt ends in #
  • •regular user: limited powers, prompt ends in $
  • •sudo: asks for "root permission" for a specific command

The main Linux directories

On Linux, everything starts at the bar / (the root). The most important folders for you:

/ # the root of everything

/root # root user's home directory

/home # regular users' home directories

/etc # configuration files

/var # logs and program data

/usr # installed programs

/tmp # temporary files

apt - Install programs on the server

On Ubuntu, you install programs with apt, a kind of "app store" on the command line. You don’t need to download anything from a website.

# Install a program (e.g., the nano editor)

root@meu-vps:~# apt install nano

Reading package lists... Done

nano is already the newest version.

# Install git and curl at once

root@meu-vps:~# apt install git curl

# Remove a program

root@meu-vps:~# apt remove nome-do-programa

⚠️ Common Error

Problem: "I ran apt install and you got the error 'Unable to locate package' or 'Could not get lock'."
Solution: Run apt update first: it updates the list of available programs. Without this, apt doesn't know where to find what you asked for. If you see "lock," wait a few seconds (another update is running) and try again.

6

Basic Updates and Maintenance

A server needs care, like a car. Three simple tasks keep your VPS healthy: update the programs, restart when I need to keep an eye on the disk space. Do this from time to time and your server will run smoothly for years.

🔄 Update everything (the most important routine)

There are two commands in sequence: update fetches the latest updates and upgrade Install it. Do this when you turn on a new VPS and every few weeks.

# 1) Update the package list

root@meu-vps:~# apt update

Hit:1 http://archive.ubuntu.com noble InRelease

12 packages can be upgraded.

# 2) Install the updates (-y answers "yes" automatically)

root@meu-vps:~# apt upgrade -y

Setting up packages...

Done.

Restart and check the disk space

# Restart the server (after major updates)

root@meu-vps:~# reboot

# The connection drops for ~30 seconds. Reconnect afterward.

# View how much disk space is left (-h = human-readable)

root@meu-vps:~# df -h

Filesystem Size Used Avail Use% Mounted

/dev/vda1 25G 6.2G 18G 27% /

# View RAM usage

root@meu-vps:~# free -h

total used free

Mem: 958Mi 210Mi 748Mi

✓ Good maintenance practices

  • ✓Run apt update && apt upgrade every few weeks
  • ✓Check the disk with df -h before installing large things
  • ✓Restart after kernel updates

✗ What NOT to do

  • ✗Let the disk fill up to 100% (the server freezes)
  • ✗Ignore security updates for months
  • ✗Restart in the middle of an update

🏆 Congratulations!

You already have a computer in the cloud running 24/7, and know how to access it and keep it updated. This is the foundation for everything in Track 3. In the next module, you’ll learn SSH, to access the server directly from your terminal, securely and comfortably, without relying on the web console.

📚 Module Summary

✓
A VPS is a computer rented in the cloud - always on, with a fixed IP, accessible from anywhere
✓
DigitalOcean, Hetzner, Contabo - good providers; start with the cheapest plan
✓
Hiring = region, size, operating system, access - Ubuntu LTS is the best system choice
✓
root, folders, and apt - root controls everything; apt installs programs
✓
apt update/upgrade, reboot, df -h - basic maintenance that keeps the server healthy

Next Module:

3.2 - SSH: Secure Server Access (connect from your terminal using keys instead of a password)