Skip to main content

Requirements

Project Structure

my-app-next/
├── src/
│   ├── app/
│   │   ├── layout.tsx
│   │   └── page.tsx
│   └── components/
├── public/
├── next.config.js
├── package.json
└── vertracloud.config

Configuration

next.config.js

For deployment on Vertra Cloud, configure standalone mode to optimize build size:
/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
};

module.exports = nextConfig;

package.json

{
  "name": "my-app-next",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start -p $PORT"
  },
  "dependencies": {
    "next": "^14.0.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  }
}

vertracloud.config

MAIN=package.json
START=npm run build && npm start
VERSION=recommended
Next.js needs to be compiled before starting. Use npm run build && npm start as startup command. Compilation happens inside the container.

Available Versions

VersionStatusDescription
24.5.0LatestNode.js 24.5.0 (latest version)
22.18.0RecommendedNode.js 22.18.0 LTS (recommended for production)
20.18.0StableNode.js 20.18.0 with extended support

Deploy

  1. Exclude node_modules and .next from the project
  2. Compress into ZIP
  3. Select Node.js as language
  4. Configure at least 512MB of memory (build is resource-intensive)
  5. Set START=npm run build && npm start

Notes

  • Recommended memory: 512MB or more (build process is intensive)
  • Environment variables: Configure via dashboard before first build
  • Use output: 'standalone' to reduce build size
  • API Routes from Next.js work normally on the platform
  • Port is injected via PORT — use next start -p $PORT

Common Issues

Increase application memory to at least 512MB. Next.js build process is memory-intensive.
Check if output: 'standalone' is configured and if the build completed successfully in logs.