Vultr Ubuntu Setup: Complete Server Configuration Guide 2026

Published May 27, 2026 ยท Updated ยท 12 min read

Ubuntu remains the most popular Linux distribution for VPS deployments, and for good reason โ€” it combines enterprise-grade stability with a massive ecosystem of packages, documentation, and community support. When paired with Vultr's high-performance SSD cloud infrastructure, you get a server environment that's both powerful and straightforward to manage.

This guide walks you through the complete Vultr Ubuntu setup process from scratch. Whether you're launching a personal blog, a production web application, or a development environment, by the end of this tutorial you'll have a fully configured, hardened Ubuntu 22.04 LTS server running behind a configured firewall with a LEMP stack ready to go.

Why Choose Vultr for Ubuntu

Vultr offers several advantages that make it an ideal platform for Ubuntu deployments:

  • SSD-only storage โ€” All Vultr instances use NVMe or SATA SSD storage, ensuring fast disk I/O for web serving, databases, and application workloads
  • Global network โ€” 32 data center locations worldwide mean you can host servers close to your target audience for minimal latency
  • Block Storage โ€” Attach scalable block storage volumes separately from your compute instance, useful for databases and file storage
  • Hourly billing โ€” Pay only for what you use, starting at $2.50/month for a basic VPS instance
  • One-click OS reinstalls โ€” Swap Ubuntu versions or start fresh in under 60 seconds from the dashboard

Vultr's competitive pricing structure makes it particularly attractive for developers and small teams who need reliable infrastructure without enterprise contracts.

Deploying Your Ubuntu Server on Vultr

Before you begin, make sure you have a Vultr account. The deployment process takes about 45 seconds.

Step 1: Create a New Instance

From your Vultr dashboard, click Deploy Server. Select the following:

  • Location โ€” Choose the data center closest to your users (e.g., Tokyo for Asia, New York for US East Coast)
  • Server Type โ€” Cloud Compute under Intel/AMD (general purpose workloads) or Performance for CPU-optimized tasks
  • Operating System โ€” Ubuntu 22.04 LTS (Long-Term Support, recommended) or Ubuntu 24.04 LTS for the latest features
  • Server Size โ€” Start with the $5/month plan (1 vCPU, 1GB RAM, 25GB SSD) for development; scale up as needed
  • Additional Features โ€” Enable IPv6 and Auto Backups if you want them

๐Ÿ’ก Tip: Enable Auto Backups

For $1/month extra, Auto Backups take daily snapshots of your entire server. This is cheap insurance โ€” if a configuration change breaks something, you can restore in minutes.

Click Deploy Now. Within 45 seconds, your server's root password will be emailed to you along with its IP address.

Step 2: Initial SSH Connection

Connect to your new server via SSH:

ssh root@YOUR_SERVER_IP

You'll be prompted for the root password from your welcome email. On first login, Ubuntu will force you to change the root password immediately. Choose a strong password and record it in your password manager.

Create a Sudo User

Operating as root daily is a security risk. Create a regular user with sudo privileges:

adduser deployer
usermod -aG sudo deployer

Set up SSH key-based authentication for the new user (more secure than password-only):

mkdir -p /home/deployer/.ssh
chmod 700 /home/deployer/.ssh
nano /home/deployer/.ssh/authorized_keys

Paste your public key (from cat ~/.ssh/id_rsa.pub on your local machine) into this file, then:

chown -R deployer:deployer /home/deployer/.ssh
chmod 600 /home/deployer/.ssh/authorized_keys

Step 3: Security Hardening

Disable Root Login

Edit the SSH daemon config:

sudo nano /etc/ssh/sshd_config

Find and update these lines:

PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes

Restart SSH daemon:

sudo systemctl restart sshd

โš ๏ธ Before You Log Out

Test your new login before closing your existing root session. Open a new terminal and verify you can SSH as deployer with your key. Only then close the root session.

Install Fail2Ban

Fail2Ban automatically blocks IP addresses that repeatedly fail authentication attempts:

sudo apt update && sudo apt install -y fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

The default configuration is suitable for most servers out of the box โ€” it monitors SSH by default and bans an IP after 5 failed attempts within 10 minutes.

Step 4: Install LEMP Stack

LEMP (Linux, Nginx, MySQL/MariaDB, PHP) powers the majority of web applications. Install each component:

Nginx

sudo apt install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginx

Verify Nginx is running by visiting http://YOUR_SERVER_IP โ€” you should see the default Nginx welcome page.

MySQL

sudo apt install -y mysql-server
sudo mysql_secure_installation

Follow the prompts: set a strong MySQL root password, remove anonymous users, and disable remote root login. Enable the MySQL service:

sudo systemctl start mysql
sudo systemctl enable mysql

PHP

sudo apt install -y php8.1-fpm php8.1-mysql php8.1-cli php8.1-xml php8.1-mbstring php8.1-curl

Check PHP-FPM is running:

sudo systemctl status php8.1-fpm

Configure Nginx for PHP

Create a basic PHP site configuration:

sudo nano /etc/nginx/sites-available/example.com

Paste this configuration:

server {
    listen 80;
    server_name YOUR_DOMAIN_OR_IP;
    root /var/www/html;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

Enable the site and test Nginx configuration:

sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Test PHP processing by creating a quick info page:

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

Visit http://YOUR_SERVER_IP/info.php โ€” if you see the PHP info page, your LEMP stack is fully functional.

Step 5: Firewall Configuration with UFW

Ubuntu includes UFW (Uncomplicated Firewall). Configure it to allow only necessary traffic:

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable

Verify the rules:

sudo ufw status verbose

Your server now accepts SSH (port 22), HTTP (port 80), and HTTPS (port 443) while blocking all other inbound traffic.

๐Ÿš€ Ready to Launch Your Ubuntu Server?

Get started with Vultr's high-performance SSD VPS โ€” plans from $2.50/month with hourly billing.

Deploy on Vultr โ†’

Frequently Asked Questions

Which Ubuntu version should I use?

For production environments, Ubuntu 22.04 LTS is the safest choice โ€” it receives security updates until 2032 and has broad package compatibility. Use Ubuntu 24.04 LTS only if you need the absolute latest software versions and can manage more frequent updates.

Can I use Ubuntu Server instead of the desktop version?

Always use the Server image on a VPS. The Server image ships without a GUI, saving ~2GB of RAM and reducing your attack surface. The desktop version is only needed if you need a full graphical environment, which you shouldn't run on a VPS.

How do I monitor server resource usage?

Install htop for real-time monitoring:

sudo apt install -y htop
htop

How do I add a domain name to my Vultr Ubuntu server?

Point your domain's DNS A record to your Vultr server's IPv4 address. In your Nginx config, replace YOUR_DOMAIN_OR_IP with your actual domain, then obtain a free TLS certificate via Let's Encrypt.

What's the difference between Vultr's Cloud Compute and Performance plans?

Cloud Compute uses shared CPU resources and is suitable for most web workloads. Performance plans guarantee dedicated CPU cores and are better for CPU-intensive tasks like video transcoding, ML inference, or high-traffic databases.

VG

Vultr Guide Editorial Team

Covering cloud infrastructure, server management, and developer tooling. Verified Vultr partner.

๐Ÿ”— Recommended Platforms

BC.GAME | Cloudbet

๐ŸŽฏ Recommended Betting Platforms

BC.GAME - Up to 300% Bonus Cloudbet - Best Crypto Sportsbook