Getting Started Guide â
Deploy your first application on CloudNexus in under 5 minutes. This guide covers account setup, CLI installation, project initialization, and your first production deployment.
Create Your Account & Generate API Key
If you haven't already, sign up at cloudnexus.io/register. Once logged in, navigate to Settings â API Keys and generate a new key with admin scope.
# Export your API key for local use
export CN_API_KEY="cn_live_xxxxxxxxxxxxxxxxxxxxxxxx"
# Verify authentication
cn auth verify
Install the CloudNexus CLI
The CN CLI is the primary interface for managing infrastructure, deployments, and monitoring. Install it via npm or your package manager.
# Install globally
npm install -g @cloudnexus/cli
# Verify installation
cn --version # Output: 3.8.2
Alternatively, install via Homebrew (macOS/Linux):
brew install cloudnexus/tap/cn-cli
Initialize Your Project
Navigate to your project root and run the init command. The CLI will scaffold a cloudnexus.config.js file tailored to your stack.
cd my-awesome-app
cn init
# Follow the interactive prompt:
â Framework? Next.js / Express / Docker / Other
â Region? us-east-1
â Auto-scaling? Yes
â Generate config? Done
Configure Your Environment
Edit cloudnexus.config.js to match your requirements. Key settings include compute resources, networking, and security policies.
export default {
name: "my-awesome-app",
runtime: "nodejs20",
compute: {
cpu: 2,
memory: 4096, // MB
autoScale: {
min: 2,
max: 10,
metric: "cpu",
threshold: 75
}
},
network: {
port: 3000,
healthCheck: "/health"
}
}
cn preview to spin up an ephemeral environment before committing to production. It costs nothing and mirrors your prod config exactly.
Deploy to Production
When you're ready, push your changes to CloudNexus. The CLI will handle building, containerization (if needed), and zero-downtime deployment.
cn deploy --prod
â Building artifacts...
â Uploading to us-east-1...
â Running health checks...
â Live: https://my-awesome-app.cloudnexus.app
Deployment successful (v1.0.2)
Your application is now live with automatic SSL, global edge caching, and real-time monitoring enabled by default. Access your dashboard at Dashboard â Projects â my-awesome-app.
Troubleshooting & FAQs
â Deployment fails with "Region Unavailable"
This usually means the selected region is at capacity or you haven't enabled it in your billing settings. Run cn regions list to see available zones, or contact support to enable enterprise regions.
â How do I rollback a deployment?
CloudNexus keeps the last 50 versions by default. Rollback instantly with:
cn deploy --rollback or specify a version: cn deploy --version v1.0.1
â Where are my logs?
Stream real-time logs locally with cn logs --follow. Historical logs are available in the dashboard under Monitoring â Log Explorer.