New VPS Setup: What to Do in the First 30 Minutes (2026 Checklist)
A new VPS setup in 30 minutes covers eight things: 2FA on the provider account, a tested console login, system updates, a sudo user with SSH keys, password and root login turned off, a firewall, automatic security updates, and a backup that lives off the server. Skip any one and you’re exposed.
On this page
Why the first 30 minutes decide the next 30 days
A fresh server is a race. You get root and a public IP; so does everyone scanning the internet. The default install is not the problem — the account behind it is. Most hardening guides start at SSH and never touch the provider panel, which is where one self-hoster’s compromise most likely started this year.
You don’t need to finish everything today. You need the eight steps below done before you install anything you care about. By the end you’ll have a box you can log into with a key, a firewall that drops everything you didn’t open, patches that apply themselves, and a backup you’ve actually restored once.
If you haven’t picked a provider yet, compare VPS prices by real monthly cost. If you have one, start with step 1.
Before you start
You need four things:
- Root or sudo access and the IP address from your provider’s welcome email.
- A terminal on your own computer (macOS Terminal, Windows Terminal with OpenSSH, or any Linux shell).
- Your provider’s control panel login, plus the console/VNC/serial link in that panel.
- 30 minutes without interruptions. Step 5 can lock you out if you rush it.
Two habits worth forming now. First, keep your current SSH session open until a new one works — every time. Second, write down what you changed. A ~/vps-notes.md file on your laptop beats memory in three months.
This is a new VPS setup checklist for Ubuntu 24.04 LTS or Debian 12. Commands use apt. If you’re on something else, the order still holds; the package manager changes.
In the commands, words like YOUR_SERVER_IP and yourname are placeholders, shown in orange with a dotted underline. Replace them with your own before you press Enter.
The new VPS setup checklist: 8 steps in order
The order matters. Each step assumes the one before it worked. Don’t reorder steps 4 and 5 — you’ll lock yourself out.
Secure the provider account and test the console
Before you touch SSH, log into your provider’s panel. Turn on two-factor authentication. Use an email address you actually read, not a throwaway. Then find the console link (VNC, serial, or “rescue console”) and open it now, while everything works. Log in through it once, then close it. If your image only allows key login and you have no password yet, come back after step 3 and test the console with your new user’s password.
In an April 2026 r/selfhosted thread, a VPS with key-only SSH, fail2ban and ufw still got taken over — most likely through the panel console, after the provider account was compromised.
If it fails: The console won’t load. Contact support now, not the day you need it.
Log in and update the system
From your computer:
your computerssh root@YOUR_SERVER_IP
Then, on the server:
serverapt update && apt full-upgrade -y
If the kernel was updated, reboot:
serverreboot
Wait 30 seconds and log back in. A fresh image is often weeks old, and full-upgrade pulls kernel and library fixes that a plain upgrade leaves behind. Not back after two minutes? Check it from the console.
Create a sudo user
Stop working as root. Create your own account:
serveradduser yourname
usermod -aG sudo yourname
Pick a long passphrase for this account. You’ll disable password login later, but the password still matters for sudo and for console access.
Add SSH keys and test them
On your own computer, not the server:
your computerssh-keygen -t ed25519 -C "laptop-2026"
Accept the default path. Give the key a passphrase. Then copy it to the server:
your computerssh-copy-id yourname@YOUR_SERVER_IP
Then open a new terminal window and log in:
your computerssh yourname@YOUR_SERVER_IP
It should ask for your key passphrase, not your account password. Confirm sudo -v works in that session. Only now close your old root session.
If it fails: ssh-copy-id says Permission denied (publickey). The image already has password login off; copy the key from your root session instead:
servermkdir -p /home/yourname/.ssh
cp ~/.ssh/authorized_keys /home/yourname/.ssh/
chown -R yourname:yourname /home/yourname/.ssh
chmod 700 /home/yourname/.ssh
Turn off password and root login
Edit the SSH config. On Ubuntu 24.04 and Debian 12, drop-in files in / are cleanest. Name yours so it sorts first: sshd uses the first value it reads, and many cloud images already ship a 50-cloud-init.conf that turns password login back on.
serversudo nano /etc/ssh/sshd_config.d/00-hardening.conf
Add:
00-hardening.conf — nanoPasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
Save, then test the config before reloading:
serversudo sshd -t
sudo systemctl reload ssh
On Ubuntu 24.04 the service is named ssh, not sshd. Keep your current session open. Open a new terminal and log in again. If that works, you’re done. If it doesn’t, fix the config from your still-open session.
If it fails: sshd -t prints an error. It names the file and line; fix it and run sshd -t again. Don’t reload until it prints nothing.
Set up the firewall
Debian 12 doesn’t include ufw by default, so install it first (sudo apt install ufw). Ubuntu has it already.
serversudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw enable
Only open 80 and 443 if you’re serving web traffic:
serversudo ufw allow 80/tcp
sudo ufw allow 443/tcp
If you changed your SSH port, allow that port instead of OpenSSH. Netcup and Hetzner also have a network firewall in the panel; use both if you have them.
If it fails: New SSH logins time out after ufw enable. SSH wasn’t allowed first; run sudo ufw allow OpenSSH from the console.
Turn on automatic security updates
On the server:
serversudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Answer yes. This applies security updates only. Let patches install themselves but keep reboots under your control: in /, leave Automatic-Reboot set to false (an August 2026 r/VPS thread covers the downtime debate).
Automatic-Reboot is off by default, so patches install but the server never restarts on its own. Source: documentation.ubuntu.com, captured Nov 20, 2026.
Set up a backup that lives off the server
Snapshots are not backups: they live in the same account as the server. An August 2026 r/VPS user asked “what if the account itself disappears?” — a wrong abuse ban, a billing glitch or a data-center fire takes both.
Install restic or borg and point it at object storage from a different provider. Set the bucket’s access keys as environment variables before restic init; restic’s documentation lists the names for each storage provider.
serversudo apt install restic
restic init --repo s3:YOUR_BUCKET_URL
For S3-compatible storage, restic reads the bucket keys from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Source: restic.readthedocs.io, captured Nov 20, 2026.
Then back up /, /, and your app directories on a schedule. Run one restore into a scratch directory this week. An untested backup is a guess.
If it fails: The server is gone and the bucket keys went with it. Keep a copy of the keys in your password manager, not only on the server.
Key takeaways
- 2FA on the provider account is step one of any new VPS setup, not an afterthought.
- Test the console before you need it; it’s your way back in after a bad SSH config.
- Key-only login, root login off, and a default-deny firewall take about ten minutes.
- Automatic security updates yes; automatic reboots on your schedule.
- A snapshot is not a backup. Keep one copy off the server and restore it once.
A VPS for this guide
Everything above runs on any VPS with 1 GB of RAM. The cheapest 1 GB+ plan at each provider whose prices we read every day, IPv4 included:
| Plan · provider | vCPU · RAM · disk | You pay | Visit |
|---|---|---|---|
KVM VPS Special 1 GB RackNerd · Los Angeles +19 | 1 vCPU·1 GB·20 GB | $1.83/mo | |
VPS pico G11.5s netcup · Nuremberg | 1 vCPU·1 GB·30 GB | $2.00/mo | |
SSD VPS 1 CloudCone · USA | 2 vCPU·1 GB·30 GB | $2.33/mo | |
1 slice InterServer · New York +2 | 1 vCPU·2 GB·40 GB | $3.00/mo | |
NVMe 2 GB HostHatch · Amsterdam +15 | 1 vCPU·2 GB·10 GB | $4.00/mo |
Prices read Dec 4, 2026. gets that provider's deals on Telegram. Compare every 1 GB plan →
Common new VPS setup problems
You’re locked out after step 5.Use the console you tested in step 1. Log in, fix sshd_config, run sshd -t, reload. If the console fails, most providers offer a rescue mode that boots a temporary system with your disk mounted.
Brute-force noise fills your logs.Close port 22 to the world: reach SSH over Tailscale or NetBird, or allow only your own IP in ufw. Either beats watching fail2ban count. A September 2026 r/VPS thread reports SSH brute-force attempts in the tens of thousands per day.
You can’t remember what you changed.Run history on the server, and sudo find /etc -type f -mtime -1 to list config files changed in the last 24 hours. Write what you find in your notes file, or script the setup with Ansible or cloud-init so the next box comes out the same. In the May 2026 r/selfhosted “first 30 minutes” checklist thread, people say they spend one to two hours searching every time they set up a new box.
Your provider deletes unpaid servers fast.Set billing reminders, use a card that won’t expire, and keep the off-server backup from step 8. RackNerd’s terms say a server is deleted 7 days after the due date with no recovery (RackNerd terms of service, checked Nov 9, 2026). DMIT keeps an expired instance for 3 days (DMIT billing FAQ). We compare these deletion windows in our provider terms comparison.
Seven days after an unpaid invoice, RackNerd deletes the server and its data for good. Source: racknerd.com/terms-of-service, captured Nov 20, 2026.
After the new VPS setup: going further
Once the eight steps are done, these are worth an hour:
- fail2ban or CrowdSec to cut log noise and slow repeated attempts.
- Tailscale so SSH isn’t reachable from the public internet at all.
- Timezone and hostname —
sudo timedatectl set-timezone UTCandhostnamectl set-hostname. - A swap file on 1–2 GB plans, so a memory spike doesn’t kill your process.
- Monitoring like Uptime Kuma, ideally hosted somewhere other than the box it watches.
If you’re sizing a server for automation rather than a website, our guide to the best VPS for AI agents covers what those workloads need. And if you’re weighing two European providers, Hetzner vs Netcup compares their plans and terms. For a specific provider’s renewal pricing and account rules, the RackNerd review is a useful example of what to check before you buy.
Questions
Should I change the SSH port?
It reduces log noise but isn’t real security. Key-only login and a firewall do more. If you do change it, allow the new port in ufw before reloading SSH.
Is a provider snapshot a backup?
No. A snapshot lives in the same account as the server. If the account is lost, banned, or the provider shuts down, the snapshot goes with it. Keep a copy off the server.
Do I need fail2ban if I disable passwords?
Not strictly. With password login off, brute force can’t succeed. fail2ban mainly cuts log volume and slows scanners. Tailscale or source-IP restrictions solve the same problem more directly.
Can I do all this with a script?
Yes. People in the r/selfhosted thread use Ansible or cloud-init for repeatable setup. Write the script after you’ve done the steps by hand once, so you know what each line does.
What if I lock myself out?
Use the provider’s web console — that’s why step 1 tests it. Fix sshd_config, run sshd -t, reload. If the console fails, boot rescue mode and edit the file from there.
How we checked: The steps use the standard Ubuntu 24.04 and Debian 12 tools; we did not run them on every provider’s images. Provider terms quoted here carry check dates, and where a term isn’t stated we say so. How we check.
- Fail2ban setupFail2ban setup on Ubuntu 24.04: install it, put overrides in jail.local, test a real ban, and get back in through the web console if you lock yourself out.
- Install Docker on UbuntuHow to install Docker on Ubuntu 24.04 with Docker's apt repo: add the GPG key, install docker-ce, join the docker group, and run a test container to verify.
- SSH into a VPSHow to SSH into a server from Windows, Mac or Linux: the one command, what the fingerprint prompt means, and fixes for refused, timed out and denied logins.
- SSH key loginHow an SSH public private key pair logs you in, Ed25519 vs RSA, authorized_keys, and turning off password login on Ubuntu 24.04 without locking yourself out.
- SSH key on WindowsGenerate an SSH key on Windows 10 or 11 with the built-in ssh-keygen, then copy it to a Linux VPS without ssh-copy-id. One PowerShell line, plus error fixes.
- Ubuntu Server GUIInstall a GUI on Ubuntu Server 24.04 with a light Xfce desktop, keep xrdp off the internet and reach it over an SSH tunnel, then see which cheap VPS fits.
- Ubuntu static IPStatic IP setup on Ubuntu Server 24.04 with netplan: edit the YAML in /etc/netplan/, set addresses, routes and nameservers, then test it with netplan try first.
- Ubuntu SSH serverHow to install the SSH server on Ubuntu 24.04 with apt, check that ssh.socket is listening on port 22, and change the SSH port without locking yourself out.
- UFW firewallHow to install UFW on Ubuntu 24.04 and enable it without locking yourself out: allow SSH first, open ports and IPs, read status numbered, delete rules.
- YABS benchmarkWhat is YABS? Run this one-command VPS benchmark to test CPU, disk and network speed, read the fio, iperf3 and Geekbench 6 results, and compare real scores.