Where to Deploy AI-Built Apps: Your Own Server, Netlify or Cloudflare

For most AI-built apps, Cloudflare Pages vs Netlify comes down to forms and cost. Pick Netlify if you want built-in forms with no code. Pick Cloudflare if your DNS is already there or you want the lowest running cost. Use your own server only when the app needs a long-running process or full control of the machine.

We use all three. Our own website runs on Cloudflare Workers with static assets, we use Netlify on other projects, and we still put certain workloads on a virtual private server (VPS).

What actually decides the answer:

  • Static or dynamic
  • How server-side code runs
  • Where data lives
  • How forms work
  • Cost
  • How hard it is to leave

Cloudflare Pages or Workers: which one?

Cloudflare has two overlapping products. Pages started as a static site host with add-on functions. Workers started as a serverless code platform and now serves static assets directly as well.

Cloudflare publishes a guide for migrating from Pages to Workers and notes that Workers has a broader feature set.

Our take: Pages still works well for static sites, but for a new project that needs server-side code, we start on Workers with static assets. Below, "Cloudflare" means either, and we call out differences where they matter.

Is your app static or dynamic?

A static site is a set of files (HTML, CSS, JavaScript, images) that are the same for every visitor. Marketing sites, documentation and many dashboards that load data in the browser are static.

Any of the three options hosts static sites well, and both Cloudflare and Netlify do it on generous free tiers.

A dynamic app runs code on a server for each request: it checks a login, reads a database, calls an API with a secret key, or processes a form. This is where the options split.

Most apps built with AI tools are mostly static with a few dynamic pieces: a contact form, an API call that must hide a key, a small database. Serverless functions handle that pattern well.

How do serverless functions compare?

Serverless functions are small pieces of code that run on demand. The platform runs your code when a request arrives and bills by usage, and you never manage a server.

  • Cloudflare Workers run on Cloudflare's network in many locations, start very quickly and are well suited to request handling, APIs and form processing. They use a JavaScript runtime based on web standards rather than full Node.js, though Node.js compatibility has improved. Pages has Pages Functions, which are built on Workers.
  • Netlify Functions run your code in a Node.js-style serverless environment, with Edge Functions available for code that should run closer to visitors. Background and scheduled functions cover longer jobs and timed tasks.
  • A VPS runs whatever you install: a long-running Node.js or Python app, background workers, cron jobs, anything. No platform limits on execution time or runtime, but you run it.

A VPS is often simpler if your app needs any of these:

  • A long-running process
  • Websockets on your own terms
  • Heavy computation
  • Software that expects a normal Linux machine

For request-and-response work, serverless is easier to operate.

Where should the database live?

Data is where lock-in starts.

  • Cloudflare offers D1 (a SQL database based on SQLite), KV (a key-value store), R2 (object storage for files) and other services, all reachable from a Worker through bindings. Our contact form saves each submission to a D1 database before emailing it.
  • Netlify offers Netlify Blobs for storage and Netlify Database, a managed serverless Postgres database built into the platform on credit-based plans. Netlify also connects easily to outside databases such as Supabase or Neon directly.
  • On a VPS you can install Postgres or MySQL yourself, which gives full control and full responsibility for backups, updates and security.

For many small apps, a hosted database from a separate provider, reached from your functions, is the most portable choice. You can change hosts later without moving the data.

How does each one handle forms?

Differently, and forms are usually the first dynamic need.

  • Netlify Forms is built in. Add a data-netlify="true" attribute to an HTML form and Netlify detects it at deploy time, collects submissions and shows them in the dashboard, with notification options and spam filtering. It is the fastest path for a simple form.
  • Cloudflare has no built-in form product, so you write a small Worker to receive the submission. More setup, full control. Ours stores submissions in D1, sends the notification through Cloudflare Email Routing in the background so the visitor gets an instant response, and blocks spam with Turnstile, a honeypot field, a timing check and a rate limit. Our guide to Cloudflare Turnstile covers the spam side in detail.
  • On a VPS, the form posts to your own application code, and you handle storage, email delivery and spam yourself.

What does each option cost?

