Advertising disclosure: We may earn a commission when you buy through links on this page. It does not change the price you pay or the order of the list.

Guide

How to host a website on a VPS, step by step

To host a website on a VPS you rent a small Linux server, secure it with SSH keys and a firewall, install a web server such as Nginx or Caddy, point your domain at the server's IP address and add a free HTTPS certificate. A static site needs very little: 1 GB of RAM is plenty. The price of the freedom is that updates and backups become your job.

๐Ÿ—“๏ธ Published October 22, 2026

Is a VPS the right place for your site

A static site (plain HTML, CSS and JavaScript, or the output of a generator such as Astro, Hugo or Eleventy) can be hosted almost anywhere, including free static hosts. A VPS makes sense when you want one server for several sites, need to run your own backend or database next to the site, want full control of headers and redirects, or simply want to learn how hosting works.

If you only need one simple page and never want to touch a terminal, a static host or shared hosting is the easier choice. Do not rent a VPS just because it sounds more serious.

Step 1: pick the plan and the operating system

For a static site the smallest plan is enough, so compare providers on location, reliability and renewal price rather than on raw specs. Choose a data center near most of your visitors.

For the OS, take a current long-term-support release of Ubuntu or Debian. Both have the most tutorials and receive security updates for years. When the provider asks, choose a plain OS image, not a prebuilt app image, unless you want that exact app.

Current plans and prices

We may earn a commission when you buy through links on this page. It does not change the price you pay or the order of the list.

Best value
OVHcloud
VPS-1
  • 2 vCPU
  • 4 GB RAM
  • 40 GB NVMe
from$4.54/mo
  • Unlimited traffic
  • Anti-DDoS included
See plan โ†’

Price checked September 28, 2026

Contabo
Cloud VPS 4
  • 4 vCPU
  • 8 GB RAM
  • 100 GB SSD
from$6.26/mo
  • Very high RAM/storage per euro
  • Unlimited traffic (fair use)
See plan โ†’

Price checked September 28, 2026

Hostinger
KVM 1
  • 1 vCPU
  • 4 GB RAM
  • 50 GB NVMe
  • 4 TB Traffic
from$6.49/mo
  • NVMe + AMD EPYC on all VPS plans
  • Free weekly backups
See plan โ†’

Price checked September 28, 2026 ยท Renews at $11.99/mo

Step 2: secure the server before anything else

A new public server starts receiving login attempts within minutes, so do these steps first.

  • Create a normal user with sudo rights and stop working as root.
  • Generate an SSH key pair on your computer (`ssh-keygen`), copy the public key to the server (`ssh-copy-id`) and turn off password logins in the SSH configuration.
  • Enable a firewall such as UFW and allow only SSH (22), HTTP (80) and HTTPS (443).
  • Turn on automatic security updates (the `unattended-upgrades` package on Ubuntu and Debian).
  • Optionally install Fail2ban to ban addresses that keep guessing logins.

Step 3: install a web server and connect your domain

Nginx is the classic choice: install it with your package manager, put your files in a folder such as `/var/www/yoursite` and add a short server block that points to it. Caddy is simpler for beginners because it obtains and renews HTTPS certificates by itself from a two-line configuration file. Either one is fine for a static site.

Then point your domain at the server. In your registrar's or DNS provider's panel create an A record for the root domain (and one for `www`, or a CNAME to the root) with your server's IPv4 address. If the server has IPv6, add an AAAA record too. DNS changes can take from a few minutes to a few hours to spread.

Step 4: HTTPS and deploying the site

With Caddy, HTTPS is automatic once DNS points to the server. With Nginx, install Certbot, run it for your domain and let it edit the configuration; it sets up automatic renewal for the free Let's Encrypt certificate. Check that port 80 and 443 are open, or issuing the certificate will fail.

To deploy, build the site on your computer and copy the output folder to the server with `rsync` or `scp`. Later you can automate this with a Git hook or a CI job. Always upload to a folder your web server user can read, but not write.

Updates, backups and when a panel is easier

