If you’ve outgrown shared hosting but the idea of VPS hosting still feels “too technical,” this guide is for you. We’ll walk through setting up an unmanaged virtual private server step by step, using plain language and real commands you can paste into your terminal.
By the end, you’ll know how to go from a blank VPS to a secure, live website—without needing to be a Linux guru or a full-time sysadmin.
If shared hosting is like renting a room in a busy house, a VPS is like getting your own small place. On shared hosting, you share resources with whoever happens to be on the same server. On a Virtual Private Server, you get dedicated CPU, RAM, and storage slices just for you.
The trade‑off is simple:
Shared hosting: less control, easier to start
VPS hosting: more control, slightly more work, but way more flexibility
This guide assumes:
You’re using an unmanaged VPS
You’ve chosen Ubuntu 22.04 or AlmaLinux 9
You’re starting from a fresh install
If that sounds like your setup, you’re in the right place.
Before any commands, you need a server. When picking a VPS in the web hosting industry, don’t just look at the price. Check:
CPU and RAM: enough for your website or app
Storage: NVMe SSD if possible (it’s noticeably faster)
Security: DDoS protection, basic hardening options
Location: as close to your main users as you can
Scalability: you should be able to upgrade later without drama
Uptime and support: you want someone to talk to when things break
Imagine you’re about to follow all the steps in this guide. It’s much easier if your provider lets you spin up a server quickly, test things, and tear it down if you change your mind.
👉 See how GTHost lets you launch a VPS in minutes and experiment without long-term risk
Once your VPS is created, your provider will email you the IP address, root username, and password. Keep that handy; you’ll use it right away.
You manage an unmanaged VPS over SSH (a secure remote terminal). The tool you use depends on your operating system.
Open the built‑in Terminal app and run:
bash
ssh root@your-server-ip
Replace your-server-ip with the IP address from your VPS panel or email.
If it asks “Are you sure you want to continue connecting?” type yes.
Then enter your root password (you won’t see characters as you type; that’s normal).
If the password is correct, you’ll see a prompt that looks something like:
bash
root@your-server:~#
Now you’re “inside” your server.
On Windows, the easiest option for beginners is PuTTY:
Open PuTTY.
In Host Name, enter your VPS IP address.
Set Port to 22 and Connection type to SSH.
Click Open.
When prompted for login as:, type root and press Enter.
Type your password (characters won’t show) and press Enter.
Once you’re in, you’re ready to start configuring.
Working as root all the time is risky. First thing: update the system and create a normal user with admin rights.
Run:
bash
apt update && apt upgrade -y
adduser yourusername
usermod -aG sudo yourusername
This:
Updates and upgrades packages
Creates a new user
Gives that user sudo powers (so they can run admin commands when needed)
Run:
bash
dnf update -y
adduser yourusername
usermod -aG wheel yourusername
On AlmaLinux/CentOS, the wheel group is the “sudo” group.
Now, lock down direct root access. Still connected as root, open the SSH config:
bash
nano /etc/ssh/sshd_config
Find the line with PermitRootLogin and change it to:
bash
PermitRootLogin no
Save and exit (in nano: CTRL + X, then Y, then Enter), then restart SSH:
bash
systemctl restart sshd
From now on, you’ll log in as your new user, then use sudo when you need admin powers.
A VPS without a firewall is like leaving your front door wide open. Let’s close it, then add a bouncer.
Ubuntu / Debian (UFW)
Ubuntu’s ufw (Uncomplicated Firewall) makes basic firewall rules easy.
Allow SSH so you don’t lock yourself out:
bash
sudo ufw allow OpenSSH
Allow standard web ports:
bash
sudo ufw allow 80
sudo ufw allow 443
Port 80: normal HTTP traffic
Port 443: HTTPS (encrypted) traffic
Enable the firewall:
bash
sudo ufw enable
Type y when it asks if you’re sure.
AlmaLinux / CentOS (firewalld)
These use firewalld:
bash
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
Later, if you run mail servers, FTP, or something else, you’ll open those ports too.
Fail2Ban watches logs for repeated failed login attempts and blocks the offending IPs. It’s an easy win for VPS security.
Ubuntu / Debian
bash
sudo apt install fail2ban -y
AlmaLinux / CentOS
First add the EPEL repo:
bash
sudo dnf install epel-release -y
Then install Fail2Ban:
bash
sudo dnf install fail2ban -y
Fail2Ban usually starts automatically and begins monitoring common services like SSH. You can fine‑tune its rules later, but the default setup is already a lot safer than nothing.
Now the big decision: do you want a control panel or do you want to manage things by hand?
You have two main paths:
Use a control panel like cPanel/WHM to get a familiar interface
Install a manual web server stack (LAMP) for maximum control
If you want something close to classic shared hosting, cPanel/WHM is the “click and configure” route.
On AlmaLinux or Ubuntu 22.04, log in as root and run:
bash
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
This takes a while. Once it finishes, you’ll be able to access WHM in your browser:
text
https://your-server-ip:2087
From WHM you can:
Create hosting accounts
Manage domains and DNS
Set up email
Install SSL certificates
Most VPS providers, including ones like GTHost, can handle the cPanel licensing for you; you just focus on the configuration.
If you’re comfortable with the command line and want full control, set up a LAMP stack.
Ubuntu
bash
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql -y
AlmaLinux
bash
sudo dnf install httpd mariadb-server php php-mysqlnd -y
Enable and start services.
Ubuntu:
bash
sudo systemctl enable apache2
sudo systemctl start apache2
sudo systemctl enable mariadb
sudo systemctl start mariadb
AlmaLinux:
bash
sudo systemctl enable httpd
sudo systemctl start httpd
sudo systemctl enable mariadb
sudo systemctl start mariadb
Secure the database:
bash
sudo mysql_secure_installation
This script walks you through root password setup, anonymous user removal, and other basics.
Security on a VPS isn’t a one‑time checkbox; it’s ongoing. But you can get a solid baseline quickly.
Work through these:
Use Let’s Encrypt via Certbot for free SSL certificates
Keep your OS and packages updated regularly
Enable automatic security updates where possible
Set up scheduled backups (snapshots or file‑level backups)
Most serious VPS hosting providers give you snapshot options and backup tools directly in their panel. With a provider like GTHost you can lean on those features instead of building everything from scratch.
Now for the fun part: putting your website online.
For most beginners, SFTP is the easiest route:
Use an SFTP client like FileZilla
Connect using your server IP, your new username, and SSH key or password
If you’re using Apache with the default config, your web root is:
bash
/var/www/html
Upload your site there, then delete the default index.html that Apache creates so your homepage shows up.
If you’re a developer, you might prefer deploying from Git instead. That works too—set up a bare repo on the server and pull your code into the web root.
Log into your domain registrar (whoever you bought the domain from) and find the DNS settings.
Update your A record:
Name: @ (or your root domain)
Type: A
Value: your VPS IP address
If you have www as well, add or update a www record to point to the same IP.
DNS changes can take anywhere from a few minutes to a few hours to fully propagate, so don’t panic if it doesn’t work instantly.
Whenever you change configs or install modules, it’s a good idea to restart the web server.
Ubuntu:
bash
sudo systemctl restart apache2
AlmaLinux:
bash
sudo systemctl restart httpd
Open a browser, type your domain, and hit Enter.
If you see your site: nice, your first VPS setup is live.
If not: check DNS, check your firewall, and confirm your files are in the right directory.
This is where having a fast, flexible provider really pays off. If you need to scale RAM, CPU, or storage because your site is growing, you want upgrades to feel like a few clicks instead of a migration nightmare.
👉 Check how GTHost handles quick VPS upgrades and instant setup for growing projects
Once you’ve confirmed everything works, you’re officially running your own VPS like someone who has done this for years.
After your VPS is up and running, you can keep improving things at your own pace:
Learn more about hardening SSH and tightening firewall rules
Explore other control panels (for example, open-source ones if you don’t want cPanel)
Use Git, Docker, or CI/CD pipelines for cleaner deployments
Add monitoring so you know when something slows down or goes offline
If all of this feels like a lot, that’s normal. You don’t have to master everything in one night. Some people eventually move to a managed VPS plan, where the provider helps with upkeep while they focus on the site or app.
Moving from shared hosting to your first Virtual Private Server sounds scary, but in practice it’s just a series of small, clear steps: connect by SSH, update the system, secure it, choose your hosting stack, upload your site, and point your domain. Once you’ve done it once, the whole VPS hosting world feels much more accessible and under your control.
For beginners who want low friction, fast setup, and room to grow, 👉 why GTHost is suitable for your first VPS hosting setup comes down to instant deployment, flexible resources, and infrastructure that’s ready for real traffic. Combine a reliable provider with the steps in this guide, and you’ll have a VPS that’s faster, more stable, and easier to scale than the shared hosting you started from.