Story

Backups the hub cannot destroy

If the hub is lost, its backups have to survive it. If the hub is taken over, its backups have to survive the attacker. Here is how Islandr writes them, how one bucket rule makes them undeletable, and what is still on you.

Christian Cohnen · November 2026

A backup the hub can delete is not a backup

Most backup setups give the server a key to its own backup storage. That key can usually write, and very often delete. Whoever gains root on the server gains that key too — and the first thing ransomware does on a machine is look for backups it can remove.

So the question is not only whether a backup exists, but who can destroy it. For Islandr the answer should be: not the hub, and not anyone who has taken it over.

The bucket only ever receives sealed files

Islandr writes its whole configuration to any S3-compatible bucket — Cloudflare R2, AWS S3, Backblaze B2, MinIO — daily, weekly or on demand. Each file is encrypted with AES-256-GCM before it leaves the hub. The key is 32 random bytes that Islandr shows you once as a line to copy onto paper, starting with IBK1-, with a checksum so a typo is caught before a restore is tried.

A small header stays readable — when, which host, which Islandr version — so you can pick the right file before typing the key. It is bound into the encryption, so nobody can swap it without the file refusing to open.

Every backup gets a name of its own, islandr-<host>-<time>-<version>.islbak. Islandr never overwrites a file and never deletes one; the code that talks to the bucket has no delete operation at all.

One rule makes the bucket refuse to delete

Islandr not deleting is a promise about Islandr. An attacker on the hub would use the hub's credentials directly. The bucket itself has to refuse.

Islandr hubtoken: read & writeno delete callencrypted .islbak fileYour bucketlock rule on islandr-backups/no delete, no overwriteAttacker on the hubuses the hub’s tokendelete: refusedKey on paperIBK1-…New hubrestores with key and file
The hub can add backups but not remove them. The bucket refuses every delete, whoever sends it, and a new hub needs only the file and the key on paper.

On Cloudflare R2 that is a bucket lock rule. It blocks deleting and overwriting objects under a prefix for a period you choose — or for ever — and it covers files already in the bucket as well as new ones. In the dashboard: R2 → your bucket → Settings → Bucket lock rules → Add rule, prefix islandr-backups/, retention for example 90 days. Or with Wrangler:

npx wrangler r2 bucket lock add my-backups keep-islandr islandr-backups/ --retention-days 90

Give the hub a token with Object Read & Write for this one bucket and nothing more. Changing or removing a lock rule needs a token that may edit the bucket's configuration, and that token never goes onto the hub. A delete attempt then fails with ObjectLockedByBucketPolicy, whoever sends it.

To keep the bucket from growing for ever, add an object lifecycle rule that removes backups after, say, 180 days. Lock rules win over lifecycle rules, so nothing goes before its lock period ends. On AWS S3 the same idea is an access policy without s3:DeleteObject, or S3 Object Lock.

There are no device keys on the hub to steal

The most valuable thing in a VPN's database would be the devices' private keys: with one of them, anyone can connect as that device. By default Islandr does not keep them. It generates a key pair, shows the private half once as a QR code or .conf file, and forgets it. The hub knows public keys only.

That holds for the backup as well: what the hub never stored cannot end up in a bucket. If you choose to keep private keys on the hub — Islandr offers that as an option, plain or encrypted — they travel in the backup, which is encrypted.

Restoring when the hub is gone

Install Islandr on a new machine, enter the bucket's details and the key from paper, pick a backup from the list and restore. Users, roles, devices, networks, grants, identity providers and webhooks come back. The audit log, sessions and traffic history stay with the old machine; they are its history, not its configuration.

One thing to keep next to the backup key: the hub's own WireGuard private key, from /etc/wireguard. Islandr does not back it up, because it belongs to the host. If the new hub uses the old key and the same host name, every device reconnects with the configuration it already has. Without it, every device needs a new one.

What this does not protect against