Skip to main content
Next.js runs on slipway as a web service on the Node runtime, with no Dockerfile needed.

Prerequisites

A Next.js app in a GitHub or GitLab repository, with next build and next start working locally.

Configure the app

Next.js binds to 0.0.0.0 and reads PORT when told to. Set the start script:
package.json
Next.js checks the Host header on server actions. Set allowedOrigins so slipway’s hostname is accepted:
next.config.js

Add slipway.yaml

slipway.yaml

Deploy

Select New, choose your repository, keep the tracked branch, and deploy. The service’s Logs tab opens on the first build; when the status reaches healthy the service header shows the URL. Pushes to the tracked branch redeploy automatically.

Add a database

slipway.yaml
${service.db.url} resolves at deploy time, so no connection string is committed. See Databases.

Static export instead

If you use output: 'export', deploy it as a static site with no container and no compute charge:
slipway.yaml
See Static sites.

Next steps

Secrets

Keep API keys out of the repository.

Custom domains

Serve under your own zone.