Learn How to Deploy & Scale on CloudNexus

A comprehensive, step-by-step guide to provisioning infrastructure, deploying modern applications, and optimizing performance across our global network.

📅 Updated: Nov 12, 2025 ⏱️ Read time: 14 min 🔧 v3.2.0

Overview

CloudNexus provides a unified platform for hosting, container orchestration, managed databases, and edge networking. This guide walks you through the complete lifecycle: from initial setup to production-grade deployment, scaling, and monitoring.

💡
Quick Start: If you're new to CloudNexus, consider running our automated CLI wizard: nx init --wizard

Prerequisites

  • Active CloudNexus account with verified billing
  • CLI v2.4+ installed (curl -sSL https://nx.dev/install | bash)
  • SSH key pair generated and added to your profile
  • Docker or container registry access for app deployment

Deploy Your Application

Applications can be deployed via the dashboard, CLI, or Terraform provider. We'll cover the CLI approach as it offers the most flexibility for CI/CD pipelines.

1

Initialize the Project

Navigate to your project directory and create a nx.config.yaml manifest:

nx.config.yaml
name: my-app
region: us-east-1
runtime: node:20-slim
build:
  command: "npm run build"
  output: ./dist
env:
  NODE_ENV: production
2

Provision Infrastructure

Use the CLI to spin up a VPC, load balancer, and compute nodes:

Terminal
nx infra create \n  --type app-cluster \n  --size standard-4 \n  --replicas 3 \n  --network isolated
3

Push & Deploy

Deploy your container image to the provisioned cluster:

Terminal
nx deploy \n  --image ghcr.io/user/my-app:latest \n  --strategy rolling \n  --health-check /health
⚠️
Health Checks: Always configure a health endpoint. CloudNexus will automatically restart unhealthy instances after 3 consecutive failures.

Configure Auto-Scaling

Optimize cost and performance by letting CloudNexus automatically adjust compute resources based on real-time metrics.

nx.scale.yaml
scale:
  type: target-tracking
  policy:
    target: avg-cpu
    value: 65
    cooldown: 300
  limits:
    min: 2
    max: 20

Use Prometheus-compatible metrics or custom HTTP endpoints for scaling decisions.

Custom Metric Example
scale:
  type: custom
  metric: http_requests_per_second
  threshold: 500
  scale_up: +2
  scale_down: -1

Perfect for predictable traffic patterns (e.g., business hours, batch jobs).

Schedule Example
schedules:
  - cron: "0 9 * * 1-5"
    replicas: 10
  - cron: "0 18 * * 1-5"
    replicas: 3

Database Management

CloudNexus offers fully managed PostgreSQL, MySQL, and Redis instances with automated failover and point-in-time recovery.

Provisioning a Managed DB

Terminal
nx db create \n  --engine postgres:15 \n  --tier business-2 \n  --region us-east-1 \n  --backups daily \n  --retention 30d
💡
Connection Pooling: Enable PgBouncer for high-concurrency applications. It reduces connection overhead by up to 80%.

Backup & Restore

Backups run automatically. To restore to a specific point:

Terminal
nx db restore \n  --instance prod-db-01 \n  --point-in-time 2025-11-10T14:30:00Z \n  --new-name prod-db-restored

Security & Compliance

Enterprise security is built-in. Configure network isolation, encrypt data at rest and in transit, and enforce access policies.

  • 🔒 VPC Isolation: Run workloads in private subnets with NAT gateway outbound access
  • 🔐 SSL/TLS: Automatic Let's Encrypt integration or upload custom certificates
  • 🛡️ WAF Rules: Enable OWASP Core Rule Set v4.0 for application-layer protection
  • 📜 Compliance: SOC 2 Type II, HIPAA, and GDPR ready environments available
🚫
Default Deny: All inbound traffic is blocked by default. Only open ports explicitly required by your application.

Monitoring & Alerts

Gain full visibility with built-in metrics, logs, and tracing. Integrate with Prometheus, Grafana, or Datadog via our exporters.

Setting Up Alerts

nx.alerts.yaml
alerts:
  - name: high-latency
    metric: http_request_duration_ms
    condition: p95 > 500
    duration: 5m
    notify:
      - slack:ops-channel
      - pagerduty:critical

Troubleshooting

Common issues and solutions when working with CloudNexus infrastructure.

Deployment Fails with "OOMKilled"

Cause: Container exceeds memory limits.
Fix: Increase memory_limit in your config or optimize your application's memory usage. Enable swap if necessary:

Fix Example
resources:
  limits:
    memory: 2Gi
  requests:
    memory: 1Gi

SSL Certificate Not Provisioning

Cause: DNS records not propagated or ACME challenge failing.
Fix: Verify DNS points to your CloudNexus load balancer IP. Run nx cert debug --domain example.com for detailed diagnostics.

High Network Latency Between Regions

Cause: Cross-region data transfer routing.
Fix: Enable global-optimizer mode or deploy a read replica closer to your user base.