Deploy Next.js on Kubernetes

Connect a Git repository and Wodby builds your Next.js code, deploys it to a Kubernetes cluster of your choice, and gives it a domain with HTTPS. PostgreSQL and Valkey are optional services of the same stack.

A ready Next.js stack

The stack defines the services, how they connect, and their default settings. You choose the optional services, versions, and resources, and write no Kubernetes manifests or Helm charts.

CI/CD without a separate setup

Wodby CI builds each push to the branch an environment follows, and the pipeline deploys the result. GitHub Actions, GitLab CI, and CircleCI can run the same steps with Wodby CLI.

Certificates, backups, and updates

HTTPS certificates are issued and renewed for your domains. Updates of the stack’s services, cron schedules, and backups of its databases are set up in the dashboard.

Build and release

What happens when you deploy Next.js on Wodby

A Next.js deployment copies your build context into the image, runs your build script as part of the image build, and launches the container through your start script. Installing dependencies is a step in your pipeline.

Standard Next.js scripts work unchanged

A project with the usual Next.js build and start commands fits as it is. The image build runs the first, the container starts with the second, and the start command already listens where Wodby expects the application.

An import loads your database into PostgreSQL

The PostgreSQL service takes an import of your database. The import replaces the contents of the service's data volume, so whatever the volume held before is gone.

Prerendering cannot see runtime values

While the build script runs, neither link variables nor secrets exist. A page that depends on them has to be rendered when it is requested, not prerendered at build time.

Development server in a workspace

A development workspace starts the Next.js development server directly, so options written into your dev script are not applied. The Node environment is development there, and the build step is skipped.

Read the Next.js stack guide for setup steps, settings, and limits.

Bring an existing application

Move an existing Next.js app to Wodby with your agent

Give your coding agent access to your repository and connect Wodby through MCP. Ask it to map your app to maintained services and flag what needs to change before deploying.

Review the plan first, then approve an isolated staging deployment. Production data transfer and cutover need separate approval. MCP access does not itself grant access to your repository.

Next.js planning prompt
Load Wodby’s migration guidance. Inspect this Next.js application repository and propose a Wodby deployment plan. Identify the runtime, database, background jobs, persistent files, and required secret names without revealing values. List missing information and plan an isolated staging deployment. Do not create resources, transfer production data, change DNS, or deploy anything yet.

What Wodby sets up for Next.js

Running Next.js on Kubernetes takes more than an image: a registry to keep it in, a deployment for every service, routing with certificates, and backups of whatever stores data. Wodby provides each of these, and the Next.js stack adds the settings that are specific to Next.js.

The result is an ordinary Kubernetes deployment in the cluster you chose. If you stop using Wodby, a cluster in your own account or on your own server stays yours, and the apps on it keep running.

How an app is organized

  • An app has one or more environments, such as production, staging, and dev. They share the stack and can run on different clusters.
  • Pull requests can get temporary preview environments, built from the pull request branch.
  • Scripts from your repository can run before a new build receives traffic. If one fails, the previous version keeps serving.
  • When a service fails its health checks after an upgrade, Wodby attempts to roll it back to its last successful release.

What you get with Wodby

How to deploy Next.js on Wodby

  1. 1

    Choose where the app runs: Wodby Cloud, a managed Kubernetes cluster in your cloud account, or your own server.

  2. 2

    Create an app from the Next.js stack and connect your repository.

  3. 3

    Select the optional services the app uses, then set domains, environment variables, and resources.

  4. 4

    Deploy. After that, a push to the environment’s branch builds and deploys the change.


Read more about stack management in our documentation.

Before you start

You need a Wodby account and your code in a Git repository. Wodby CI builds from GitHub, GitLab, and Bitbucket; with your own CI the repository can be anywhere.

Wodby is priced per app service. The cluster is billed separately by whoever runs it: your cloud provider, your server host, or Wodby Cloud.

Still choosing where to run it? Compare the options on the Next.js hosting page.

Start deploying

Deploy Next.js on Wodby

Create an account, choose the Next.js stack, and connect your repository.

Hosting options

Run your apps where it suits you

In your own cloud account, on a server you already rent, or on Wodby Cloud. The stacks and the deployment workflow are the same on all three, and Wodby maintains the cluster.

Lowest cost

Kubernetes on your own server

Use a dedicated server or VM you already rent, from Hetzner, OVH, or any other host. Wodby installs Kubernetes on it, keeps it up to date, and deploys your apps.

  • No managed control plane to pay for
  • One command installs Kubernetes on the server
  • Join more servers as worker nodes when you need capacity
  • Operating system updates install when you choose
Explore self-hosted Kubernetes

We handle everything

Wodby Cloud

Deploy without a cloud account or a server of your own. Wodby creates and operates the cluster, and you pay for the nodes and storage you run.

  • Nothing to connect or set up before your first deploy
  • A free demo cluster to try the workflow first
  • Scales between the node counts you set
  • The same stacks and deployment workflow as your own cluster
See Wodby Cloud

Connect the services your apps already use

An integration links Wodby to an account you already have, such as your Git provider, a storage bucket for backups, or an API your app calls.

Connected once
Set up a service once and reuse it across your apps.
Out of your code
Credentials stay out of your repositories and are managed in one place.
Per environment
Override any value for each environment.
Stack preview

Services in the Next.js stack

Stack serviceBase serviceRole
Node.js
Node.js (Next.js)Primary
PostgreSQL
PostgreSQLDisabled by default
Valkey
ValkeyDisabled by default
Mailpit
MailpitDisabled by default
OpenSMTPD
OpenSMTPDDisabled by default
Gotenberg
GotenbergDisabled by default
OpenTelemetry Collector
OpenTelemetry CollectorDisabled by default

Next step

Try the Next.js stack in your own account

Creating an account is free. Check the pricing to see what an app costs once it runs in production.

What our customers say

From teams that run their applications on Wodby.

  • We moved our Drupal hosting to use Wodby and changed our development workflow to use Docker at the same time. Now we can concentrate on Drupal development and we're not losing time configuring servers etc. When a site needs additional resources or hosting in a different region we can be way more responsive as deploying a new instance takes no time at all.

    Tony Miller
    Eighty Options
    Tony Miller, Eighty Options
  • Wodby’s innovative infrastructure helped us to increase the speed and simplify our app deployment, while also leaving us the freedom of handling our hosting and not locking us on a specific pattern. We are now much more robust for future growth and will be able to innovate faster.

    Martin Normann Lund
    Ramsalt Lab
    Martin Normann Lund, Ramsalt Lab
FAQ

Frequently Asked Questions

Have questions? We've got answers. If you don't see your question here, feel free to reach out.

Get started

Ready to deploy Next.js?

Choose Wodby Cloud, managed Kubernetes, or your own server, then deploy stacks with CI/CD, backups, SSL, integrations, and environment management in the same platform.

  • Run the same stack workflow on Wodby Cloud, managed Kubernetes, or your own server
  • Deploy app environments for production, staging, previews, and development
  • Use Wodby CI or your existing pipeline with the Wodby CLI
  • Keep backups, certificates, integrations, and access control in the platform

Start for free

No credit card required
$0/month
  • 10 app services
  • 30 minutes of integrated CI
  • 5 GB of private registry
  • Stacks & integrations
  • Technical domains with SSL
Create free account
Upgrade when you need more capacity