Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To set up a VPS server from scratch, create a Linux virtual machine, connect over SSH, update its packages, make a non-root administrator account, and allow only the network traffic your workload needs. Then install and test your software. If you are hosting a website, you can add a domain, HTTPS, and backups as separate steps.

The examples below are labeled by distribution and provider: commands for Ubuntu 24.04 are not automatically right for Ubuntu 22.04 or a RHEL-family system. Provider control panels and defaults also vary.

What you need before starting

A VPS is a virtual machine provided by a hosting or cloud company. You administer its operating system and install the software you need. DigitalOcean describes each Droplet as a server usable on its own or as part of larger cloud infrastructure in its Droplet creation guide.

  • A provider account and a Linux image that matches the instructions you intend to follow.
  • A plan with resources appropriate to your workload. The provider’s CPU, memory, and storage options are the comparison points; the sources cited here do not establish a universal minimum size or current cross-provider price.
  • An SSH client and an SSH key pair. You will add the public key to the VPS and keep the private key on your own device.
  • A way to reach the provider console in case a network or SSH change prevents remote access.

Choose a region that makes sense for your users or workload, and check that the selected image is supported. The examples here include Azure’s Ubuntu Server 22.04 quickstart and RamNode’s Ubuntu 24.04 guide, so their commands should not be mixed as if they described one identical setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

1. Prepare an SSH key

SSH keys let you authenticate without sending a password over the connection. If you do not already have a key pair, OpenSSH’s ssh-keygen can create one. DigitalOcean documents this approach and adding the public-key file in its Droplet creation guide.

  1. Generate a key pair with your SSH client, or select an existing key you control.
  2. Copy or upload the public key to the provider when creating the VPS. A public key commonly ends in .pub.
  3. Keep the private key on your computer, protect access to it, and do not paste or upload it as the public key.

Key formats, default usernames, and client instructions can differ. Azure’s Ubuntu quickstart, for example, shows a downloaded .pem key, uses chmod 400 to restrict its permissions on Mac or Linux, and connects with an ssh -i command. Follow the instructions for your provider and operating system rather than assuming every key is a .pem file.

2. Create the VPS and record its public IP

In the provider’s creation flow, select the Linux image, region, resource configuration, and authentication method. DigitalOcean’s creation page includes image, memory, and optional feature choices. Azure’s Ubuntu quickstart includes authentication and inbound-port choices. The wording and layout depend on the provider.

  1. Choose the image and add your SSH public key if the form offers that option.
  2. Review inbound network rules. Keep SSH reachable from your own connection during setup; for a basic public website, HTTP may also be needed. Do not open ports merely because they appear in an example.
  3. Create the machine and wait for provisioning to finish.
  4. Copy its public IP address and note the login username and any provider-specific connection details.

Keep track of machines you create. Azure’s quickstart documents deleting the VM and related resources when they are no longer needed, as well as an auto-shutdown option. Those controls help manage unused resources, but their availability and exact behavior depend on the provider and configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

3. Connect over SSH and update the system

From a terminal on Mac or Linux, a typical key-based connection has this form:

ssh -i /path/to/private-key username@server-ip

Replace the key path, username, and address with the values for your machine. If the first connection asks you to confirm the server’s host key, check the provider’s guidance before accepting an unfamiliar fingerprint. Azure’s documented form is ssh -i path-to-key username@server-ip; its username and key instructions apply to that quickstart, not every VPS.

Once connected, update packages before installing an application. Use the package manager for the operating system you selected.

Ubuntu 24.04 example

RamNode’s Ubuntu 24.04 guide uses:

sudo apt update && sudo apt upgrade -y

If the upgrade installs a kernel update that requires a restart, RamNode advises rebooting. Reconnect after the machine comes back online.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Ubuntu 22.04 Azure example

Microsoft’s Ubuntu Server 22.04 quickstart uses apt-get update before installing NGINX. That is a package-list refresh; follow your distribution’s instructions for applying available upgrades as well.

Do not copy Ubuntu’s apt commands onto a RHEL-family image. Different Linux distributions use different package managers and may require different service or firewall commands.

4. Create a non-root administrator account

