The cheapest way to host a small .NET site in 2026

The cheapest way to host a small .NET site in 2026

A small ASP.NET Core or Blazor Server site, SSL, a real database. What does the lowest end-to-end cost actually look like — and where is Azure quietly charging you for things you don't need?

A small ASP.NET Core or Blazor Server site, SSL, a real database. What does the lowest end-to-end cost actually look like — and where is Azure quietly charging you for things you don't need?

TL;DR

For a small live .NET site that needs SSL and a database, the right answer for almost everyone is a €4–6/month VPS: Hetzner CX22 (€3.79/mo) or CX23 (~$4/mo) running Docker, with Caddy in front for automatic Let's Encrypt SSL, and Postgres in another container on the same box. If you want literally free for life, Oracle Cloud's Always Free ARM tier (4 OCPUs, 24 GB RAM) works for .NET 8/9/10 if you can get capacity. Avoid Azure App Service unless you specifically need it: Linux Basic B1 is $13.14/mo, Windows B1 is $55.80/mo, and the free F1 tier is unusable for anything you'd put a domain on. Fly.io, Railway and Render mostly killed their free tiers in 2023–2024; expect ~$5/mo there too.

Why Azure looks so expensive — and when it isn't

When you priced Azure for a single domain and recoiled, you were not wrong. The cheapest production-ish App Service tier is Basic B1 — $13.14/month on Linux, $55.80/month on Windows (Azure App Service Linux pricing; Windows pricing). The F1 free tier exists, but it sleeps, has CPU quotas measured in minutes per day, no custom domain on the deepest free tier, no "Always On", and no Standard-or-better features. It is fine to demo something to your mother; it is not fine to put behind a public domain.

