📄 Documentation âąī¸ 8 min read 🔄 Updated: Jan 2025

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.

â„šī¸ Prerequisites You'll need a CloudNexus account, Node.js 18+ (or Docker), and basic terminal familiarity. No prior cloud experience required.
1

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.

bash
# Export your API key for local use
export CN_API_KEY="cn_live_xxxxxxxxxxxxxxxxxxxxxxxx"

# Verify authentication
cn auth verify
âš ī¸ Security Notice Never commit your API key to version control. Use environment variables or a secrets manager in production.
2

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.

npm
# 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

3

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.

bash
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
4

Configure Your Environment

Edit cloudnexus.config.js to match your requirements. Key settings include compute resources, networking, and security policies.

cloudnexus.config.js
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"
  }
}
💡 Pro Tip Use cn preview to spin up an ephemeral environment before committing to production. It costs nothing and mirrors your prod config exactly.
5

Deploy to Production

When you're ready, push your changes to CloudNexus. The CLI will handle building, containerization (if needed), and zero-downtime deployment.

bash
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.

🔗 Next Steps Once deployed, explore our guides on Managed Databases, Kubernetes Orchestration, and Advanced Networking.