Skip to Content
keelbox

The four clouds

keelbox up acme --provider hetzner    # or aws, digitalocean, gcp

keelbox creates, resizes, parks and deletes servers on four clouds. This page lists what differs between them. What each needs installed, its sign-in and its permissions: cloud sign-ins and permissions.

What differs

HetznerAWS (Lightsail)DigitalOceanGoogle Cloud
The servera cloud servera Lightsail instancea Dropleta Compute Engine VM
Size keytarget.hetzner.server_typetarget.aws.bundletarget.digitalocean.sizetarget.gcp.machine_type
Location keytarget.hetzner.locationtarget.aws.regiontarget.digitalocean.regiontarget.gcp.zone
Account of the first loginrootubuntuthe adminthe admin
Public addressthe server's owna static IP, keelbox-acmethe Droplet's owna reserved address, keelbox-acme
A resizechanges the type in placereplaces the instance, on a larger plan onlychanges the size in placechanges the machine type in place
The disk at a resizekeeps its sizegrows to the plan's sizekeeps its sizekeeps its size
Kept beside the snapshot at parkthe firewallnothing: a tag on the snapshot records whether SSH was admittedthe firewall and the box's tagthe two firewall rules
The firewall arrivesin the create callat create once the instance runs; at resume and resize once Lightsail accepts itat create by tag, when DigitalOcean applies it; at resume by id, and keelbox waits for itby network tag, once the VM exists
The server is marked withlabels keelbox=true and keelbox-box=acmetags of those namestags keelbox and keelbox-box-acmelabels of those names
The parked snapshot addsthe label keelbox-parked=truea tag of that namethe tag keelbox-parkeda label of that name
Resize, park and resume take, typically1 to 2, 1 to 2 and 1 to 3 minutesabout 9, 2 and 1 to 2 minutes2 to 3, 2 and 2 to 3 minutes2 to 3, 2 to 3 and 2 minutes

Times are for a box with little on its disk; resize and resume include their apply.

On all four:

  • keelbox resizes, parks and deletes only a server with those marks, together with the firewall and address it created for it.
  • The public address stays at a resize and is given up at a park.
  • The firewall admits Tailscale's UDP port 41641, and SSH until public SSH closes.
  • The server's first SSH host key is made on your computer and passed in at create. keelbox checks it at the first connection, then replaces it with keys made on the server. The same host keys come back at resume.
  • keelbox switches off a server that has not shut down after 5 minutes. DigitalOcean can take up to five minutes more. Google Cloud switches a VM off itself.

Hetzner

keelbox up uploads your SSH public key to the project and names it in target.hetzner.ssh_keys. Create and resume refuse without a key there, because Hetzner would set a root password.

The resize menu lists the types of the server's architecture that its location can deliver now, with a disk no smaller than the server's.

MessageWhat to do
Hetzner refused to create acme's server, ... or Hetzner lists server type ... as not orderable in ... now at createOn a terminal, keelbox up asks for another location, size or cloud. Otherwise run one of the commands the message ends with. After keelbox create, set target.hetzner.location or server_type to one the message lists, then run keelbox create acme again.
Hetzner refused to create acme's server again from its snapshot, ... at resumeThe box stays parked. Set target.hetzner.location or server_type to one the message lists, then run keelbox resume acme, or run it later.
a firewall named keelbox-acme exists ... without keelbox's labelsRename or delete that firewall in the Hetzner Console.

AWS (Lightsail)

Lightsail opens ports 22 and 80 on every new instance and takes other rules only once the instance exists. keelbox sets the box's rules once the instance runs at create, and keeps sending them at resume and resize until Lightsail accepts them.

The static IP keeps the address across stop and start. Without one attached, doctor warns static-ip, and a resize changes nothing and starts the instance again. Both print these commands:

aws lightsail allocate-static-ip --static-ip-name keelbox-acme --region REGION
aws lightsail attach-static-ip --static-ip-name keelbox-acme --instance-name acme --region REGION

Lightsail cannot change an instance's plan. To resize, keelbox snapshots the stopped instance, deletes it, and creates one of the same name from the snapshot on the larger plan. The menu lists only plans whose disk, memory and vCPUs are all at least the box's.

