Next.js hosting
Run Next.js as a standalone Node.js server on dedicated vCPU. Server Components, Route Handlers, ISR, middleware and streaming work as they do in a local production build, with no function duration limits and with PostgreSQL and Redis on the same private network.
Build and run
- Detected by
- next in package.json
- Build
- npm ci && npm run build
- Start
- npm run start
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=build /app/.next/standalone ./
COPY --from=build /app/.next/static ./.next/static
COPY --from=build /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]Recommendations
- Set output to "standalone" in next.config for a smaller image and faster deploys.
- The ISR and data cache are written to local disk and persist between requests on the same instance.
- If you run more than one instance, configure a shared cache handler backed by Redis.
- Route Handlers can stream responses and hold WebSocket connections without a time limit.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
When does it make sense to move a Next.js app off Vercel?
When most of the work happens on the server against a database, or the app needs background jobs, WebSockets or long requests. Some teams keep a static marketing site on Vercel and run the application on 9live.
Do we need a Dockerfile to deploy Next.js?
No. 9live detects Next.js and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Other frameworks
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