Pricing on all three changes, so treat this as a shape rather than a quote and check current pricing before committing.

  • Cloudflare Workers has a free plan with a daily request allowance, and a paid plan with a low monthly minimum (Cloudflare lists it at $5 per account at the time of writing) that includes a large monthly request allowance. Cloudflare's Workers pricing page states that requests to static assets are free and unlimited, which makes it very inexpensive for mostly static sites.
  • Netlify moved new accounts to credit-based plans in 2025. A free plan includes a monthly credit allowance, and paid plans add more. Production deploys, function compute, bandwidth and web requests all draw on credits, while preview deploys and form submissions do not. Small sites usually fit comfortably, but frequent production deploys or heavy traffic can use credits faster than people expect.
  • A VPS is a fixed monthly fee for a set amount of CPU, memory and disk, typically starting at a few dollars a month from providers such as DigitalOcean, Hetzner, Akamai (Linode) or AWS Lightsail. The bill is predictable, but your time maintaining it is the real cost.

How much lock-in comes with each?

Every option has some.

  • Cloudflare Workers code that uses D1, KV, R2 and other bindings is tied to Cloudflare. Plain web-standard request handling ports more easily.
  • Netlify Forms, Netlify-specific function configuration and Blobs are tied to Netlify. A Netlify Database is standard Postgres, which helps.
  • A VPS has the least platform lock-in. A standard Linux app can move to another provider with little change.

If you only do one thing, keep business logic separate from platform-specific code and keep your data in a format and service you can export. Those two habits reduce lock-in wherever you host.

Tools shut down too. Google is closing Firebase Studio on March 22, 2027, and anything left in a workspace is deleted, which is a good reminder to keep your code in a repository you control. We wrote up what to do before the Firebase Studio shutdown.

Who handles operations and security?

On Cloudflare and Netlify, the platform does: servers, operating system patches, TLS certificates, scaling and much of the DDoS protection. Both offer preview deployments so you can review a change before it goes live. We also run a separate staging deployment that sends a noindex header until launch.

On a VPS, all of that is yours: firewall, updates, certificates, backups, monitoring and recovery. Fine for a team with the skills and time. For an executive shipping internal tools, it is usually the wrong trade. Our guide to Claude Code for executives covers staging, secrets and review in more detail.

Side by side

VPS Netlify Cloudflare (Workers/Pages)
Static sites Yes, you configure Excellent Excellent
Server-side code Anything Functions, edge functions Workers, Pages Functions
Database Install your own Netlify Database (Postgres), Blobs, or external D1, KV, R2, or external
Forms Build your own Built in Build with a Worker
Cost shape Fixed monthly Credits by usage Free tier, low paid minimum
Maintenance You Platform Platform
Lock-in Lowest Moderate Moderate

Which should you choose?

  1. Is the app static, or static with a contact form? Use Netlify if you want built-in forms with no code. Use Cloudflare if your DNS is already there or you want the lowest running cost.
  2. Does it need a few API endpoints, a small database or scheduled jobs? Either platform works. Cloudflare Workers is strong for fast, inexpensive request handling with D1; Netlify is strong if your framework and workflow already fit it.
  3. Does it need a long-running process, specialized software or full control of the machine? Use a VPS, and budget time for maintenance.
  4. Will it hold sensitive or regulated data? Decide where the data lives first, then choose hosting around it, and get a security review.

Our take: when in doubt, start on a managed platform. Moving to a VPS later is easier than living with an unmaintained server.

Where do we help?

We move websites and apps between hosts, set up DNS, staging and deployment pipelines, and build the forms and functions behind them. See our website hosting and migration service for how we plan a move without downtime.

Frequently asked questions

Cloudflare Pages vs Netlify: which is better for a static site?

Both are excellent for static sites. Netlify has a polished workflow and built-in forms. Cloudflare serves static assets free and without request limits on Workers, and fits well if your DNS is already on Cloudflare. For most small sites, either is a sound choice.

Should I use Cloudflare Pages or Workers for a new project?

For a purely static site, Pages is fine. For anything with server-side code, we start on Workers with static assets, since Cloudflare publishes a migration path from Pages to Workers and Workers has the broader feature set.

Is a VPS cheaper than Netlify or Cloudflare?

The monthly bill can be low and predictable, but you take on updates, security, backups and monitoring. For small apps, managed platforms are often free or close to it, which makes them cheaper once you count your time.

Can I move my app later if I change my mind?

Yes, especially if you keep business logic separate from platform-specific features and keep your data in an exportable service. Apps that rely heavily on one platform's forms, storage or database bindings take more work to move.

Where should I store data for an AI-built app?

For small apps, use the platform database (Cloudflare D1 or Netlify Database) if you plan to stay, or a separate hosted Postgres provider if portability matters more. Avoid storing important data only in files on a single server without backups.