For Next.js
Self-host Next.js
without the lock-in
Run Next.js on production VMs with global CDN, zero egress fees, S3-compatible storage and on-the-fly image optimisation. Everything you'd want from Vercel — without the bill or the lock-in.
# Build a standalone Next.js app
$ next build
# Spin up a VM with the Edge CLI
$ edge compute create \
--image ubuntu-24-04 --plan small \
--script ./bootstrap-nextjs.sh
# Front it with the CDN
$ edge cdn create app.example.com \
--origin https://<vm-ip>
✓ Live at https://app.example.com
✓ SSL provisioned, CDN warming
Why developers move Next.js to Edge
Predictable VM pricing, real CPU and memory limits, and no surprise function invocations on your bill.
Standalone or Node server
Build with `next build` (standalone or default) and run on any Edge VM. No proprietary runtime, no vendor wrappers.
next/image without the bill
Point next/image at our URL-based image optimisation. Resize, crop, convert to AVIF/WebP on the fly with no per-image fees.
S3-compatible storage
Use Edge Storage as the backing bucket for uploads, ISR cache, or static assets. AWS SDK works unchanged.
Global CDN, zero egress
Front your app with a CDN spread across thousands of edge locations. Stop worrying about bandwidth bills on launch day.
Your CI, your way
Deploy with GitHub Actions, GitLab CI, or a single SSH command. Use the Edge CLI to script everything.
Agent-deployable
Tell an AI agent "deploy my Next.js app to example.com" — the agentic API provisions the VM, DNS, CDN and SSL for you.
Reference architecture
How Next.js maps to Edge
A typical Next.js app maps cleanly onto our four core products. No glue services, no proprietary primitives — just standard infrastructure you can move at any time.
Runs `next start` (or your standalone build) on a VM near your users
S3-compatible bucket for uploads, ISR snapshots, and static asset overflow
Caches `_next/static`, public assets, and edge-cacheable API routes globally
Drop-in loader for next/image — resize, AVIF/WebP, smart cropping
Anycast DNS with instant propagation for your apex and previews
# next.config.js — image loader
module.exports = {
images: {
loader: 'custom',
loaderFile: './edge-loader.js',
},
}
# edge-loader.js
export default function loader({ src, width, quality }) {
return `https://cdn.example.com/${src}?w=${width}&q=${quality||75}`
}
The Vercel maths, without the surprises
A medium-traffic Next.js app on Vercel routinely runs into four-figure monthly bills once you cross a million page views. The same app on Edge runs from a small VM and a CDN deployment — fixed costs, no per-invocation fees, no per-image transforms.
Indicative monthly cost
Medium-traffic Next.js app
~3M page views, 500GB image bandwidth, ISR
Indicative figures based on public pricing. Run your own numbers in the trial.
Common questions
Do server components and server actions work?
Yes. Next.js runs as a normal Node process on an Edge VM, so the full feature set — server components, server actions, middleware, route handlers — works exactly as documented.
What about ISR and on-demand revalidation?
Built-in ISR works out of the box. For multi-VM setups you can persist the cache to Edge Storage with a custom cache handler, or call your `/revalidate` endpoint from any CI step.
Can I use next/image without paying per-transform?
Yes — configure a custom loader pointing at Edge Image Optimization. You get the same `<Image />` component with on-the-fly resizing and modern format conversion at CDN prices.
How do previews / branch deploys work?
Spin up a small VM per branch from your CI, point a `*.test.network` subdomain at it, tear it down on PR close. The Edge CLI and agentic API both make this a few lines of YAML.
By Stack
Other stacks on Edge
Ship Next.js on your terms
30-day trial of the full platform. Bring an existing app or start from scratch — we'll match your current performance and slash your bill.