Deploying Next.js applications on EGREED Deploy
A step-by-step tutorial for deploying Next.js applications on EGREED Deploy with automated builds, environment variables, custom domains, and monitoring.
Updated July 8, 2026 8 min read
Overview
This guide walks through deploying Next.js applications on EGREED Deploy. You'll go from a working local project to a live production URL with automated Git deploys, environment variables, and a custom domain.
Requirements
- An EGREED account (create one at deploy.egreedtech.org)
- A working Next.js project committed to GitHub, GitLab, or Bitbucket
- Node.js 20+ (or Python 3.11+ for Python projects) locally to test the build
Step-by-step guide
- Log in to EGREED Deploy and click New Project.
- Choose Import from Git and pick your Next.js repository.
- EGREED Deploy auto-detects Next.js. Confirm the following defaults:
- Install command:
npm install - Build command:
next build - Output directory:
.next
- Install command:
- Add environment variables (e.g.
NEXT_PUBLIC_API_URL) under Environment. - Click Deploy. EGREED Deploy installs, builds, and publishes to a live URL.
- Optional: attach a custom domain from Domains.
Configuration
Add a egreed.json or egreed.yaml to your repo to version-control build settings, headers, redirects, and rewrites. Example headers:
{
"framework": "Next.js",
"build": "next build",
"output": ".next",
"headers": [{ "source": "/(.*)", "headers": [{ "key": "X-Frame-Options", "value": "DENY" }] }]
}
Common errors
- Build failed: dependency not found. Ensure all dependencies are in
package.json(orrequirements.txt) and committed. - Missing environment variable. Add missing keys under Environment → Production.
- Output directory not found. Verify the build command actually produces
.next.
Troubleshooting
Open Deployments → Logs to see full build and runtime output. Reproduce locally with the same Node/Python version. Contact support at [email protected] if a deploy remains stuck.
deployment guideegreed deploynext.jstutorial