Complete setup guide from installation to your first deployment
Welcome to NextDeploy! This guide will walk you through everything you need to know to get started with CLI-first deployments for your Next.js applications.
Before we begin, make sure you have:
First, install the NextDeploy CLI globally:
npm install -g nextdeploy
# Verify the installation
nextdeploy --version
Navigate to your Next.js project directory and initialize NextDeploy:
cd your-nextjs-app
nextdeploy init
This will create a nextdeploy.config.js
file with default settings.
Edit the generated configuration file to add your server details:
module.exports = {
app: {
name: 'my-app',
framework: 'nextjs',
buildCommand: 'npm run build',
startCommand: 'npm start'
},
targets: {
production: {
type: 'vps',
host: 'your-server.com',
user: 'deploy',
path: '/var/www/my-app'
}
}
}
Now you're ready to deploy:
# Validate your configuration
nextdeploy validate --target production
# Deploy to production
nextdeploy deploy --target production
Congratulations! Your application should now be running on your server. Here are some next steps:
Check out our other guides for more advanced topics!
Explore our comprehensive courses for deeper learning.