Skip to content
Free Spinifex sandbox. Create a sandbox Your Spinifex account is live. Access your console
All posts
Engineering · 5 min read

Spinifex on Vultr: AWS APIs on VMs or Bare Metal, in One Command

One node or three, on Vultr VMs or bare metal, with public addresses Spinifex manages through Vultr's API

Deploy Spinifex on Vultr VMs or bare metal with one command and run EC2, EBS, S3, VPC, load balancers and EKS on Vultr reserved IPs, with node failover.

TN

Tom Newton

Forward Deployed Engineer

You can now run Spinifex on Vultr with one command. It builds one node or three, on VMs or on bare metal, and gives you an AWS endpoint for EC2, EBS, S3, VPC, IAM, load balancers and EKS. Anything you launch into a public subnet gets a real Vultr public address, which Spinifex creates and deletes for you through Vultr's API.

The full guide is Spinifex on Vultr in our docs, and Vultr has published its own walkthrough, How to Deploy Spinifex on Vultr, which goes on to launch an instance, attach a volume, allocate an Elastic IP and use S3. This post covers what you get, what it costs, and what happened when we powered off a node under load.

Why Vultr

Vultr has 33 locations across six continents, and rents VMs and bare-metal servers by the hour in most of them. That lets you put an AWS-compatible cloud next to your users or your data for an afternoon, a quarter or for good, with no contract.

Your code talks to the AWS API and never to Vultr. The same Terraform, AWS CLI scripts and SDK calls run against Spinifex on Vultr, on your own rack, at an edge site or in AWS itself. Choosing where to run becomes a deployment decision, and you can change it later without a rewrite.

Pick a size

Use Nodes Vultr plan Cost while running
Development and testing 1 vx1-g-16c-64g VM (16 vCPU, 64 GB) $0.48 an hour
Production 3 vx1-g-16c-64g VM $1.44 an hour
Production on bare metal 1 or 3 vbm-8c-64gb-amd (8 cores, 16 threads, 64 GB, 2 × 1.9 TB NVMe) $0.55 an hour per server

A single 16-vCPU VM is the smallest node we recommend. Spinifex keeps 2 vCPUs for the host and its own services and offers the other 14 to your instances, load balancers and clusters, one vCPU each, with no overcommit. For production, run three nodes so the cluster survives losing one.

Deploy

You need a Vultr API key, Git, Bash 4 or newer, OpenTofu or Terraform 1.5 or newer, the AWS CLI v2, python3 and an SSH key at ~/.ssh/id_ed25519. macOS ships Bash 3.2, so install a newer one with Homebrew first. Then:

git clone https://github.com/mulgadc/spinifex.git
cd spinifex/scripts/terraform/vultr-spx
export VULTR_API_KEY=<your key>

# One VM for development
./deploy-vultr.sh up --plan vx1-g-16c-64g

# Three VMs, or three bare-metal servers, for production
./deploy-vultr.sh up --plan vx1-g-16c-64g --nodes 3
./deploy-vultr.sh up --plan vbm-8c-64gb-amd --nodes 3

deploy-vultr.sh wraps the official Vultr Terraform provider, so the Vultr side is plain infrastructure as code you can read and change. It creates a private Vultr VPC and the nodes on Ubuntu 24.04, installs Spinifex on each one over SSH, and forms the cluster.

In our tests one VM took about 4 minutes and three took about 16. Bare metal takes longer because Vultr needs 5 to 6 minutes to deliver each server: 10 minutes for one, 18½ for three. If a step fails, fix the cause and run the same command again, and it picks up from that step.

When it finishes, it prints your endpoint and web console address, and it has already written a spinifex AWS profile with the endpoint, credentials and the cluster's CA certificate, so the AWS CLI works straight away:

export AWS_PROFILE=spinifex
aws ec2 describe-instance-types

Public addresses from Vultr's own API

Create an EC2 instance in a public subnet, an Elastic IP, an internet-facing load balancer or a NAT gateway, and Spinifex creates a Vultr reserved IP, attaches it to the node your resource runs on, and routes it to the resource. Delete the resource and Spinifex deletes the reserved IP. You can watch them come and go in the Vultr portal under Network → Reserved IPs.

The deploy copies your API key to the nodes over SSH and stores it at /etc/spinifex/vultr/api-key, readable only by the Spinifex daemon. It stays out of the Terraform state and the instance metadata. Once the deploy prints the node addresses, lock the key's access control list down to those addresses and your own machine.

We powered off a node to see what happens

A three-node deployment is one Spinifex cluster, a single-AZ AWS region, in one Vultr location. It protects you against losing a node, not a datacenter. When a node dies, Spinifex restarts its instances on the survivors and moves each instance's reserved IP with it, so the public address keeps answering.

To test it, we ran our load-balanced Nginx workbook with three web servers spread across the three nodes, hit the load balancer once a second, and ran ./deploy-vultr.sh stop node3. That command is a hard power-off through the Vultr API, so the node gets no chance to hand anything over. We did this once per case, on three VMs and on three bare-metal servers in Chicago:

Node powered off Deployment Instance running elsewhere Its public address answers Load balancer requests failed
One web server VMs 173 s 244 s 5 of 91, all within 45 s
One web server Bare metal 172 s 223 s 6 of 83, all within 60 s
node1: a web server, the load balancer and the NATS leader VMs 167 s 253 s 22 of 66, all within 115 s
Two web servers and the load balancer Bare metal 204 s 271 s 21 of 79, all within 114 s

With one web server lost, the site dropped a handful of requests while the load balancer's health checks caught up, then served every request from the other two. About three minutes later the lost server was running on a surviving node, and within about four minutes its own public address answered again.

Taking out the load balancer's node costs more, because the load balancer has to move too, but the site still came back within two minutes with no one touching it. Run ./deploy-vultr.sh start node3 and the node rejoins: about a minute for a VM, about five for bare metal.

The guide walks through the same test step by step, so you can repeat it on your own deployment.

Limits worth knowing

  • Deployments are one node or three. Other cluster sizes aren't supported yet.
  • A three-node cluster survives one failed node at a time, since it needs two of three online.
  • Vultr holds a deleted reserved IP's quota slot for 24 hours, so creating and deleting many addresses in one day can hit your account limit.
  • Bare metal bills from the moment Vultr creates it, running or stopped, so tear down bare-metal test clusters when you finish.

Clean up

./deploy-vultr.sh destroy removes the nodes, the VPC, the boot volumes and any reserved IPs Spinifex created. If it finds anything left that would keep billing, it lists it and fails, so you don't discover a stray address on next month's invoice.

Get started

Follow Spinifex on Vultr to deploy, then Setting Up Your Cluster to import an AMI, build a VPC and launch your first instance. Vultr's step-by-step guide covers the same deploy from Vultr's side. Spinifex is open source at github.com/mulgadc/spinifex. If you'd like to try it before creating a Vultr account, the free Spinifex sandbox gives you a live endpoint for 72 hours.

#Vultr#Cloud#Terraform#Bare Metal#High Availability#Spinifex