IfThen
The instance cannot be created on the larger plankeelbox creates it again on the old plan.
That fails too, or the resize is interrupted after the deleteThe box is parked, with its static IP kept. keelbox resume acme brings it back at the same address.
target.aws.bundle is smaller than the plan a parked snapshot was taken onResume exits before creating anything and lists the plans that fit.

Park releases the static IP, which Lightsail bills while unused, and resume allocates a new one.

A new Lightsail instance makes new SSH host keys unless a file on its disk tells cloud-init to keep them. Apply writes that file, /etc/cloud/cloud.cfg.d/99-keelbox.cfg, on every AWS box. Resize and park exit with nothing changed without it; this puts it there:

keelbox apply acme

DigitalOcean

Without a terminal keelbox up needs --location: there is no default region.

DigitalOcean sets a root password on a new Droplet and emails it, unless the Droplet is created with an SSH key from the account. keelbox adds no key to the account; if the account already holds one of the admin's keys, keelbox names it at create and resume, and no password is set. Either way sshd on the box refuses root and passwords.

The resize menu lists the sizes the region can deliver, with a disk at least as large as the Droplet's.

The DigitalOcean API has no snapshot price, so the card prints DigitalOcean's published one, USD 0.06 per GB a month.

IfThen
keelbox is killed between starting the snapshot and tagging itAn untagged snapshot keelbox-parked-acme is left, which keelbox does not find. Delete it in the control panel, under Backups & Snapshots.
target.digitalocean.region is not the snapshot's region, or the size's disk is too small for the snapshotResume exits before creating anything, and names the region or the sizes that fit.
DigitalOcean does not report the firewall applied at resumeResume exits with Droplet ... runs, but ... and a doctl compute firewall get command. UFW on the box is in force meanwhile.

Google Cloud

Menus and cards name Google's pricing pages where the other clouds show a price.

At create keelbox makes these in the project:

WhatDetail
Firewall rule keelbox-acme-allowadmits SSH and Tailscale to the network tag keelbox-box-acme, priority 900
Firewall rule keelbox-acme-denyrefuses every other inbound packet to that tag, priority 901
Address keelbox-acmereserved, so it stays across stop and start
The VMa 50 GB pd-balanced boot disk unless target.gcp.disk_gb says otherwise; project SSH keys blocked, OS Login off, no service account

Doctor checks the login settings as cloud-login, and warns cloud-firewall-others when another rule of the network admits traffic to the box ahead of the deny rule.

keelbox up lists E2 machine types up to 8 vCPUs; --size takes any other x86 type. For a VM of another family, the resize menu adds that family up to 8 vCPUs, or twice the VM's if more.

The parked snapshot is named keelbox-acme-YYYYMMDD-HHMMSS, in UTC. At resume the boot disk keeps the size it had; target.gcp.disk_gb is not applied.

IfThen
The project has no default networkCreate exits and prints gcloud compute networks create default --subnet-mode=auto.
The organisation requires OS Login on every VMCreate and resume fail: a box logs in with the admin's own SSH key.
The VM has a second diskPark keeps the boot disk only, so it exits before its question and prints the gcloud compute instances detach-disk command.
The address cannot be released at parkPark finishes with a warning and the gcloud compute addresses delete command. A later resume uses that address.
The VM cannot be created at resumeThe snapshot is kept, and the address resume reserved is released.
A stop takes 2 minutes or morekeelbox notes that Google may have switched the VM off before its system shut down.

The first minute after a resume

A resumed server boots with everything on its disk running, before the apply at the end of keelbox resume. Two protections are not in place from the first second:

WhatWhereUntil
The cloud firewallDigitalOcean and AWSthe cloud reports it applied. keelbox waits for that before the apply.
The rule that refuses SSH to the box's new public address to every account but rootAWS and Google Cloudthe apply, which records the address in /etc/keelbox/outside-addresses.

Meanwhile sshd on the disk takes keys only and refuses root, and UFW denies incoming connections. Both cases: security model.

Edit on GitHub

Synced from keelbox/keelbox at e9770d0, 2 December 2026

On this page