Best for · Web hosting

Ubuntu server for web hosting: which version, how to set it up, where to rent one

We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.

Verdict Our pick

The bar guide has a call.

The vectaai bar guide pointing at the verdict
  • Hostinger for more RAM for the money, DigitalOcean if you want month to month billing and a smaller start.

Compared here

  • 01Hostinger VPS
  • 02DigitalOcean
  • 03Ubuntu 26.04 LTS
  • 04Ubuntu 24.04 LTS

Short answer

For a new web server, pick the newest long term support release. Canonical's release page, read on 4 December 2026, lists Ubuntu 26.04 LTS (released April 2026) with standard security maintenance to May 2031, and 24.04 LTS to May 2029. 22.04 LTS ends standard maintenance in May 2027. Skip 20.04 LTS, whose standard maintenance already ended.

To rent one, Hostinger's KVM 1 VPS was listed at $6.49 a month on a 24-month upfront term and DigitalOcean's smallest Droplet at $4.00 a month. Both list Ubuntu. Pick Hostinger for more RAM for the money, DigitalOcean if you want month to month billing and a smaller start.

Hostinger VPSDigitalOcean

Sponsored links. We may earn a commission; it never changes the pick.

At a glance

Prices from each seller's own pricing page, read 4 December 2026, in US dollars because of where we browse from. Hostinger's price is a promo on a 24-month upfront term. We did not convert or test anything.
Hostinger KVM 1Hostinger KVM 2DigitalOcean $6 DropletDigitalOcean $12 Droplet
Price listed$6.49 a month promo$8.79 a month promo$6.00 a month$12.00 a month
Renewal$11.99 a month$14.99 a monthNot stated as differentNot stated as different
vCPU1211
RAM4 GB8 GB1 GiB2 GiB
Storage50 GB NVMe100 GB NVMe25 GiB SSD50 GiB SSD
Transfer4 TB8 TB1,000 GiB2,000 GiB
Billing24 months paid upfront24 months paid upfrontMonthlyMonthly

Short version. Ubuntu is the default Linux for a lot of web servers because it is boring in the good way. You rent a small virtual server, pick Ubuntu, install Apache or nginx, and you have a web server. The hard parts are the three things nobody mentions in the sales pitch: which version, the firewall, and who does the updates. That is you.

So this page is for the person who wants to run their own server and wants to do it without regretting it.

Money talk: Hostinger and DigitalOcean may pay us if you buy through our links. That does not change the order here. See how we pick.

Is this the right choice for you?

An Ubuntu server is not shared hosting. On shared hosting the company runs the machine and you upload files. On an Ubuntu VPS you get the empty machine. Per InMotion's description in a search result, Ubuntu hosting usually gives you the operating system and server setup and not much else. That matches what we saw on Hostinger's and DigitalOcean's pages, which sell the machine and list Ubuntu as one of the operating systems.

Pick Ubuntu if:

  • You are comfortable in a terminal, or want to learn.
  • You want to run something shared hosting will not run: Node, Python apps, Docker, a custom stack.
  • You want to choose your own web server and database.

Skip it if you just want a WordPress site up by tonight. A managed host will do that with less pain. See best web hosting or best cheap web hosting.

Which Ubuntu version

Canonical's release page, read today, lists the long term support releases. Standard security maintenance and then Expanded Security Maintenance (ESM), which needs Ubuntu Pro:

ReleaseStandard maintenance endsESM ends
26.04 LTS (released April 2026)May 2031May 2036
24.04 LTSMay 2029May 2034
22.04 LTSMay 2027May 2032
20.04 LTSEnded; "May 2025 With Ubuntu Pro"May 2030

The page also says LTS releases come every two years. Practical rules:

  • New server today: 26.04 LTS. You get the longest runway before you must upgrade.
  • Existing server on 24.04: fine. Plan the move before May 2029.
  • Existing server on 22.04: you have until May 2027 for standard fixes. Plan the upgrade in the next few months.
  • Anything on 20.04: it is past standard maintenance, so security fixes now need Ubuntu Pro. Move off it.

Do not pick a non-LTS release for a server you want to forget. We did not read their support dates today, so we will not quote them. LTS is the one you can plan around.

Where to rent one

We read two seller pages today. Both showed US dollars.

Hostinger VPS. Four KVM plans, all billed on a 24-month term paid upfront. KVM 1 is $6.49 a month promo (original $19.49) with 1 vCPU, 4 GB RAM, 50 GB NVMe and 4 TB bandwidth, which is $155.76 paid today, then renews at $11.99 a month. KVM 2 is $8.79 a month with 2 vCPU, 8 GB and 100 GB, renewing at $14.99. KVM 4 is $12.99 with 4 vCPU, 16 GB and 200 GB, renewing at $28.99. KVM 8 is $25.99 with 8 vCPU, 32 GB and 400 GB, renewing at $49.99. Weekly backups are included. The OS templates list Ubuntu, though it did not say which versions. Ask or check at checkout that 26.04 or 24.04 is on the list. It also lists Debian, AlmaLinux and others, and says "Cancel anytime."

DigitalOcean. Basic Droplets from $4.00 a month for 1 vCPU, 512 MiB RAM, 10 GiB SSD and 500 GiB transfer, up to $96.00 for 8 vCPU and 16 GiB. The middle of the range: $6.00 (1 GiB), $12.00 (2 GiB), $18.00 (2 vCPU, 2 GiB), $24.00 (2 vCPU, 4 GiB), $48.00 (4 vCPU, 8 GiB). Its FAQ says you can choose Ubuntu, CentOS, Debian, Fedora and others. It did not confirm Ubuntu for Basic plans in particular on that page, so confirm when you create the Droplet.