Use a regular account with sudo privileges for routine administration rather than working as root for everything. DigitalOcean’s production setup guidance recommends a sudo non-root user and SSH-key authentication, and advises against password-based root access. RamNode also cautions against routine root use.

  1. Create a regular user using the procedure for your selected distribution and grant it the appropriate sudo privileges.
  2. Install or copy your SSH public key for that account.
  3. Open a second terminal session and confirm that the new account can connect and run an administrative command with sudo.
  4. Only after that test succeeds, change SSH authentication or root-login policy according to your OS and provider guidance.

Keep your original working session open until the new login is verified. SSH daemon settings and restart procedures are distribution-specific; a mistaken change can cut off remote access. If that happens, use the provider’s console or recovery procedure rather than repeatedly changing network rules without access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

5. Limit inbound traffic with firewalls

Allow only the inbound connections your workload needs. A provider-level or cloud firewall may control traffic before it reaches the VM; a host firewall may add another layer on the machine. Review both where they apply, and make sure their rules do not conflict.

Traffic When it is commonly needed Example, not a universal rule
SSH, usually TCP 22 Remote administration; restrict access to appropriate source addresses when practical. Azure’s Ubuntu quickstart selects SSH (22); Namecheap’s guide lists port 22 for SSH.
HTTP, usually TCP 80 A public website serving unencrypted HTTP or redirecting visitors to HTTPS. Azure’s quickstart selects HTTP (80); Namecheap lists port 80 for HTTP.
HTTPS, usually TCP 443 A public website serving encrypted traffic over TLS. Namecheap’s example lists port 443 for HTTPS.

Azure’s port selection is an example configuration for its quickstart, not a requirement for every VM. A private application, database, or other workload may need a different set of rules. Before applying a firewall change, confirm that SSH remains allowed from a suitable source; omitting it can lock you out of remote administration.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Install and test the software you need

Once the base machine is reachable and configured, install only the software needed for the intended workload. NGINX provides a straightforward web-server demonstration, but it does not deploy every kind of website or application by itself.

Install NGINX on Azure’s Ubuntu 22.04 example

Microsoft’s quickstart uses:

sudo apt-get -y update

sudo apt-get -y install nginx

After installation, open the VPS’s public IP address in a browser. The Azure guide uses this check to confirm the web server responds. If the page does not load, check that NGINX is running, the VM’s network rules allow HTTP, and you are testing the correct public IP.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

A real site may also need an NGINX server block or an Apache virtual host, an application runtime, a database, or other components. Install and configure those according to the application’s own requirements instead of assuming that a web server package alone is sufficient.

7. Add a domain and TLS for a public website

A domain is optional: you can reach a VPS by its public IP. If you want a named website, configure DNS records to point the domain to the VPS address, then configure the web server for that hostname. DNS settings may be managed by the registrar or by a separate nameserver provider.

Namecheap’s guide demonstrates A and CNAME records. The record types and values depend on your hostname and service, so follow the DNS provider’s instructions. The cited sources do not establish a universal DNS propagation time.

For HTTPS, configure TLS for the hostname and allow HTTPS traffic through the relevant firewalls. RamNode describes a domain as optional in its setup guide, but needed for SSL in that guide’s workflow. TLS setup varies by web server and certificate method, so use instructions that match your stack.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

8. Set up backups and ongoing maintenance

Plan recovery before the VPS holds important data. DigitalOcean’s recommended Ubuntu Droplet setup includes automatic backups and monitoring; Namecheap recommends automated backups to reduce the risk of difficult-to-recover data loss. Availability, retention, and restore procedures depend on the provider and selected service.

  • Enable a suitable backup option and learn how to restore from it before relying on it.
  • Keep the operating system and installed software updated.
  • Review SSH and firewall access as your needs change.
  • Remove virtual machines and related resources you no longer use.

A snapshot or backup feature is not proof that your data can be recovered. Know what is included and test a restore when the data matters.

Beginner VPS setup checklist

  • The VPS runs the Linux image and version you intended to install.
  • You can connect using SSH and your private key remains on your device.
  • Packages are updated using commands suited to that distribution.
  • A sudo-capable non-root account can log in successfully.
  • Firewall rules allow required services without exposing unrelated ports.
  • Your workload has been installed and tested at the IP address or hostname it will use.
  • If the machine holds important data, backups and a recovery approach are in place.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.