- A minimal Next.js starter app
- Hostinger-specific deployment settings
- A checklist for environment variables and production readiness
- Troubleshooting notes for common deployment issues
- A Hostinger plan with Node.js web apps hosting enabled
- A GitHub repository containing your Next.js app
- Node.js 20 LTS recommended
npm install
npm run devOpen http://localhost:3000.
- Push this app (or your own Next.js app) to GitHub.
- Log in to Hostinger hPanel, go to Websites in the sidebar, and click Add Website.
- Choose Node.js Apps.
- Select Import Git Repository.
- Authorize GitHub access and select your repository.
- Review the auto-detected build settings and configure:
- Install command:
npm ci - Build command:
npm run build - Start command:
npm run start -- -p $PORT - Node.js version:
20
- Install command:
- Add required environment variables in the Hostinger app settings.
- Click Deploy.
- Keep local defaults in
.env.local. - Configure production values in Hostinger Node.js web apps hosting settings.
- Never commit secrets.
Example variables:
NEXT_PUBLIC_APP_URL=https://your-domain.example
NEXT_PUBLIC_API_BASE_URL=https://api.your-domain.examplenpm run buildsucceeds locallynpm run start -- -p 3000starts without errors- All required env vars are configured in Hostinger
next.config.mjsreviewed for your app needs (images, headers, rewrites)
Set all required variables in Hostinger before deploying.
Use the start command with platform port binding:
npm run start -- -p $PORTReview next.config.mjs image domains and output settings.
If you need a Next.js-specific Hostinger reference link in external docs, use this repository URL:
https://github.com/hostinger/deploy-nextjs