Prerequisites
- A Raff account with billing set up
- An API key (Dashboard → API Keys → Create API Key)
- A project ID (Dashboard → Projects)
- An SSH key pair (optional but recommended)
Step 1: Authenticate
Set your API key and project ID as environment variables for convenience:Step 2: Create a VM
Create an Ubuntu VM with 2 vCPUs, 4 GB RAM:Replace
<template-uuid> with your OS template ID — get one from List Templates (no auth required; filter with ?category=os).The pricing_id selects a plan that determines vCPU, RAM, storage, and bandwidth — list plans with List VM Pricing.Step 3: Wait for VM to Become Active
Poll the VM status until it becomesactive:
Step 4: Connect via SSH
Once the VM isactive, connect using the public IPv4 address:
Step 5: Manage Your VM
Stop the VM
Stopped VMs retain their resources and IP address. You are still billed for reserved resources.
Resize the VM
Resize requires the VM to be stopped first. Pass a newpricing_id — the plan determines the new vCPU, RAM, storage, and bandwidth. Get plan IDs from List VM Pricing.
Start the VM
Delete the VM
VPC Networking
By default every VM gets a VPC. You can opt out, or share a VPC across multiple VMs.Auto-created VPC (default)
If you don’t pass any VPC fields, a VPC namedvpc-{vm-name} is created automatically and the VM is attached to it. No extra setup required.
Shared VPC
To place multiple VMs on the same private network, create a VPC first, then pass itsvpc_id to every VM that should join:
Inline VPC creation
Create the VPC and the first VM in a single call by passingvpc_name and vpc_cidr instead of an existing vpc_id:
Skip the VPC
For a single-VM setup that only needs its public IP, passskip_vpc: true to opt out of the auto-created VPC entirely. Cannot be combined with skip_public_ip: true — a VM must have at least one network.