HomeProjectsBlogContact

How to Deploy a Full Stack App for Free: Frontend, API and Database

You can put a real full stack app online without a credit card. Here is how to split frontend, backend and database across free tiers, plus the traps that catch people later.

How to Deploy a Full Stack App for Free: Frontend, API and Database

Building the app is half the job. The other half is getting it onto the internet, and for side projects, student work and early prototypes you want that to cost exactly nothing. The good news: you can deploy a full stack app for free today. The catch: no single platform gives you everything, so you need to pick the right free tier for each layer.

This guide is about the approach, which stays useful even as individual providers change their limits.

Think in three layers

Almost every web app breaks down the same way:

  1. Frontend: HTML, CSS, JavaScript. Static files, or a framework like React, Vue, Svelte or Next.js.
  2. Backend / API: the server code that handles auth, business logic and talks to the database.
  3. Database: where your data actually lives.

Free platforms are usually great at one or two of these. Mixing providers is normal and perfectly professional.

Layer 1: frontend hosting (the easy part)

Static and framework frontends are the most generously supported thing on the internet. Good free options include:

  • Vercel: excellent for Next.js and most modern frameworks, with automatic preview deployments for every pull request. Read the terms: the free Hobby plan is meant for personal, non-commercial use.
  • Netlify: very similar workflow, great for static sites, forms and simple serverless functions.
  • Cloudflare (Pages / Workers static assets): a fast global network and a generous free allowance.
  • GitHub Pages: dead simple for pure static sites and docs, deployed straight from a repo.

All of them follow the same flow: connect your Git repo, set the build command, push to deploy. That's it.

Layer 2: the backend

Here you have two shapes to choose from.

Serverless functions. If your API is a set of request/response handlers, you can often run it on the same platform as the frontend: Next.js route handlers on Vercel, Netlify Functions, or Cloudflare Workers. No server to manage, and you pay nothing at low traffic. The trade-offs are execution time limits and no long-lived connections or background workers.

A long-running server. If you need WebSockets, background jobs or a traditional Express/Django/Laravel app, you want a container or VM. Free options exist, but they usually come with conditions:

  • Render and similar platforms offer free web services that sleep after a period of inactivity. The first request after a nap can take many seconds.
  • Oracle Cloud's Always Free tier includes surprisingly capable ARM virtual machines. It's real infrastructure, but you manage the server yourself, signup can be fussy, and idle resources may be reclaimed.
  • Google Cloud and other big clouds include small always-free compute instances in select regions.

If your app is mostly CRUD, the serverless route is simpler and avoids cold-start pain on sleeping servers.

Layer 3: the database

Managed databases with free plans are easy to find now. Popular picks:

  • Supabase: Postgres plus auth, storage and auto-generated APIs. Free projects pause after a stretch of inactivity, so visit or ping them occasionally.
  • Neon: serverless Postgres that scales to zero, with database branching that's handy for previews.
  • MongoDB Atlas: a free shared cluster for document databases.
  • Turso or Cloudflare D1: SQLite-flavoured databases close to your edge functions.

I compared these in more depth in free database hosting for side projects.

A combination that works for most projects

For a typical React or Next.js app with user accounts:

Layer Pick
Frontend + API Next.js on Vercel (or Netlify / Cloudflare)
Database + auth Supabase or Neon
File storage Your database provider's storage, or Cloudflare R2
Domain A free platform subdomain to start (or one of these)
CI GitHub Actions (starter guide)

Total monthly cost: zero, until you have real traffic. That's a nice problem to have.

Step-by-step deployment checklist

  1. Push your code to GitHub (or GitLab). Every platform here deploys from Git.
  2. Create the database first and copy its connection string.
  3. Run your migrations against the new database from your machine or a CI job.
  4. Create the frontend/API project on your host and connect the repo.
  5. Set environment variables in the host's dashboard: database URL, auth secrets, API keys. Never commit them (here's why).
  6. Deploy, then test the real URL: sign up, log in, create and delete something.
  7. Check the logs in your host's dashboard. Free tiers still give you logs, so use them.

Traps that catch people later

  • Connection limits. Serverless functions can open many database connections at once. Use your provider's pooled connection string (often a separate URL or port) instead of the direct one.
  • Sleeping services. If your backend naps, your frontend's first API call may time out. Show a loading state, or choose serverless.
  • Free tiers change. Providers have removed free plans before. Keep your app portable: standard Postgres, Docker-friendly backend, config in environment variables. Then moving hosts is an afternoon, not a rewrite.
  • Commercial use. Some free plans forbid commercial projects. If you start charging money, upgrade or move. It's usually cheap at that point anyway.
  • No backups by default. Free database plans often have limited or no point-in-time recovery. Schedule your own pg_dump (a GitHub Action on a cron works) if the data matters.

FAQ

Can I host a Node.js backend for free?

Yes. Either as serverless functions on Vercel, Netlify or Cloudflare, or as a long-running server on a free tier that sleeps when idle. For always-on servers, an always-free cloud VM is the most reliable option if you're comfortable managing Linux.

What's the best free hosting for a MERN stack app?

Host the React frontend on any static host, the Express API on a free web service or as serverless functions, and use MongoDB Atlas's free cluster for the database.

Will a free tier handle real users?

For hundreds of users, usually yes. Free tiers are generous for low traffic. The real limits are cold starts, inactivity pauses and connection caps, so test your app on the free plan before you announce it anywhere.

Keep reading

More from the workbench

All articles →