Where to host your web app: how to choose
By Flavio
Updated
Tagged: Web Platform
Compare static hosts, serverless platforms, PaaS options, and VPS providers using current prices, limits, database needs, and operational tradeoffs.
“Where should I host this?” is the question I get most after “which framework should I learn?”.
Your choice comes down to what you’re building and whether you need a database. Traffic and budget narrow it down from there, and once you know those four things, the list gets short.
Below you’ll find the prices and the tradeoffs that are harder to spot on the marketing pages. Hosting prices change all the time, so check them again before you sign up.
If you’re in a hurry, here’s the short version:
- Cloudflare for a static site like a blog, docs, or a landing page. It’s free, allows commercial use, and has no bandwidth bill.
- Netlify for a static site if you want a polished Git workflow and forms without server code. The free plan allows commercial use, though you need to watch the monthly credits.
- Railway or Render for a full-stack app you want to
git pushand forget. Expect around $5 to $7 a month. - AWS Amplify if you want hosting, managed Postgres, and auth on one free ($0 Basic) or flat $20/month plan without per-seat fees.
- Vercel for a Next.js 16 app, once you’ve read its free tier rules.
- A Hetzner or DigitalOcean VPS for a small Docker container and database on a budget. DigitalOcean starts at $4 a month. Hetzner’s cheapest plan costs about €6 a month with IPv4 and is only sold in Germany and Finland. Factor in your own time to manage it.
- Cloudflare Workers or Google Cloud Run for an API that needs to scale to zero.
- A PaaS when you never want to think about servers, knowing you’ll pay more for the convenience.
The four questions
Answer these four questions before you open a single pricing page.
What are you building?
This single answer rules out most of the options right away.
A static site is just HTML, CSS, JavaScript, and images, with no server code running on each request. Blogs, docs, portfolios, landing pages, and React apps that talk to an external API all fall into this bucket. Almost every host can serve one, often for free.
A full-stack app runs server code to handle requests, whether that’s server-side rendering, API routes, or sessions. Next.js, Astro in SSR mode, SvelteKit, Remix, Laravel, Rails, and Django all live here. You’ll need either a host that runs a long-lived process or a serverless platform that runs functions.
An API needs the same setup, just without the front end.
If you’ve packaged your app as a Docker container, you can pick a container host or install Docker on your own server.
A background worker or bot needs to keep running even when no HTTP requests are coming in. Think Discord bots, queue consumers, and scrapers. A permanent Discord gateway connection requires a continuously running process, while scheduled jobs and queue consumers can also run on serverless platforms as long as they stay within the execution limits.
Treat WordPress as its own category. It needs PHP, MySQL or MariaDB, and persistent storage for uploaded files, and you’re also on the hook for WordPress, plugin, and server updates, plus backups.
Do you need a database?
If you do, the easiest route is letting your app host manage it. Render, Fly.io, DigitalOcean, Heroku, and Laravel Cloud all sell managed Postgres alongside your app. AWS Amplify bundles managed Postgres, Better Auth, and a PostgREST Data API into the same monthly plan price (including its $0 Basic plan). Railway offers a Postgres template too, though it classifies it as unmanaged, which means you’re responsible for enabling backups, tuning, monitoring, and maintenance. Netlify Database gives you managed Postgres billed out of the same credits as your site.
You can also host the database on a separate service like Neon, Supabase, Turso, or PlanetScale. Your app lives on one host and the database on another. That works well with most app hosts, just check supported drivers, regions, networking, and connection pooling before you commit.
If you’re on a VPS, you can run Postgres on the same server and skip the separate database fee. It’ll share your server’s CPU, memory, and disk, and backups are on you.
I went deeper into this in Where to host a PostgreSQL database, and I compared ten Postgres and SQLite hosts with their free tiers and first paid step in where to run Postgres or SQLite for a side project. For now, just keep in mind that needing a database usually means a second hosting choice and a second bill.
How much traffic?
Most side projects get almost no traffic, so “just starting” is the honest answer for nearly every new project.
Free tiers all have limits, which I compared in every hosting provider’s free tier, side by side. Usage-based hosts can charge per request, per GB transferred, and per CPU second. An idle project can cost nothing on a static or scale-to-zero plan, while always-on services, managed databases, and VPS instances usually keep billing even when nobody visits.
What is your budget?
Most people land in one of four ranges: free, around $10, around $25, or whatever the project needs.
You can host static sites and small apps for free. Spending $5 to $10 a month gets you a small PaaS app or an entry-level VPS. Around $25 a month is enough for a small PaaS app paired with an entry-level managed database, depending on your traffic and resource usage.
The four kinds of hosting
Almost every hosting option falls into one of four buckets.
Static hosting and request-driven compute
Cloudflare Pages, Netlify, Vercel, and AWS Amplify build and serve static files straight from a CDN. For dynamic code, Cloudflare Workers, Netlify Functions, Vercel Functions, AWS Amplify, Deno Deploy, and Google Cloud Run all run your code on demand, each with its own runtime and billing model.
Your dynamic code runs inside managed instances or isolates that the platform can reuse across requests and shut down once traffic goes quiet. Cloud Run builds or accepts a container image, and it takes extra setup if you want static files served behind a CDN.
These platforms are a good fit for static sites, frameworks with supported adapters, and APIs with spiky traffic. The compute itself can scale down to zero, though plan fees, builds, storage, bandwidth, and other add-ons can still show up on your bill.
WebSocket support depends on the platform. Workers supports WebSockets, and Vercel Functions supports them in public beta. Deno Deploy supports them too, though it can evict an instance, and Cloud Run caps connections at 60 minutes, so clients need to reconnect.
Don’t count on the local filesystem for anything permanent. Workers gives you a virtual filesystem with request-local /tmp, and Vercel and Cloud Run only offer temporary writable storage. Any data you need to keep belongs in a database, object storage, or a mounted volume. If you’re connecting to a traditional database from serverless functions, you’ll likely need connection pooling or a serverless driver.
PaaS: platform as a service
Railway, Render, Fly.io, Heroku, DigitalOcean App Platform, and Laravel Cloud are all application platforms, though they don’t all work the same way under the hood.
You push your code or a container, and the platform handles the runtime, routing, logs, restarts, and TLS. Depending on the provider and how you configure it, your process either stays running or scales to zero when idle.
A PaaS works well for most full-stack apps, APIs, workers, and bots. Before you pick one, check its rules on filesystem persistence, ports, request limits, Docker support, and background processes.
You’ll usually get more raw CPU and memory per dollar from a VPS, but a PaaS bundles deployment, routing, TLS, logs, and automatic restarts into the price. When you compare prices, factor in all the setup and maintenance you don’t have to do yourself.
VPS: your own server
Common VPS providers include Hetzner, DigitalOcean Droplets, Akamai Cloud (formerly Linode), Vultr, OVHcloud, Netcup, Contabo, and AWS Lightsail.
You rent a Linux virtual machine and set it up yourself: Docker, a reverse proxy, your app, and the database. Backups, updates, and monitoring are on you too.
Most plans have a predictable monthly price or cap, and you get full control over the machine. Watch out for extras like IPv4 addresses, storage, backups, transfer overages, and taxes. One nice perk is that you can run several small Docker projects on the same box as long as the CPU architecture and resources hold up.
The tradeoff is that you become the ops team. If Postgres fills the disk at 3 AM, nobody else is going to fix it.
I have a free Linux Server Handbook that takes you from creating a server to hardening it and running an app behind HTTPS. I also wrote how to secure a VPS with Tailscale and Cloudflare Tunnel, and you can see the port scans of a cloud firewall, Tailscale, and a tunnel on the same Droplet in Tailscale vs Cloudflare Tunnel vs a cloud firewall. For the November 2026 Linux TCP bug, the kernel check and closed-port layout are in CVE-2026-98432, and moving that Droplet from Ubuntu to Debian has a separate walkthrough.
The big clouds
The big three are AWS, Google Cloud, and Azure. They offer almost every kind of infrastructure, usually behind a price sheet with forty rows.
They make sense if your team has compliance requirements, cloud credits to burn, or needs a specific service nobody else offers.
For a solo project, I prefer the pieces that stay simple on their own: Google Cloud Run for containers, AWS Amplify for flat-rate web apps with Postgres and auth, AWS Lightsail as a plain VPS, and S3 or R2 for file storage.
What the pricing page doesn’t say
Most hosting catches live in the fine print. It took me years to learn which lines matter.
Vercel’s Hobby plan only covers personal, non-commercial projects. Commercial projects need Pro, starting at $20 a month for one deploying seat, with extra charges once you go past the included credit and allowances.
Netlify allows commercial projects on its Free plan. The fine print there is the credit system. Every plan gets a monthly pool of credits, and production deploys, bandwidth, requests, and Functions compute all drain the same pool.
The Free plan gives you 300 credits a month. A production deploy costs 15 credits, so 300 credits gets you 20 deploys and nothing else. Bandwidth costs 20 credits per GB, which makes the same 300 credits equal to 15 GB of traffic. Requests are cheap at 2 credits per 10,000, and deploy previews, branch deploys, rollbacks, and form submissions cost nothing.
When the pool is empty, every project on the account shows a “Site not available” page until the next billing cycle. On Free you can’t buy more credits. Personal costs $9 a month for 1,000 credits, and Pro is $20 for 3,000 credits with unlimited team members. Both paid plans can top up, at $5 per 500 credits on Personal and $10 per 1,500 on Pro.
Watch out for usage-based billing on Vercel Pro and Cloud Run, which both charge beyond their included allowances. Set up budget alerts on day one. If a provider supports a hard cap or automatic project pause, turn it on, because an alert alone won’t stop the bill from climbing. Railway and Laravel Cloud let you set a hard usage limit that stops your services, and Cloud Run offers spend caps in preview.
Always check the data transfer terms too. New Vercel Pro teams get Flat Rate CDN by default since September 2026, which includes 1 TB of data transfer and 1 million CDN requests a month for a fixed bill. Spikes above that are served and not billed under Vercel’s fair use rules, while sustained traffic pushes you to a higher tier. Teams still on usage-based billing get 1 TB of Fast Data Transfer and 10 million Edge Requests, then pay regional on-demand rates. Cloudflare Pages static assets and Workers have no egress charge.
Hetzner Cloud servers in Europe include at least 20 TB of outgoing traffic. US and Singapore allowances are lower, and IPv4 is billed separately. For a media-heavy site, that alone can decide the winner.
Hetzner also raised its Cloud prices on June 15, 2026. The cheapest plan, the CX23, went from €3.99 to €5.49 a month before VAT and IPv4, and it’s sold only in Germany and Finland. The US and Singapore plans now start at €15 to €17. Guides quoting €4 Hetzner servers are out of date.
Managed Postgres is billed separately on Render, Fly.io, DigitalOcean, Heroku, and Laravel Cloud. AWS Amplify is an exception: its Basic ($0), Pro ($20), and Pro Plus ($45) plans bundle managed Postgres, auth, and a Data API into the same flat price, with no per-seat fees. Railway Postgres draws from the same metered project resources as your app, though it’s still an unmanaged database template. On a VPS, Postgres has no separate service fee, though it still uses your server resources and backup storage.
Stopping a server doesn’t always stop its invoice. Vultr, AWS Lightsail, Hetzner, DigitalOcean, and Akamai continue billing stopped instances. Delete the instance to stop its compute charge, then check for separately billed disks, IPs, and snapshots.
Some sticker prices leave out part of the cost. Scaleway bills flexible IPv4 separately at about €0.005 per hour, or roughly €3.65 a month. Hetzner bills Primary IPv4 separately at €0.50 per month, excluding VAT. Netcup sells VPS plans on a discounted 12-month term or with hourly billing and no minimum term.
Cloudflare Workers isn’t a normal Node.js server process, though nodejs_compat supports many Node APIs. Its virtual filesystem can read bundled files and write request-local files under /tmp. Packages that need unsupported APIs or native binaries may still fail.
Deno Deploy supports both Deno and Node applications, including npm dependencies, subprocesses, FFI, native addons, and filesystem operations. Instances are still disposable, so persistent data belongs elsewhere. Its Free plan includes 1 million requests, 20 GiB of egress, and 10 hours of active CPU a month, and Pro costs $20 a month. If you want to keep Deno for local builds while running the app on Workers, see Moving a Deno app to Cloudflare Workers.
Heroku removed its free tier in 2022. Fly.io brought back its Free plan in November 2026: new accounts get $1 for seven days without a card, or $5 of usage a month on a personal organization once you add a card (up to 3 Machines, 3 Sprites, 5 GB volumes, and one $4 Developer Managed Postgres cluster). Watch that threshold, though: crossing $5 moves you to Pay As You Go and bills the whole month from $0. Hetzner doesn’t have a permanent free tier, though promotions sometimes offer credits.
AWS relaunched Amplify at the end of November 2026 with a permanent $0 Basic plan (no card required via social sign-up, up to 25 apps, 2 Postgres backends, 100 GB transfer, 1 million CDN requests, and 5 vCPU-hours shared between builds and SSR). Basic hard-pauses when you hit an allowance and pauses backends after 7 idle days, while Pro ($20/month flat, no per-seat fees) and Pro Plus ($45) keep overages off by default and let you cap them if you turn them on. Keep in mind that external AWS services you attach (like Route 53, S3, Bedrock, and CloudWatch Logs past 5 GB a month) still bill separately.
My picks by project type
Which host makes sense depends on what you’re building and what you want to spend.
Static site
For a free static site, go with Cloudflare. Pages allows commercial projects and doesn’t meter static requests or bandwidth, though the Free plan still limits builds, projects, file counts, and individual asset sizes.
Stick with Cloudflare for paid static projects too. Many stay free within those limits, and you only start paying once you need paid account features, extra build capacity, or R2 storage and operations.
Netlify is the other strong choice for a static site. Connect the repo and every push builds, every pull request gets its own preview URL, and forms work without server code. The Free plan allows commercial use.
Count the credits before you commit, though. Twenty production deploys eat the whole Free allowance, so a site that deploys every day needs Personal at $9 a month. A media-heavy site burns through the 15 GB of bandwidth even faster.
Full-stack app, Node or similar
For free hosting, use Cloudflare Workers when your framework has an adapter and its dependencies work with the Workers runtime. Workers Free includes 100,000 dynamic requests per UTC day and 10 milliseconds of CPU per invocation, with free and unlimited static-asset requests. Workers Paid costs $5 a month for 10 million requests and 30 million CPU milliseconds.
If your project is personal and non-commercial, Vercel Hobby is also an option. Railway has a Free plan too, with $1 of usage a month for one small service.
AWS Amplify Basic is another $0 option that allows commercial projects and includes 2 managed Postgres + Better Auth backends, 100 GB of transfer, and 5 vCPU-hours shared across builds and SSR (with hard pauses at limits and a 7-day idle pause on backends). Stepping up to Pro costs a flat $20 a month for your whole team with 10 GB of Postgres and 1 TB of transfer.
Netlify Free can host a commercial full-stack app, supporting Astro, Next.js, Nuxt, and the other common frameworks. Your server code runs as Netlify Functions at 10 credits per GB-hour. A function gets 1 GB of memory by default, so one hour of total function time costs 10 credits, and traffic, deploys, and requests all come out of the same 300-credit pool.
With a $5 to $10 budget, go with Railway or Render. Railway Hobby costs $5 a month and includes $5 of usage, while Render offers a $7 Starter service. Both give you Git-connected deploys, logs, and Postgres you can add to the project, though keep in mind that Railway’s database template is unmanaged.
Netlify Personal at $9 fits this budget too if your app is static files plus functions rather than a long-running process. You get 1,000 credits and the option to top up.
On Render, pairing the $7 Starter service with the smallest paid Postgres plan ($6) puts a small app with a managed database at around $13 a month. Railway meters both app and database resources by usage, so the total isn’t fixed. For a commercial Next.js project, Vercel Pro starts at $20 a month before extra usage.
API with a database
Always price the app and the database together, since most platforms bill them as two separate services.
Putting Postgres on the same small VPS avoids a separate managed-database bill. DigitalOcean Basic Droplets start at $4 a month, and the 1 GiB plan costs $6. Hetzner’s CX23 is €5.49 a month plus €0.50 for IPv4 before VAT, available only in Germany and Finland. You handle the backups yourself.
For an easy setup, go with Railway. Hobby has a $5 monthly minimum that includes $5 of usage. Your app and Postgres share metered CPU, memory, storage, and network resources, so the final bill depends on what you use.
If you want scale-to-zero, pair Cloudflare Workers with D1 or Cloud Run with Neon. Workers and D1 both use serverless, usage-based models, while pairing Cloud Run with an external database keeps your data available even when the container scales to zero.
Docker container
Railway, Render, Fly.io, Heroku, DigitalOcean App Platform, and Cloud Run can all run Docker-based applications. Netlify doesn’t run containers; it builds from your repo and deploys static files plus functions.
Choose based on how much server work you want to do. An entry-level VPS can run a small Docker app with Caddy for roughly €5 to €7 a month before VAT. Check the CPU architecture, memory, disk, transfer, IPv4 price, and backup needs first, and persist Caddy’s /data directory so TLS certificates survive container replacement.
A PaaS runs the same container while handling restarts and TLS for you, with the price depending on the provider, resources, and whether the service stays active.
If you want to go the VPS route, I have a free Docker Handbook and the free Linux Server Handbook (which covers Caddy and Nginx).
Background worker or bot
A Discord bot that holds open a permanent gateway connection needs an always-running process. Use Railway with Serverless disabled, a paid Render worker, a Fly.io worker process, Heroku Basic, a DigitalOcean App Platform worker, or a VPS. Netlify Functions run per request, on a schedule, or as background jobs capped at 15 minutes, so they don’t fit a bot that has to stay connected.
If a script just runs every hour and exits, compare a scheduled function or job against an always-on worker. Scheduled execution is often cheaper, though duration, memory, and plan limits decide the real cost.
WordPress
A VPS is cheap, but you have to manage the web server, PHP, MySQL or MariaDB, uploaded files, updates, and backups yourself. If you don’t want that maintenance, pay for managed WordPress hosting. If the site is a blog and you’d rather move off WordPress altogether, EmDash runs it on Cloudflare. You can follow the checklist in migrating a WordPress blog to EmDash.
Laravel
Laravel Cloud is built specifically for Laravel. Its Starter plan costs $5 a month plus usage, includes $5 in monthly usage credit, and gives you the first month free. Compute can scale to zero, and you can set a hard spending limit.
A VPS with Forge works well too. Forge manages deployments, queues, and scheduled jobs, though you still pay for and maintain the server and data services.
How I host my own things
This blog is a static Astro 7 site on Cloudflare Pages, with about 2,000 posts and more than 3,000 tracked image files. It ran on Netlify for years, and the Git-push workflow was never the problem. I moved it in June 2026 to keep everything on Cloudflare, which already handled my DNS and Turnstile, and because Pages doesn’t meter static requests or bandwidth. For a new project I’d start on Workers instead. I wrote Cloudflare Pages vs Workers about that choice.
The site is mostly static, with five Pages Functions handling purchases, course access, newsletter signup, sponsor inquiries, and the AI-assisted app idea tool. I explained the platform in Cloudflare Workers and my complete Cloudflare guide.
I also built a full-stack Astro app with auth, a database, and a paid plan. It runs on Cloudflare Workers with D1 as the database. I wrote about the pieces in Astro SSR with D1 and Drizzle ORM and Better Auth in Astro on Cloudflare Workers. Both services come with generous included usage, though the final cost depends on requests, CPU time, database rows, and storage.
My analytics runs on a self-hosted Plausible instance on a VPS. I pay a flat price without per-pageview billing, and I own the data. Updates and backups are on me. The full setup is in How to self-host Plausible Analytics.
I’ve used Railway for Astro apps with Postgres and Fly.io for Astro apps. I reach for Railway when I want a Git-connected deployment and a database in the same project. See Deploying an Astro + PostgreSQL app on Railway for that setup.
I don’t run Kubernetes for side projects, and I avoid AWS whenever a simpler host can do the same job.
How to make the final choice
For a static site, start with Cloudflare since Pages doesn’t meter static requests or bandwidth. Go with Netlify if you want its forms and build workflow, just watch how your monthly deploys add up against its credits.
If your app needs a server process and you want less ops work, compare a PaaS against a VPS with the database cost included, and check whether the service sleeps. Entry-level VPS plans start around $4 to $7 a month before VAT and work well on a tight budget or for several small projects, though you pay with your time. For spiky traffic and compatible code, Workers or Cloud Run use usage-based billing and can scale idle HTTP services to zero.
Before you deploy, check the free tier terms, set up budget alerts, and turn on a hard cap or automatic pause if the provider offers one.
I built my hosting picker around these four questions. Answer them and it shows the hosts that fit, along with the price and the catch for each.
Want me to talk about your product? You can sponsor this site.
Related posts about platform: