Choose a runtime
| Your app needs | Start with |
|---|---|
| Server-rendered pages, sign-in backed by server-side cookies, or dynamic Route Handlers | Next.js web Service |
| Prebuilt pages and browser-side code that calls an existing backend | Static Next.js site |
| Server-rendered pages plus work that runs beyond a web request | A web Service and a private worker. Add a scheduled Job for tasks on a timer. |
Next.js supports runtime features through next start. With a static export, the build outputs files that can be served directly. Next.js self-hosting guide · Next.js static exports
Deploy to Blossom
- Start with the matching recipe. For the Node.js path, make sure your repository builds with
npm run buildand starts withnpm start. Set the web Service port to match the port your app listens on. For the static path, setoutput: 'export'and publish the generatedout/directory. - Add your runtime dependencies. Set server-only environment variables on the Environment. Link PostgreSQL if the app needs a database. Run any queue consumer as a private worker with its own start command.
- Deploy your repository to a staging Environment. Open the HTTPS URL and run the checks below with staging data before sending real traffic.
Check your app
For a static export, load a few pages directly and check that assets and browser-side API calls work. For SSR, refresh a page that reads fresh data and confirm the HTML reflects a change. If the app runs scheduled work, let the timer fire and check that the worker completes the job. Redeploy and confirm that the data your app expects to keep is still there. Worked Next.js migration