A static site has a small attack surface, but the server underneath still needs care. Keep the operating system and the web server updated, and watch the certificate renewal logs once after setup.

  • Keep your site in a Git repository, so the source of truth is not the server.
  • Take a provider snapshot before big changes, and keep a copy of configuration files off the server.
  • Test a restore once on a spare server, because an untested backup is only a hope.
  • If you would rather click than type, a free control panel such as CloudPanel or HestiaCP sets up sites, certificates and databases from a browser. It uses some RAM, so leave headroom on the smallest plans.
  • When NOT to do this: if the site earns money and nobody on your team can fix a broken server at night, use managed hosting.

Compare plans side by side

Sort by
ProviderPlanvCPURAMDiskPriceOffer
OVHcloudVPS-124 GB40 GB$4.54/moSeptember 28, 2026See plan โ†’
DigitalOceanBasic 1 GB11 GB25 GB$6.00/moSeptember 28, 2026See plan โ†’
ContaboCloud VPS 448 GB100 GB$6.26/moSeptember 28, 2026See plan โ†’
HostingerKVM 114 GB50 GB$6.49/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 114 GB50 GB$6.99/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 1-4 GB-$6.99/moSeptember 28, 2026See plan โ†’
OVHcloudVPS-248 GB75 GB$8.50/moSeptember 28, 2026See plan โ†’
ContaboCloud VPS 6612 GB200 GB$8.53/moSeptember 28, 2026See plan โ†’
HostingerKVM 228 GB100 GB$8.99/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 228 GB100 GB$9.49/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 2-8 GB-$9.49/moSeptember 28, 2026See plan โ†’
OVHcloudVPS-3612 GB100 GB$12.32/moSeptember 28, 2026See plan โ†’
HostingerKVM 4416 GB200 GB$12.99/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 4-16 GB-$13.99/moSeptember 28, 2026See plan โ†’
ContaboCloud VPS 8824 GB300 GB$15.93/moSeptember 28, 2026See plan โ†’
DigitalOceanBasic 2 GB / 2 vCPU22 GB60 GB$18.00/moSeptember 28, 2026See plan โ†’
OVHcloudVPS-4824 GB200 GB$23.37/moSeptember 28, 2026See plan โ†’
DigitalOceanBasic 4 GB24 GB80 GB$24.00/moSeptember 28, 2026See plan โ†’
HostingerKVM 8832 GB400 GB$25.99/moSeptember 28, 2026See plan โ†’
HostingerGame Panel 8-32 GB-$27.99/moSeptember 28, 2026See plan โ†’
ContaboCloud VPS 121248 GB400 GB$28.44/moSeptember 28, 2026See plan โ†’
DigitalOceanBasic 8 GB48 GB160 GB$48.00/moSeptember 28, 2026See plan โ†’
OVHcloudRISE-1632 GB1.024 TB$60.30/moSeptember 28, 2026See plan โ†’
OVHcloudRISE-S864 GB1.024 TB$77.00/moSeptember 28, 2026See plan โ†’
OVHcloudRISE-M1264 GB1.024 TB$118/moSeptember 28, 2026See plan โ†’
ContaboAMD Ryzen 12 Cores1264 GB1.024 TB$170/moSeptember 28, 2026See plan โ†’
ContaboAMD Genoa 24 Cores24128 GB2.048 TB$226/moSeptember 28, 2026See plan โ†’
Server finder
Tell us the project, get the spec and the cheapest plans
Try the tool โ†’

Questions people ask

How much RAM do I need to host a static website on a VPS?

1 GB is enough for a static site with moderate traffic, because the web server only sends files. Add RAM if you also run a database, a panel or several sites.

Nginx or Caddy for a beginner?

Both work. Caddy is easier because HTTPS is automatic and the config is short. Nginx has more tutorials and is very common, so help is easy to find.

Do I need a control panel to host a website on a VPS?

No. For one static site the command line is simple enough. A panel helps when you host many sites or want to manage databases and email from a browser.

Why is my domain still not opening the site?

Usually DNS has not spread yet, the A record points to the wrong IP, or the firewall blocks ports 80 and 443. Check the record with `dig` and the firewall rules first.

More guides

Related