Skip to main content

Guide Β· Next.js hosting

Where to Deploy a Next.js AI App

Last reviewed

We earn commissions when you shop through the links below.

Vercel builds Next.js, so it is the natural default and the easiest place to start. AI features change the picture a little: streamed responses and slow model calls run up against function time limits, agents and embedding jobs want background workers, live chat may want websockets, and chats and embeddings need a database. Pick the host that matches the slowest, longest-running part of your app.

Quick pick

The simplest path for a standard Next.js app
Vercel
A Next.js service plus workers, cron jobs and a managed database in one place
DigitalOcean App Platform, Render or Railway
Long-running jobs, websockets and full control over the server
A virtual machine (DigitalOcean Droplet) with Docker or Coolify
Edge-first apps already on Cloudflare
Cloudflare Workers via OpenNext
Teams already invested in AWS
AWS Amplify

The options, and when to use each

Vercel

serverlessmade by the Next.js team

Use it for: Most Next.js apps: push to Git and every feature works without setup, with streaming supported in functions.

Tradeoff: Functions have a maximum duration (300s on Hobby; 800s on Pro and Enterprise per Vercel's docs), so very long agent runs or batch jobs need a queue or a separate worker.

DigitalOcean App Platform

app platformgit deployworkers and cron

Use it for: Run Next.js as a long-lived service from Git or a container, next to cron jobs and workers, connected to managed Postgres or Redis.

Tradeoff: You run Next.js as a Node server, so you give up some of the zero-config Next.js features Vercel provides, and you manage scaling settings yourself.

Netlify

serverlessgit deploy

Use it for: Teams already on Netlify; it maintains a Next.js adapter that runs the App Router on its platform.

Tradeoff: Server code runs as serverless functions, so long LLM calls and background work face the same kind of limits as Vercel.

Cloudflare Workers

edgeOpenNext adapter

Use it for: The OpenNext adapter deploys Next.js to Workers using the Node.js runtime; a good fit if your data and AI calls already live on Cloudflare.

Tradeoff: A Workers runtime, not a full Node.js server: some packages and native binaries don't run, and you depend on an adapter rather than the Next.js team.

Render

app platformworkersPostgres

Use it for: A web service for Next.js with background workers, cron jobs and Postgres alongside.

Tradeoff: Check how your plan treats idle services; a sleeping service makes the first request after a quiet spell slow.

Railway

app platformgit deploy

Use it for: Fast setup: deploy the app, a worker and a database from one project.

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

AWS Amplify

AWSmanaged SSR

Use it for: Teams already on AWS who want Next.js server rendering close to their other AWS services.

Tradeoff: Server rendering is serverless here too, and AWS setup and permissions add more to learn than the other options.

Skills that use these tools