Quick Start Guide

📅 Updated: March 15, 2025 ⏱️ Reading time: ~8 min 🛠️ CLI Version: v2.4.0
1

Install & Configure CLI

CloudNexus CLI is the fastest way to manage your infrastructure. Install it globally via npm or download the binary for your OS.

Prerequisites
  • Node.js 18+ or Python 3.9+
  • CloudNexus account (free tier available)
  • API key with admin:deploy permissions
Terminal
# Install globally via npm npm install -g @cloudnexus/cli # Authenticate with your API key cnx auth login --key your_api_key_here

Verify the installation by checking your profile and available regions:

Terminal
cnx whoami cnx regions list
2

Create Your First Project

Projects isolate your resources, budgets, and access policies. Initialize a new project in your working directory:

Terminal
cnx init --project my-app-prod --region us-east-1 # This generates: # ├── cnx.yaml # Infrastructure config # ├── .cnxignore # Files to exclude # └── scripts/ # Deployment hooks
💡 Pro Tip

Use --region auto to let CloudNexus route your workloads to the lowest-latency edge based on your user base.

3

Deploy a Compute Instance

Define your first server in cnx.yaml. CloudNexus supports Docker images, raw OS templates, and pre-built frameworks.

cnx.yaml
compute: instances: - name: web-server image: nginx:latest plan: standard-2vcpu port_mappings: - 80:80 - 443:443 auto_backup: true region: us-east-1

Apply the configuration to provision your instance:

Terminal
cnx deploy # Waiting for provisioning... # ✓ Instance web-server created (ID: i-8f2a9b1c) # ✓ IP assigned: 203.0.113.45 # ✓ Health check passed
4

Configure Networking & Security

Lock down your instance with firewall rules and attach a global CDN for content delivery:

cnx.yaml (Networking)
networking: firewall: - name: web-traffic ingress: - port: 80 protocol: tcp source: 0.0.0.0/0 - port: 443 protocol: tcp source: 0.0.0.0/0 cdn: enabled: true cache_policy: aggressive ssl: auto-redirect

Apply the network configuration:

Terminal
cnx network apply
5

Monitor & Scale

CloudNexus provides built-in observability. View real-time metrics and set up auto-scaling policies:

Terminal
# View live metrics cnx monitor web-server --metrics cpu,memory,network # Set auto-scaling rules cnx scaling set --instance web-server \\ --min 1 --max 10 \\ --cpu-threshold 75 \\ --cooldown 120s
Next Steps