Skip to main content

Overview

Creating a VM on Raff Cloud involves selecting an OS template, a pricing plan (which determines CPU, RAM, and storage), a region, and optional configurations like SSH keys, backups, and VPC networking.

Prerequisites

  • A Raff Cloud Platform account with billing set up
  • An API key (how to get one)
  • A project ID
export RAFF_API_KEY="YOUR_API_KEY"
export RAFF_PROJECT_ID="YOUR_PROJECT_ID"

Create a Basic VM

curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-ubuntu-server",
    "template_id": "<template-uuid>",
    "pricing_id": 3,
    "region": "us-east"
  }'

Required Fields

FieldTypeDescription
namestringA name for your VM (must be unique within your account)
template_idstringUUID of the OS template to use
pricing_idintegerPricing plan ID (determines CPU, RAM, storage, bandwidth)
regionstringDeployment region (e.g., us-east)

Create a VM with SSH Keys

Provide your public SSH key for passwordless access:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-secure-server",
    "template_id": "<template-uuid>",
    "pricing_id": 3,
    "region": "us-east",
    "ssh_keys": ["ssh-ed25519 AAAA... user@laptop"]
  }'

Create a VM with Backups

Enable automatic backups during creation:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-backed-up-server",
    "template_id": "<template-uuid>",
    "pricing_id": 3,
    "region": "us-east",
    "backup_type": "weekly",
    "backup_time": "8am",
    "backup_date": "Saturday"
  }'
FieldTypeDescription
backup_typestringdaily or weekly
backup_timestringTime of day for backup (e.g., 8am)
backup_datestringDay for weekly backups (e.g., Saturday)

Create a VM in a Shared VPC

Place multiple VMs on the same private network by specifying a vpc_id:
# First VM creates a VPC automatically
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-server",
    "template_id": "<template-uuid>",
    "pricing_id": 3,
    "region": "us-east"
  }'

# Second VM joins the same VPC
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "database-server",
    "template_id": "<template-uuid>",
    "pricing_id": 5,
    "region": "us-east",
    "vpc_id": "<vpc-uuid-from-first-vm>"
  }'
You can also specify a custom VPC name and CIDR:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
  -H "X-API-Key: $RAFF_API_KEY" \
  -H "X-Project-ID: $RAFF_PROJECT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-vm",
    "template_id": "<template-uuid>",
    "pricing_id": 1,
    "region": "us-east",
    "vpc_name": "production-vpc",
    "vpc_cidr": "10.0.1.0/24"
  }'

VM Provisioning States

After creation, your VM transitions through several states before it’s ready:
StatusDescription
provisioningResources being allocated
bootingVM is booting up
initiatingInitial setup running
activeReady to use
Check VM status:
curl -H "X-API-Key: $RAFF_API_KEY" \
  https://api.rafftechnologies.com/api/v1/vms/{vm-id}
VM provisioning typically takes 30-90 seconds depending on the template and region.

Next Steps