Skip to main content

Deploy a Next.js App on Leapcell

Quickly deploy your Next.js app on Leapcell in a few steps. You can use our example app or your own.

1. Fork the Next.js boilerplate on GitHub.

This is a simplified Next.js program based on the Next.js Tutorial.

If you’re new to Next.js, we recommend following the Next.js Tutorial first.

2. Create a Service in the Leapcell Dashboard and connect your new repository.

Go to the Leapcell Dashboard and click the New Service button.

Then click Connect with GitHub and select the forked repository.

3. Provide the following values during creation:

info

Next.js requires a build step, so the build command should be npm install && npm run build.

FieldValue
RuntimeNode.js (Any version)
Build Commandnpm install && npm run build
Start Commandnpm start
Port3000
caution

Leapcell’s default port is 8080, while the Next.js framework uses 3000 as the default port. Ensure you configure this correctly.

4. Access Your App:

Once deployed, you should see a URL like foo-bar.leapcell.dev on the Deployment page. Visit the domain shown on the service page.

Continuous Deployments

Every push to the linked branch automatically triggers a build and deploy. Failed builds are safely canceled, leaving the current version running until the next successful deploy.

Learn more about Continuous Deployments.