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.
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
- Someone who controls the running hub can read its backups. The hub keeps the backup key so it can write scheduled backups. The lock stops that person from deleting anything, not from reading.
- The key on paper is the only copy that matters. Lose it and the backups are noise. Replacing it makes every older backup unreadable with the new one.
- A lock does not tell mistakes apart. A backup you would rather delete stays until its retention ends.
- The account owner is not locked out. Anyone who can sign in to your Cloudflare account with bucket-admin rights can remove the rule. Protect that account accordingly.