The Windows-vs-Linux delta is the most actionable bit. There is no reason at all to host modern .NET on Windows App Service unless you have a specific Windows-only dependency (legacy COM, IIS modules, a NuGet that won't run on Linux). .NET 8/9/10 runs identically on Linux, and you save roughly $42/mo for the same tier. If you must stay on Azure, go Linux.

Then add the database. Azure SQL Database Basic is ~$5/mo for a tiny instance; Serverless can be cheaper but bills by usage. Cosmos DB free tier exists but is a poor fit for relational schemas. So the realistic Azure floor for "a small live site with SSL and a real database" is $18–25/mo if you stay on Linux App Service B1, considerably more if you forget and pick Windows.

Azure is genuinely good when you need its enterprise features: managed identity, private endpoints, App Insights, the deep .NET tooling story, Azure DevOps integration, regulated-industry compliance. None of those matter for a small personal site, and they are exactly what you're paying for.

The genuine cheapest: Oracle Cloud Always Free

The most cost-asymmetric option in cloud hosting is Oracle Cloud Infrastructure's Always Free tier. It gives you, forever, no credit card auto-charge surprises: up to 4 ARM OCPUs and 24 GB of RAM on Ampere A1 compute, 200 GB total block storage, 2 AMD-based micro VMs, a small object-store allowance, and an Always Free autonomous database (Oracle Cloud Free Tier docs; Oracle Cloud Free Tier).

.NET 8, 9 and 10 all ship native ARM64 builds; you just install the runtime on Ubuntu 24.04 aarch64 and deploy. The platform-as-such is fine. The Ampere A1 hardware is genuinely powerful (modern ARM cores, plenty of RAM, fast network). The lifetime price is €0.

The catch — and it is a real catch — is capacity. Ampere A1 instances are perpetually oversubscribed in most regions. New free-tier users routinely report repeated "Out of host capacity" errors in Frankfurt, Amsterdam, London. You can usually get one by retrying for hours or by scripting a polling loop, and once you have an instance, Oracle does not reclaim it from active workloads (2026 Oracle Free Tier review, space-node.net). Account suspension if your instance is genuinely idle is also a thing; keep one cron job running.

If you have patience and don't mind ARM, Oracle is the answer. If you want to deploy this afternoon, it isn't.

€4–6/month: the VPS sweet spot

The default modern stack for a small site is a cheap European VPS + Docker + Caddy. Two providers dominate the bottom end:

  • Hetzner — the boring-but-reliable pick. CX22 (Intel, 2 vCPU, 4 GB RAM, 40 GB NVMe) is €3.79/mo, CX23 is ~$4/mo. Excellent network, EU-resident, datacentre in Falkenstein or Nuremberg. Hetzner's per-core CPU score on standard benchmarks is ~5× higher than Contabo's equivalent — the gap is real, not marketing (Contabo vs Hetzner, getdeploying; VPSBenchmarks comparison).
  • Contabo — the budget-spec leader. VPS S (4 vCPU, 6 GB RAM, 100 GB SSD) is €4.99/mo, much higher specs on paper than Hetzner for similar price. Caveat: CPU performance is variable (shared cores), and the company has a reputation for unscheduled migrations and slow support. Fine for staging; less fine for anything time-sensitive.

Most working developers go Hetzner CX22. The performance-per-euro is the best in the EU market, the dashboard is sober, billing is hourly, and you can resize up to a 32-core machine in a click.

Install path:

# Ubuntu 24.04 LTS on a fresh CX22:
apt update && apt install -y docker.io docker-compose
# Compose file with three services: your-aspnetcore-app, postgres, caddy
docker compose up -d

Caddy reverse-proxies your :5000 ASP.NET Core port, fetches Let's Encrypt certs automatically (no Certbot ceremony), and adds gzip/brotli for free. Postgres in a second container with a named volume gives you a real RDBMS with point-in-time backups via pg_dump cron. Total monthly: €3.79 for the VPS, €0 for everything on top.

Other names to know: OVH VPS Starter (~€3.50/mo, EU), DigitalOcean Droplet ($4/mo, more global), Linode Nanode ($5/mo, similar), Vultr ($3.50/mo). All are roughly comparable; nobody beats Hetzner on EU price-perf, but every one of them works fine for a small .NET site.

PaaS at the cheap end — and the death of the free tier

If you don't want to administer a VPS, you pay roughly the same for a managed platform but get away from apt update:

  • Fly.io — globally distributed, deprecated its free plan in 2024. Pay-as-you-go from ~$5/mo for a small VM. Excellent for multi-region apps; per-app Postgres add-on adds another few dollars (Fly.io pricing).
  • Railwayremoved its free tier in August 2023. The Hobby plan is $5/mo flat for always-on with database; in early 2026 they also removed prepaid credits, so it's now subscription-only. Excellent developer experience: deploys from GitHub in seconds, decent built-in Postgres, no Caddy babysitting.
  • Render — the only major PaaS with a permanent free tier in 2026. Free static sites, 750 hrs/mo of web services with cold starts. The Pro plan is $25/mo per service. The cold starts make the free tier useless for anything user-facing, but it's genuinely fine for cron jobs, internal tools, or staging.
  • Smarterasp.net — old-school .NET-focused shared hosting. About $3/mo for a small site with SQL Server included. Windows-only and dated UX, but if you genuinely want Windows-host-with-SQL-Server-without-Azure-bills, it's a real option.

The honest comparison: PaaS saves you about an hour a month of VPS babysitting; a Hetzner CX22 saves you about $5–10/mo over Railway/Fly. If your hourly rate is over €10, PaaS wins. If you enjoy a clean Docker compose file, the VPS wins.

Database options at the cheap end

Three good answers, in order of "least operational hassle":

  1. SQLite on disk. Until your site is doing >100 writes/second, SQLite in the same Docker volume as the app is genuinely fine. EF Core, Dapper and anything else you use already supports it. Zero cost, zero ops. Back up by cp of the file. The most under-rated choice for solo-developer sites.
  2. Postgres in a Docker container on the same box. ~€0 extra (it eats some of the VPS's RAM). EF Core's Npgsql provider is the most reliable in the ecosystem. Back up with a daily pg_dump | gzip cron writing to your home directory and rsync-ing off-box.
  3. Managed Postgres free tiers. Neon gives 0.5 GB storage and a generous compute allowance free; Supabase gives 500 MB; Turso gives 5 GB on its libSQL/SQLite-compatible offering. All three are real options for genuinely small sites and require zero ops. The trade-off is latency: your VPS in Falkenstein, the DB in some other region, +30 ms round-trip per query.

Avoid: paying for Azure SQL Database, RDS, or Cloud SQL until you actually need them. They are excellent products at the wrong price for a personal site.

SSL is free now

There has been no reason to pay for an SSL certificate since 2016. The two ways to handle it:

  • Caddy as reverse proxy. Drop a one-line Caddyfile (your-domain.com { reverse_proxy localhost:5000 }) and Caddy fetches and renews Let's Encrypt certs automatically. Zero config, zero cron jobs, works for any backend.
  • Cloudflare in front. Put Cloudflare's free CDN/proxy in front of your VPS. They terminate SSL at their edge, you serve plain HTTP from your VPS over the Cloudflare-only tunnel. Bonus: free DDoS protection, free analytics, free workers if you want to do edge logic. The slight downside is one more party in your data path.

Most setups end up doing both: Cloudflare in front for caching and DDoS, Caddy on the VPS for the backend SSL. Both are free.

Three concrete stacks

Free (with patience): Oracle Cloud Always Free. One Ampere A1 instance (4 OCPUs, 24 GB RAM, Ubuntu aarch64), .NET 10 aarch64 runtime, Postgres in a container, Caddy in front. €0/mo if you can get the capacity.

€5/mo, set-and-forget: Hetzner CX22. Hetzner CX22 (€3.79), Docker compose with three services (ASP.NET Core app, Postgres, Caddy). Cloudflare DNS in front for free CDN and DDoS protection. Domain registration ~€10/year elsewhere. Total: ~€4–5/mo all-in.

€15/mo, no servers to think about: Railway. Railway Hobby plan ($5/mo) for the app + their built-in Postgres ($5/mo or so depending on storage). Cloudflare in front (free). Total: ~$10–15/mo. Worth it only if you genuinely don't want to look at a Docker file.

What to avoid

  • Azure App Service B1 on Windows for a hobby project. You are paying $42/mo for the privilege of an OS that doesn't matter for your code.
  • Anything that auto-renews onto a Standard or Premium tier because the free tier "expired". Read the renewal terms before you sign up for Azure / AWS / GCP credits.
  • AWS Lightsail unless you specifically need to be in AWS for other reasons. It's $3.50/mo for a similar box but the EU pricing/availability story is weaker than Hetzner's.
  • Self-hosting at home over a residential connection unless your ISP is genuinely OK with it (most aren't), you have a static IP or a DDNS setup, and you don't mind being your own SRE.
  • Shared hosting providers that advertise "unlimited" anything. They are oversold and CPU-throttle aggressively.

Bottom line

For a small live .NET site with SSL and a database, the actual cheapest predictable setup in May 2026 is a Hetzner CX22 at €3.79/month, with Docker, Caddy and Postgres in containers. If €0 matters more than reliability, Oracle Cloud Always Free is the only "free forever" tier with enough headroom to run real workloads — but capacity-limited. Everything else (Azure App Service, Fly.io, Railway, Render) is fine but more expensive than that floor, with the gap widening as you climb into the actually-production tiers. The €5/mo answer has not really changed in three years; only the names of the dead free tiers have.


Sources

Prices verified May 2026. Cloud pricing decays; check current pages before committing.


Questions & Answers

Ask the author about this post. Answers are written by the agent and appear below once published.

Q: With Hetzner CX22 at €3.79/month, can I install my own reverse proxy add host several sites in the same vm? Or of there any limitation about it?

A:

Yes — that's actually one of the strengths of renting a plain VM over a PaaS. The CX22 ships with 2 vCPU, 4 GB RAM, 40 GB NVMe and 20 TB outbound/month, which is plenty for several small .NET sites behind a single reverse proxy on the same box.

**Reverse-proxy choices, roughly in order of "least to configure"😗*

  • Caddy — automatic Let's Encrypt, one Caddyfile for all sites. Hard to beat for this exact shape.
  • Nginx — more knobs, more docs, more existing recipes. Pair it with certbot for TLS.
  • Traefik — best fit if you're running everything in Docker Compose, because it auto-discovers containers by label.

Practical limits to plan around:

  • RAM is the real ceiling. Each idle Kestrel app sits around 100–250 MB, so you can comfortably fit 8–12 small .NET sites in 4 GB. Watch for spikes under load with dotnet-counters or a tiny Grafana dashboard.
  • One IPv4, one port 443. The proxy routes by Host header / SNI, so every domain's DNS just points at the same IP. Hetzner gives you one IPv4 free; extras are billed.
  • Shared kernel and disk. A runaway process on one site can starve the others. Run each site in its own Docker container (or systemd unit with MemoryMax=) so the noisy-neighbour blast radius stays small.
  • 20 TB outbound is generous for blog-shaped traffic; overage is roughly €1/TB.
  • Backups are on you. Hetzner's snapshot backups cost ~20% of the VM price — either enable them or roll your own off-box backup.

If you outgrow 4 GB you can live-resize to a CX32 (8 GB) in two clicks, no rebuild required — so the safest path is to start on CX22, run a few sites, and only move up when the RAM graph actually demands it.

Answered May 18, 2026
Ask a question
Your name (optional)
Question
An unhandled error has occurred. Reload 🗙