Skip to main content

Guide ยท Hosting

Where to Run AI Agents and Apps Cheaply

We earn commissions when you shop through the links below.

Most AI apps are a front end, a thin backend, a database and some model calls. Each layer has a free or low-cost option if you pick deliberately. Here is when to use what, and what you give up. For the full walkthrough, read the cheap AI infrastructure stack or estimate your model bill with the LLM cost calculator.

Static sites and front ends

Your UI, docs or landing page. Free tiers usually cover a side project until it has real traffic.

Vercel

Use it for: Next.js and React apps where you want preview deploys on every push.

Tradeoff: Free tier is for personal use; team and commercial use moves you to a paid plan.

Cloudflare Pages

Use it for: Static or framework sites that should sit on a global edge network.

Tradeoff: Generous free tier; some Node-specific libraries need adapting to the Workers runtime.

Skills for this: Deploy frameworks on Cloudflare ยท Let an agent test Vercel deploys

Serverless APIs

A thin backend that answers requests and calls a model. Pay per use, scales to zero.

Cloudflare Workers

Use it for: Short request/response handlers, webhooks and model-call proxies.

Tradeoff: CPU time limits per request; long jobs and websockets need other pieces.

Vercel Functions

Use it for: API routes that live next to a Vercel front end.

Tradeoff: Execution time limits; costs grow with invocations and duration.

Skills for this: Build and debug Workers

Always-on servers

Agents with background loops, queues, websockets or a warm model server. Flat monthly pricing that does not jump with traffic.

Hetzner Cloud

Use it for: Lots of raw compute if you are happy with a bare-bones experience.

Tradeoff: Fewer managed extras and data center regions than the bigger clouds.

Skills for this: Provider-neutral DevOps playbook

Managed databases

Postgres for app data and vectors. Managed means backups and upgrades are someone else's job.

Supabase

Use it for: Postgres plus auth, storage and realtime in one dashboard.

Tradeoff: Free projects pause when inactive; you buy into its platform conventions.

Neon

Use it for: Serverless Postgres that scales to zero, with database branching for previews.

Tradeoff: Cold starts after idle; pay per use can be harder to predict.

App platforms

Push a repo, get a running service. Less control than a server, much less to maintain.

Render

Use it for: Web services, cron jobs and background workers from one repo.

Tradeoff: Free instances spin down when idle, so first requests are slow.

Railway

Use it for: Quick prototypes with a database attached in a couple of clicks.

Tradeoff: Usage-based billing; watch always-on services.

Fly.io

Use it for: Containers close to users in many regions.

Tradeoff: More moving parts (machines, volumes, regions) to understand.

Local models

Skip the per-token bill for dev, testing and private data by running open models yourself.

Ollama

Use it for: Running open-weight models on your own machine or a server.

Tradeoff: Needs real RAM or a GPU; smaller models trail frontier APIs on hard tasks.

Skills for this: Ollama stack setup ยท LLM response caching ยท LLM cost optimization