Skip to content

History / Upgrading Container Optimized OS

Revisions

  • Bring the wiki in line with v3.0.0 and the major image tags Read every page against v3.0.0 and master (bitwarden_gcloud #114-#117). - Installation and the disk-loss recovery check out the newest release after cloning, and Cloud Shell Setup downloads that release's scripts, so new installs follow releases the way Updating Your Deployment does. - Updating Your Deployment looks the newest release up instead of hard-coding v3.0.0, and prunes images a tag change left behind. - Container counts include watchtower: seven on Caddy, four on a tunnel. - Instance Metadata lists the twelve files the cloud-config writes now, including make-private.sh and the home-directory links. - Migrating to a Data Disk sends a deployment still on pre-v3 code to the update, since the migration alone leaves its broken watchtower. - Operations says which tag each image follows and fixes a relative link that does not resolve on the wiki. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArPBUq2nqe2bkxtqPzAqiF

    @claude claude committed Nov 6, 2026
  • Move reasoning into numbered notes on the maintenance pages

    @dadatuputi dadatuputi committed Oct 23, 2026
  • Fix defects found by the third audit round, second sweep Instance-Metadata and Automatic-Restarts both told the reader to apply new metadata with gcloud compute instances reset, immediately after writing it. migrate-to-data-disk.sh carries a comment explaining why it does not: reset is a power cycle that neither flushes page cache nor unmounts, so a file written seconds earlier reaches the disk truncated and the fsck in bootcmd zero-fills the tail. That corrupted a vault's .env on a real run. Both pages now use an in-guest reboot, which is graceful and keeps the ephemeral address. The migration page put "set every .env value before you bring the stack up" between the command that brings the stack up and the command that sets the key, so a reader working top to bottom did exactly what the warning forbids. The blocks are now in the order the warning describes. Also: the recovery container-removal list omitted cloudflared and watchtower, so it left a name conflict on the tunnel path; two anchors on the upgrade page were left over from headings that used to contain a dash; removal of the timer was documented as regenerating the config without it, which nothing supports; removing user-data has different consequences depending on BWGC_RESTART_POLICY and now says so; and the README documented a verification command that reports an rclone error on the shipped configuration.

    @dadatuputi dadatuputi committed Aug 29, 2026
  • Fix defects found by the second audit round The deployment-shape test added last round was wrong. It branched on which path "ls -d /mnt/... ~/... | head -1" returned, but ls sorts its operands and /home sorts before /mnt, so on a migrated deployment, which has both because the migration leaves a symlink, it always returned the home path. Every migrated reader was told they had no data disk and skipped stopping the supervisor, which is the failure that section exists to prevent. It now branches on whether the unit exists. The recovery section told a reader whose old data disk survived to reattach it and run the migration against it. That rsyncs the restored copy over the surviving vault with --delete. It now says to mount it read-only and look first. .env.template shipped BACKUP_EMAIL_NOTIFY=true with every SMTP setting commented out. backup.sh runs under set -u and reads SMTP_SECURITY as soon as notifications are on, so a default install exited with "unbound variable" before writing any backup, and the weekly check that exists to catch stopped backups died at the same line. Also: aborting the upgrade at the delete prompt left a stopped instance and a detached disk with no documented recovery; removing the user-data key was described as harmless when it carries the disk mount; the mail test on Email-Providers could not succeed on a healthy deployment; and the tunnel page claimed a downtime window that did not match its own step order.

    @dadatuputi dadatuputi committed Aug 29, 2026
  • Fix ten blockers found by a cold-reader audit The migration page said aborting was harmless. Past the Proceed? prompt it is not: the reboot question arrives after the stack is down, the restart policy is set to no and the metadata is replaced, and answering no there leaves the vault stopped with the script refusing to re-run. It now says so and gives the reboot that recovers it. Registration was never mentioned anywhere in the wiki, while SIGNUPS_ALLOWED ships true. Step 11 now closes it. The restore command omitted RESTORE_FORCE, which the backup container requires because it has no Docker socket, so the documented recovery could not run. It now carries the flag, a way to find a real filename, and a success criterion. The tunnel switch pointed DNS at a tunnel two steps before that tunnel started, and omitted --overwrite-dns, which is required to replace the A record every reader of that page has. The steps are reordered and the page states that the vault is down while you work. Its systemctl commands are now marked as applying only to migrated deployments, which is the shape the same page says may not apply. Also: the Caddy path never created its DNS record; mkfs.ext4 -F carried no warning on a page a reader may re-run with a populated disk; Automatic Restarts named a file the script does not write; fail2ban, countryblock and ddns did not say they are inactive on the default path; and a four-command paste block set a backup encryption key published in this wiki. Register: 81 em dashes and 14 bold lead-in paragraph openings removed, verdict headings replaced with plain nouns.

    @dadatuputi dadatuputi committed Aug 29, 2026
  • Correct the last details a full clean run turned up The final verification run completed every phase and both recoveries with no blocker. These are the remainder. Step 4's settings table had its separator below the first data row, so GitHub promoted BACKUP_ENCRYPTION_KEY and its whole description into the header and the two settings read as different kinds of thing. It has a header row now. Step 5's sample plan omitted the line the script prints directly above it, naming the data disk it read from the instance. On the recovery path, reusing the same disk name makes the regenerated configuration identical to what is already set, so gcloud answers "No change requested; skipping update" immediately after a keystroke the page has just called mandatory. The page now says that is the correct outcome. Step 2's listing also contains instance-<name>.json, a configuration dump the upgrade saves, which is often the newest entry and is not a backup.

    @dadatuputi dadatuputi committed Aug 28, 2026
  • Fix the recovery path's last blocker and make it findable A tester ran the recovery end to end twice, encrypted and unencrypted, and both produced a working vault that survived a hard reset. Step 6's rewrite holds: the restored stack runs as compose project bwgc-restore while Step 6 removes bitwarden_gcloud_*, so the cleanup provably cannot touch it. These are the remaining defects. Step 7 issued gcloud commands without leaving the instance shell that Step 3 put the reader in. Container-Optimized OS does not ship gcloud -- a fact Cloud Shell Setup states in its first line -- and INSTANCE and ZONE are Cloud Shell session variables that are empty there. It now says to exit first. Step 7 also hardcoded bwgc-data, the default, on the one path where the reader may well have used --disk-name, and where the old disk often still exists because the loss was a detach rather than a deletion. The name is a variable now, carried into the migration handoff, with both cases called out. That handoff raises a prompt the migration page never lists: because the instance still has metadata naming the lost disk, the script asks whether to replace it. Declining aborts and leaves the instance configured to mount a disk that is gone, so the next reboot has no vault. The prompt is documented where it occurs, and the migration page's blanket "pressing Enter is safe" is qualified for the one path where it is not. Step 6 told the reader never to delete ~/bwgc-restore. Step 7 then makes it a stale copy, and a second recovery fails because its first command clones into that path. Cleanup is now Step 8, gated on the vault working from the data disk. Finally, the section was unreachable: nothing in the sidebar, Home or the Backup page linked to a recovery procedure buried in a page about upgrading the OS. All three now point at it.

    @dadatuputi dadatuputi committed Aug 28, 2026
  • Stop the recovery procedure from deleting the vault it just recovered A tester ran the disaster-recovery path end to end, twice. It destroyed the recovery both times, and could not reach that point without an undocumented workaround first. Step 6 was written as tidying -- "the restore leaves a compose project of its own behind" -- and told the reader to run "docker-compose -p bwgc-restore down -v" and "rm -rf ~/bwgc-restore". But bwgc-restore IS the recovered deployment; the step before adopts it and says to log in and check your entries. Following the page left no containers, a dangling symlink, and the uploaded archives deleted, while the old project's network and cert volume survived untouched. Adoption is now its own step, it says in bold not to delete the directory, and only the old project's leftovers are removed. Step 4's first command could not run at all. Stopping bwgc.service does not free the container names: its ExecStop stops containers without removing them, so all six keep their names and the restore project collides on "/proxy". The stop step now removes them, and explains why that destroys nothing. Step 4 also started vaultwarden as a compose dependency and then asserted RESTORE_FORCE=true, which claims the vault is stopped. It was not. The Backup page warns in bold that restoring while vaultwarden holds the database open risks losing writes. It now uses --no-deps so the assertion is true. The restore does copy .env out, to bitwarden/.env.restored, which is simpler than the manual extraction the page described and was documented as impossible. Both are now covered, and the procedure ends by getting the deployment back onto a data disk rather than leaving it on the boot disk. Cloud Shell Setup Step 4 said the scripts refuse to run without an encryption key twelve lines above saying neither setting stops them. The refusal claim is gone and both configurations are described.

    @dadatuputi dadatuputi committed Aug 28, 2026
  • Rewrite Rollback around what the restore actually does A tester ran the documented restore chain end to end. It could not complete, and its central promise was false. The restore does not put .env back. The archive contains it when BACKUP_ENV was true, but backup restore only writes into the data directory, and .env sits at the archive root. The page said the opposite in two places, and following it left a stack whose proxy restart-loops on an empty EMAIL -- exactly the failure .env.template warns about. The procedure now extracts .env from the archive directly, with commands for both the encrypted and unencrypted cases. The prescribed minimal .env also could not start the backup container: with only the key it logs "Backup is not configured, exiting", and with BACKUP but no schedule it refuses to start and restart-loops. The restore then refuses again because it cannot reach the Docker daemon to confirm vaultwarden is stopped, which needs RESTORE_FORCE=true -- documented on the Backup page and neither repeated nor linked here. Two hazards the page never mentioned: bwgc-supervise.timer recreates the stack from the data disk every five minutes using the same container names, so it has to be stopped first; and the restore leaves a compose project and root-owned files behind, which Step 15's billing check does not cover. Also: --overlap was listed without the constraint that rules it out on the 15 GB data disk this wiki creates; the rollback command compounded the instance name; and three contradictions from earlier rounds are resolved -- "all three" versus "both", "four files" versus "all three", and a lead-in promising a block that was not there.

    @dadatuputi dadatuputi committed Aug 28, 2026
  • Support every backup configuration instead of insisting on one The pages had grown an opinion: that a backup must be encrypted and must carry .env, with the scripts refusing to run otherwise. That is the wrong trade. A backup existing matters more than how it is protected, and both settings are the operator's call. Only BACKUP is genuinely required, because without it there is no backup container and no backup at all. BACKUP_ENCRYPTION_KEY and BACKUP_ENV are now presented as choices, each with what it buys and what it costs, and the scripts report which case you are in before taking the backup rather than stopping. Cloud Shell Setup no longer asserts the archive is encrypted or that .env is inside it; it describes both outcomes and says the scripts will tell you which one you have. Rollback covers restoring from an archive that carries .env and from one that does not.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what a sixth end-to-end run exposed The run completed all three phases again. Every remaining defect is off the happy path, in rollback, recovery and cleanup. Two pages stated as fact that .env comes back from inside the backup archive. backup.sh only includes it when BACKUP_ENV=true, which ships false, so for anyone following these pages the archive held the database and nothing else. A restore would have come up with an empty EMAIL, which stops Caddy parsing its config, with an error naming the Caddyfile rather than the missing setting. The template now ships true, the maintenance scripts require it, and Cloud Shell Setup states the condition. The Rollback block cloned into ~/bitwarden_gcloud, which is a symlink to the data disk on every instance this wiki builds, so the clone failed. The block was newline-separated, so the next line landed in the live deployment and the line after truncated its .env. It now restores into a separate directory, chains with &&, and repoints the symlink only once the restore has succeeded. Cloud Shell Setup's routing table sends Automatic Restarts readers to Step 5, which downloaded three scripts and not the one that page opens with. Step 5's plan sample omitted the four lines saying the instance and its boot disk are deleted and that there is no way back, which is the screen the reader is being told to approve. The two Sizing sections disagreed on where the ceiling comes from; this page still said the boot size comes from the image, which the script does not do and the other page had already corrected. Also: "a replaced instance starts without it" was untrue of the documented upgrade, which reinstates the shim; the shim reinstall used ./ on a path under noexec /home; the prompt paragraph contradicted itself; Step 2 never said what a blank deprecation field means; and the gcloud listings pinned column sets that drift between releases.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what a fifth end-to-end run exposed The run completed all three phases again. These are the remaining inaccuracies. Step 7 was titled "Let it run" and showed one prompt. The script asks two, and the second fires after the stack is stopped and the data disk detached, with the vault offline and the script waiting indefinitely. Its only mention was in Rollback, a section read once something has already gone wrong. Both prompts are now tabulated where they happen, with what is true at each point. The Rollback restore procedure could not be followed. It named ~/bwgc-backups/ where Step 6 of the same page says the archive lands in ~/bwgc/bwgc-backups/; the archive is on Cloud Shell rather than the instance the block says to run on, and no step transferred it; and it ran docker-compose in a directory with no deployment, on a host the section posits is fresh. It now copies the archive up, clones the repo, and works in it. Step 15 built the address name from INSTANCE, which Step 8 has redefined to the replacement. The reservation is named after the instance that was upgraded, so the command could never match: upgrading "bitwarden" leaves "bitwarden-ip", not "bitwarden-129-ip". It now says to take the name from the listing, and that nothing to delete is the normal outcome. Also: the sizing sample showed the 10 GB boot case as the headline when most deployments arriving at that page have 30 GB, and showed the summary line without the warning and prompt that precede it; the "Done" line named the default disk, untrue for anyone who used --disk-name; and Home omitted Instance Metadata, which the sidebar lists, so it could not be found by browsing.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what a fourth end-to-end run exposed The run completed all three phases from these pages alone, so these are accuracy fixes rather than blockers. Step 4's bolded claim that every prompt defaults to no was false, and it was false about the one prompt that runs rm -rf. That is fixed in the scripts rather than the page: both yes-defaulting prompts now default to no, so the rule the page states is true. Steps 2 and 3 described the opposite of the order the script uses. The plan and Proceed? come first; the sizing decision arrives later, after a backup has already been taken. They are swapped, and the sizing step now says so. That step also claimed the script never stops on its own, contradicting both the Sizing table three sections below and the same table on the upgrade page. Two outcomes were being conflated: a vault too large for any free-tier disk stops, while a boot disk that already fills the allowance warns and asks. Step 15's cleanup command used $REGION, which nothing on the wiki ever exports, and an unfilled NAME with no example; it now derives both from the variables Cloud Shell Setup does export. Also: the upgrade options block's closing fence was a line too late, so its copy button appended a sentence to the option list; Step 5's sample was ls output under an ls -l command, on a listing the page asks you to check; and Step 6 named a backup directory that the documented setup never produces.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what a third end-to-end run exposed The prompt table added last round was written from the scripts rather than from a run, and was wrong three ways: it named a prompt that cannot occur on this path, omitted the sizing prompt that does, and claimed two prompts default to yes. Every prompt in both scripts prints [y/N] and defaults to no, so a reader following that advice and pressing Enter aborted their own migration. The page now states the rule instead of enumerating, and says the list is not exhaustive. The sizing section described a 10 GB boot disk throughout. The old installation instructions built a 30 GB one, so on the deployments this page exists for the free tier is already spent and a data disk always overshoots. The page now leads with that case, shows the warning and prompt the script actually prints, and says the overage ends when the COS upgrade rebuilds the boot disk at 10 GB. It also no longer promises the script "stops" when nothing fits; it prices the overage and asks. The upgrade page's option list was missing five real options, including --disk-name, which is what a reader who named their disk during the migration needs to get past Step 4. Also closes an unterminated code fence introduced last round: the copy button on that block was handing readers three paragraphs of prose plus two export lines that silently repointed INSTANCE and ZONE at the page's placeholders.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what a second end-to-end run exposed A tester following these pages completed the migration but not the upgrade, and could not have known the upgrade succeeded. "Wait through the steps" invited walking away from a script that asks four questions, two of which default to yes and one of which is printed after the entire cloud-config, twice. All four are now a table, with the script's own Step N/7 numbering explained against this page's steps. Step 7 gated removing the old copy on the Step 6 login, but the script offers that deletion at the end of its own run, before any login is possible. The page now says so and covers both answers. The prerequisite check was printed as literal INSTANCE and ZONE in both places it appears, unlike every other command on the page; pasted as written it fails on an invalid zone, and the routing table has no row for that error. The backup verification asked for an rclone backup unconditionally, printing a red ERROR on a correctly configured local-only deployment, immediately before the script deletes the instance. The billing check looked at unattached disks only. The upgrade reserves the external address in Step 7, and a reservation that stops being attached bills on its own, so addresses are checked too. "Set both keys" did not say that BACKUP names a method rather than taking a boolean, and both pages told the reader to run docker-compose on the instance in a form that only works from an interactive shell.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Correct what an end-to-end run of these pages exposed A tester following these pages on a fresh install could not complete the migration. The page now says what it actually requires and what it actually does. Migrating to a Data Disk did not mention that the script backs up through the backup container, which ships disabled: BACKUP and BACKUP_ENCRYPTION_KEY are both commented out in .env.template, and Backup is filed under optional configuration. Both are now listed before you start, with the check to run. Step 7's rm -rf could not remove the root-owned files the containers write, and left a half-deleted tree. It now uses sudo and creates the symlink the script would have made. Installation said the file was self-documenting and named a domain, DDNS and an email relay. It never mentioned EMAIL, which the Caddyfile interpolates into "tls {$EMAIL}"; empty, Caddy cannot parse the line and the proxy never starts, with an error that names the Caddyfile rather than the setting. The four required settings are now a table. Cloud Shell Setup's key check matched the commented-out template line, so a user with no key set was shown a comment and told to copy the value. It is anchored now and says what to do when nothing prints. The listing's byte counts were wrong by roughly half and would drift again, so they are gone; what matters is that all three files arrived, since curl -f writes nothing on a miss. The upgrade page's shortcut callout survived a renumbering: both anchors resolved to nothing and it sent readers to a Part 4 that does not exist.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Say what happens to the external IP during an upgrade The page told readers there was no DNS step because the ddns container repoints the record. That holds only when ddns has been configured with a provider; unconfigured it logs "no hosts to update" and does nothing, and the record is left pointing at an address that has gone back to Google's pool. upgrade-cos.sh now reserves the address before deleting the instance, so the replacement keeps it. The page says so, documents --no-reserve-ip, and states the ddns caveat.

    @dadatuputi dadatuputi committed Aug 27, 2026
  • Put the Cloud Shell setup in one place and route between the pages Opening Cloud Shell, setting the project, exporting INSTANCE and ZONE, recording the encryption key and downloading the scripts appeared on both maintenance pages and partly on Installation. Anyone doing the migration and then the upgrade did all of it twice. It now lives on one page, Cloud Shell Setup, which says which of its steps each task needs and links back to whichever page sent the reader there. Installation uses Steps 1-2 and 5; it cannot use 3 and 4, which point at an instance that does not exist yet. The upgrade page opens by routing rather than assuming. Upgrading is a disk swap, so it only works if the vault is already on its own disk, and one command distinguishes the two cases: a filesystem listed means carry on, "No such file or directory" means do the migration first. The migration page ends by handing the reader back. Instances built from the older Installation instructions keep everything on the boot disk, so that routing is the common case rather than an edge case, and the page says so.

    @claude claude committed Aug 27, 2026
  • Rewrite the documentation around the data disk and LTS milestones Installation created the problem the Maintenance pages solve. It built instances from cos-stable -- a rolling family that pins nothing, so an instance lands on whatever milestone was current that day and has no support window of its own -- on a single 30 GB boot disk, which is what makes replacing the OS a data migration. Installation now picks the newest LTS family, creates a 15 GB data disk alongside a 10 GB boot disk, and supplies the cloud-init that mounts it. A new install therefore starts in the layout the Maintenance pages assume, and never needs the one-time migration at all. 25 GB of the 30 GB free allowance, 5 GB spare. Disk creation is two commands rather than --create-disk, matching the form the scripts already use, and the vault disk is created independently so deleting the instance cannot delete it. Automatic Restarts documented reboot-on-update.sh installed through startup-script metadata. That still runs where it is configured, but the timer replaces it, and the page said nothing about why: /etc is tmpfs on COS, so units written to /etc/systemd/system are gone after a reboot. It now covers the cloud-init mechanism, verification, changing the window, and what it deliberately does not do -- move between milestones. Backup gains the status check. Two failures here are silent by default: a backup that stops running, because cron discards output, and a milestone that leaves support. Both are checked weekly and e-mailed. Nothing previously told anyone the check existed. The restore instructions are also corrected: stop the vault first, and the container now refuses rather than overwriting a live database. The upgrade page notes that anyone arriving straight from the migration can skip the two parts they have already done. Shell prompts removed from the code blocks on every page this work touches, so commands are copyable as written.

    @claude claude committed Aug 27, 2026
  • Split the one-time migration out of the upgrade walkthrough One page covered both moving the vault onto its own disk and changing COS milestone. The first is done once ever; the second every time. Anyone returning for a second upgrade had to work out which parts still applied. Now two pages, each standalone: Migrating to a Data Disk 12 steps, run once Upgrading Container-Optimized OS 20 steps, run whenever The upgrade page states the data disk as a prerequisite and gives the command to check for it. Both share the same session setup and prepare steps, generated from one source so they cannot drift. The slow disambiguation query is now optional and folded into a details block. It walks every image in cos-cloud and takes about a minute, and it only distinguishes a withdrawn LTS milestone from one that was never LTS -- which does not change what you do next. Also fixes a line that survived an earlier reorder claiming "every future upgrade is Part 4 alone", where Part 4 was the migration it appeared under. Sidebar and Home list both pages.

    @claude claude committed Aug 27, 2026
  • Do not assume the instance was built from an LTS family Step 5 composed cos-$MILESTONE-lts and read a NOT_FOUND as end of support. That is only sound when the milestone had an LTS family to begin with. There is no cos-<N> family. Milestone-pinned families are always -lts, and the rolling channels -- cos-stable, cos-beta, cos-dev -- carry no milestone number at all. The host used to develop this page was built from cos-stable-109-17800-0-51, whose family is cos-stable, so the check happened to give the right answer for the wrong reason: 109 was an LTS milestone whose family has since been withdrawn, but the instance never came from that family. Step 4 now also captures the source image from instance metadata, and Step 5 reports which family it belongs to before asking the support question. It distinguishes three outcomes rather than two: still supported, was supported and withdrawn, or never an LTS milestone at all -- the last being a beta or dev milestone, where NOT_FOUND means something entirely different. The two NOT_FOUND cases are told apart by asking whether any image ever carried that family. Verified against the full cos-cloud image list: 109 and 113 return non-zero and their families no longer resolve; 117 and 129 return non-zero and do resolve; 133 and 138 return zero, never having been LTS milestones. Also notes that deprecation on an individual image means only that a newer build exists, so it is not the signal to act on.

    @claude claude committed Aug 27, 2026
  • Derive the milestone and domain instead of asking the reader to substitute Step 5 said "substitute your number for 109", which meant editing the command before running it. That is the step where a typo produces a NOT_FOUND indistinguishable from a genuinely withdrawn family. Step 4 now captures the milestone into MILESTONE and Step 5 composes the family name from it, so both run unedited. Step 4 also says what an empty result means -- the SSH connection failed, not the parsing -- and how to check. The verification curls did the same thing with YOUR_DOMAIN. The domain is in the vault's own .env, so it is read from there. Verified against a live host: the milestone parses to a clean integer, composes to cos-109-lts, and that family returns 404 as expected for a withdrawn milestone. The domain parses to a bare hostname and both verification curls succeed against it. The project ID in Step 2 is the one value that still has to be typed. Nothing on the instance knows it.

    @claude claude committed Aug 27, 2026
  • Check whether the upgrade is needed before preparing to do it The walkthrough had the reader set a project, record their encryption key and download scripts before finding out whether their milestone was still supported. Someone on a current milestone did all that to learn they could stop. Parts reordered: set up the session, check whether you need this, then prepare. The check needs only a project and an instance name, both of which Part 1 already establishes. The available-milestone list is also derived rather than written down. It was a hardcoded "for m in 117 121 125 129 133 137 141" loop, which is wrong the moment a milestone ships. It now lists families from the image list, which omits deprecated images unless asked, so a family appears only while one of its images is current. Verified against the API: that yields exactly 117, 121, 125 and 129, matching what describe-from-family resolves, while 65 through 113 are correctly absent. The note attached to that step warned against reading image deprecation, which contradicted the command now used. Rewritten to explain why the default listing is the right thing to read and what --show-deprecated would break.

    @claude claude committed Aug 27, 2026
  • Download the three scripts instead of cloning the repository Cloning fetches the whole project to run two scripts. Step 5 now pulls just what is needed with curl. Three files, not two: both scripts source lib-bwgc-cloudinit.sh from their own directory, so it has to come along and land beside them. The step lists the expected result so a partial download is visible rather than surfacing later as a "command not found" inside the script. Also points out that these delete instances and create disks, and shows how to read them first. Downloading and then running is inspectable in a way that piping into a shell is not. Verified by downloading all three into an empty directory: both --help and --print-cloud-config work, so the library resolves correctly with no repository around them.

    @claude claude committed Aug 27, 2026
  • Set the project before anything else A fresh Cloud Shell has no project selected, so the first command in the walkthrough failed: gcloud compute instances list ERROR: The required property [project] is not currently set. Adds a step covering gcloud projects list, gcloud config set project, and confirming it, and quotes the error so anyone who hits it recognises the cause. Later steps renumbered.

    @claude claude committed Aug 27, 2026
  • Rewrite the COS upgrade page as a step-by-step walkthrough The page described what the scripts do. It now walks the reader through doing it: 26 numbered steps from opening Cloud Shell to confirming the vault serves from the new instance. Commands are copyable as written. No shell prompts inside code blocks, and expected output is shown separately rather than mixed in. Instance name and zone are exported once in Step 2, so every later command runs unedited. The steps that matter are given their own treatment rather than being summarised: reading the sizing decision, approving the reboot that proves the mount survives, noting where the backup was downloaded, and repointing the variable at the renamed instance before verification. Reference material -- free tier arithmetic, the sizing rule, both option lists, what the update timer cannot do -- moves below the walkthrough so it does not interrupt someone following along.

    @claude claude committed Aug 27, 2026
  • Rewrite the COS upgrade page around the two scripts, command line first The page documented a backup-and-restore rebuild. That approach was abandoned in favour of a persistent data disk, so the instructions no longer matched the scripts they were meant to describe. Now built around migrate-to-data-disk.sh and upgrade-cos.sh, with Cloud Shell assumed throughout. Every step shows the command and its expected output, including the failure modes: the NOT_FOUND error that signals a withdrawn milestone family, the sizing decision, and the stop message when no disk size both fits the vault and stays inside the free tier. Screenshots and the images directory are removed. Nothing here needs a picture, and placeholders would have to be filled in by hand. Adds the sizing rule, the free tier arithmetic including that the instance allowance is by time rather than by instance, a full options reference for both scripts, and the restore path with the .env chicken-and-egg spelled out -- the archive is encrypted with a key that lives inside it. Not pushed: the end-to-end run has not been performed, and the page says so. That caveat should come out once someone has followed it through.

    @claude claude committed Aug 27, 2026
  • Rebuild the COS upgrade page around backup and restore The first draft was built around moving vault data onto a separate persistent disk. That was the wrong default. It optimises an operation performed once every two years, and it does so at permanent cost: a systemd .mount unit, an extra disk against the free tier, and a reboot test before it can be trusted. Measuring the actual payload settled it -- 16 MB of database, attachments, sends, keys and .env. The backup container already packages exactly that. The page now leads with backup and restore, which needs no prior setup, works for every existing deployment today, and exercises the restore path users should be testing anyway. The separate-disk approach survives as an appendix with an honest statement of when it is worth the trouble. Corrects a mistake in the first draft that would have cost users money: it specified --type=pd-balanced. Only pd-standard falls under the free tier. Also records that snapshots are never free, which makes "keep a snapshot of the last good image" the one intuitive approach that generates a bill. Adds the free tier arithmetic, because the disk size chosen during the rebuild determines whether future upgrades are free. COS reserves about 4.2 GB regardless of disk size, and a clean deployment uses about 1.2 GB, so a 10 GB boot disk runs at roughly 20% and is the only size where the old instance, the new instance and a retained rollback disk all fit within 30 GB at once. The first upgrade cannot overlap, since the current 30 GB default cannot be shrunk -- disks only grow -- so both the accept-a-fraction-of-a-cent and the delete-first options are documented. Adds the slim-down step that should precede any rebuild: prune stale images, clear the unrotated vault log, then back up. One host reclaimed 2.6 GB of images and 595 MB of log. Spells out the restore chicken-and-egg. The archive is encrypted with BACKUP_ENCRYPTION_KEY and the .env holding that key is inside the archive, so the key must be recorded before starting and a minimal .env written on the new instance to break the loop. Drops the reserved static IP entirely. The ddns container repoints DNS when the stack starts, which removes the most tedious part of a GCE migration and was already shipping in this deployment. Screenshot placeholders regenerated to match the new steps.

    @claude claude committed Aug 26, 2026
  • Add a COS upgrade page, and document the fail2ban jail constraints Covers the gap between the in-milestone update timer and actually moving off an unsupported COS milestone, which the timer cannot do. Two parts: a one-time move of vault data onto its own persistent disk, then a repeatable OS upgrade that becomes a disk detach and reattach rather than a data migration. Verified against a live COS 109 host where it could be: systemd-escape is present and produces the documented unit name, /etc/fstab is empty as the page claims, and the stateful partition layout matches. The end-to-end migration itself has not been performed, and the page says so. Screenshot placeholders are committed under images/ with capture instructions in HTML comments, so the page renders without broken links and the notes disappear once real screenshots replace them. Fail2ban.md gains the two constraints that cost real debugging time: one jail that cannot initialize aborts the whole server rather than being skipped, and backend = systemd cannot work in this Alpine image. Records why there is no sshd jail and points at the firewall instead.

    @claude claude committed Aug 26, 2026