Deploy Your First VPS Instance
Learn how to provision, configure, and connect to a high-performance virtual machine in under 5 minutes using the CloudNexus API or CLI.
Prerequisites
You'll need a CloudNexus account, an API key with `compute:write` permissions, and the latest version of our CLI (`cnx-cli v2.4+`).
1. Configure Your Environment
Before provisioning, authenticate your CLI session and set your default region. All compute operations require an active authentication token.
bash
# Install CLI (macOS/Linux)
curl -sL https://cli.cloudnexus.dev/install.sh | bash
# Login with API key
cnx auth login \n --api-key cnx_live_8xK2mP9... \n --region us-east-1
# Verify connection
cnx status
2. Provision the Instance
Use the cnx compute create command to spin up a bare-metal-backed VPS. Specify instance family, storage tier, and networking options.
bash
cnx compute create \n --name prod-web-01 \n --family nexus-hp \n --cpu 4 --ram 8 --storage 100 \n --os ubuntu-22.04 \n --firewall allow-ssh,allow-https \n --label env=production \n --label team=platform
Pro Tip
Use
--auto-scale to enable intelligent traffic-based scaling. CloudNexus will automatically adjust vCPU/RAM allocation based on real-time load metrics.
3. Connect & Verify
Once provisioned, retrieve the public IP and establish a secure SSH connection. All instances come with hardened SSH defaults and automatic key rotation.
| Parameter | Default | Description |
|---|---|---|
ssh_user |
cnx-admin |
Non-root privileged user |
port |
22 |
Standard SSH port |
protocol |
SSH-2 |
Encrypted channel version |
bash
# Get instance IP
cnx compute get prod-web-01 --field ipv4
# Output: 198.51.100.42
# Connect
ssh -i ~/.cnx/id_ed25519 cnx-admin@198.51.100.42
REST API Alternative
Prefer programmatic deployment? Use the Compute API to orchestrate infrastructure at scale.
http
POST /v2/compute/instances
Authorization: Bearer cnx_live_...
Content-Type: application/json
{
"name": "api-backend-node",
"region": "eu-west-2",
"spec": {
"vcpus": 2,
"memory_gb": 4,
"disk_gb": 50,
"image": "debian-12"
},
"network": {
"firewall_ids": ["fw_default", "fw_app"]
}
}
Rate Limits
API requests are capped at 100 req/min per account. Use bulk endpoints for deployments > 10 instances to avoid 429 throttling.
Next Steps
- Configure Global Load Balancers for high availability
- Enable Advanced WAF Rules and DDoS mitigation
- Set up automated backups with Snapshot Policies
- Monitor performance via Real-Time Metrics Dashboard