A fair comparison: Hostinger gives you much more RAM and disk per dollar, but you pay upfront for two years and the renewal is nearly double. DigitalOcean's price is low and monthly, but the small plans have very little memory.

The sensible starting size

We did not benchmark anything, so this is our reading, not a test. Ubuntu itself is light. What eats memory is your site: WordPress with a few plugins, a database, and a cache. A 512 MiB machine is tight for that. 1 to 2 GiB is the comfortable start on DigitalOcean's list, and Hostinger's smallest plan already has 4 GB. If you run Docker or several sites, go bigger.

Setting up the web server

From Ubuntu's own server documentation, read today:

  1. Install Apache. Refresh the package index, then install:
    • sudo apt update
    • sudo apt install apache2
  2. Or install nginx.
    • sudo apt update && sudo apt install nginx
    • nginx starts automatically. Check with sudo systemctl status nginx. A working install shows "Welcome to nginx!" at http://your_server_ip.
  3. Know where the config lives. Apache is configured through plain text files in /etc/apache2/, with apache2.conf holding global settings, ports.conf for ports, and module files in mods-available with symlinks in mods-enabled. A module takes effect after Apache restarts. The nginx install page points to a separate configuration guide for its files, which we did not read.
  4. Start and stop. For nginx, sudo systemctl restart nginx, and sudo systemctl disable nginx or enable nginx for boot behaviour.

The Apache page did not state the default document root or firewall steps. Not stated on the official page as of 4 December 2026. The server documentation has other pages for those, and your host's own guides help too.

Lock it down: the firewall

Ubuntu's firewall guide says ufw is initially disabled. Order matters:

  1. Allow SSH first: sudo ufw allow ssh (same as sudo ufw allow 22).
  2. Then enable: sudo ufw enable.
  3. Check the application profiles with sudo ufw app list, and allow the web profile you find, or the ports. You can preview a rule with sudo ufw --dry-run allow http.

If you enable the firewall before allowing SSH on a remote machine, you can cut off your own connection. Hostinger and DigitalOcean both have web consoles that rescue you, but it is a bad afternoon.

What you are signing up for

  • Updates. Nobody patches your server for you. Plan a regular update habit, and a plan for the release upgrade before your standard maintenance date.
  • Backups. Hostinger's page lists weekly backups on its plans. Check what your plan includes, and keep a copy off the server.
  • Domain and DNS. The server is the building, the domain is the address. See how to register a domain.
  • Security. Keys instead of passwords for SSH, a firewall, and only the services you need.
  • Time. An hour or two the first time. Then little, if you are tidy.

Who should pick what

  • You want the most server for the money and can pay upfront. Hostinger KVM 1 or 2. Count the renewal.
  • You want to start tiny and pay monthly. DigitalOcean's $6 or $12 Droplet.
  • You run n8n or a small app, not a website. See our Hostinger VPS for n8n page.
  • You need a whole physical machine. That is dedicated hosting, a different category. See Namecheap dedicated server for one example.
  • You do not want to touch a terminal. Skip this page. Use managed hosting.

How we checked, and what we did not

We read Canonical's release cycle page, Ubuntu's server documentation pages for Apache, nginx and the firewall, Hostinger's VPS page and DigitalOcean's Droplet pricing on 4 December 2026. We did not rent a server, install Ubuntu, benchmark anything or test either seller's support. Where a page said nothing, we wrote "not stated". Our method is on how we pick.

Questions people ask

Which Ubuntu version should I use for a web server?

The newest long term support release. Canonical's page lists 26.04 LTS, released April 2026, with standard maintenance to May 2031. 24.04 LTS runs to May 2029 and 22.04 LTS to May 2027. Non-LTS releases get much shorter support and are a poor fit for a server you want to forget about.

Is Ubuntu Server good for web hosting?

Yes, it is a common choice and well documented. Ubuntu's own guides show installing Apache with sudo apt install apache2 and nginx with sudo apt update && sudo apt install nginx. You get a plain server. You, not the OS, supply the security habits, backups and updates.

Do I need a firewall on an Ubuntu web server?

Yes. Ubuntu's firewall guide says ufw is initially disabled. You allow SSH first, for example sudo ufw allow ssh, then enable it with sudo ufw enable. Allow web ports after that. Do it in that order or you can lock yourself out of your own server.

How much does an Ubuntu VPS cost?

On the pages we read on 4 December 2026, DigitalOcean listed Droplets from $4.00 a month and Hostinger's KVM 1 at a $6.49 a month promo on a 24-month upfront term, renewing at $11.99 a month. Both in US dollars. Judge by the renewal, not the promo.

Do I need Ubuntu Pro for a web server?

Not for the standard five-year window. Canonical's page shows Ubuntu Pro is what covers the Expanded Security Maintenance years after standard maintenance ends, for example May 2029 to May 2034 for 24.04 LTS. If you plan to stay on a release that long, put the upgrade in your calendar instead.

Sources

Every fact above comes from these pages. Prices change, so each one carries the date we read it.

  1. Ubuntu release cycle, checked 4 Dec 2026
  2. Ubuntu Server docs: install Apache2, checked 4 Dec 2026
  3. Ubuntu Server docs: install nginx, checked 4 Dec 2026
  4. Ubuntu Server docs: firewalls, checked 4 Dec 2026
  5. Hostinger VPS hosting, checked 4 Dec 2026
  6. DigitalOcean Droplet pricing, checked 4 Dec 2026