Skip to content

Next.js

Next.js is a React framework for building server-rendered and statically generated applications. Choose this component when you want Diploi to handle optimized builds, routing, and image processing without extra configuration. It works well for SaaS dashboards, marketing pages, and any React project that needs reliable hosting.

Paste this entry into the components list in diploi.yaml to add Next.js to your project.

components:
- name: Next.js
identifier: next
package: https://github.com/diploi/component-nextjs#v16.3.3

Launch a trial, no account needed https://diploi.com/component/next

Uses the official node Docker image.

  1. In the Dashboard, click Create Project +

  2. Under Pick Components, choose Next.js

    You can add other frameworks from this page if you want to create a monorepo application, eg, Next.js + Bun for backend.

  3. In Pick Add-ons, select any databases or extra tools you need.

  4. Choose Create Repository so Diploi generates a new GitHub repo for your project.

  5. Click Launch Stack

Check the guide https://diploi.com/blog/hosting_nextjs_apps

Will run npm install when component is first initialized, and npm run dev when deployment is started.

Will build a production ready image. Image runs npm install & npm build when being created. Once the image runs, npm start is called.