Repository navigation
Conversation
…targets The runtime image is based on node:24 bookworm-slim, which ships no system CA bundle. Node bundles its own roots, so the app's own HTTPS calls work, but restic is a Go binary and reads /etc/ssl/certs. Every request to an HTTPS S3 target (seen with Cloudflare R2) failed with "x509: certificate signed by unknown authority", which restic treats as transient and retries without end, so `kept admin backup` and the snapshot list hung. Pinned to bookworm-security's version like the other OS packages. Fixes keptinventory#573
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Fixes #573.
The runtime image has no system CA bundle (
node:24 bookworm-slimships none, andos-basedoesn't install one). Node bundles its own roots, so Kept's own HTTPS calls work, but restic is a Go binary and reads/etc/ssl/certs. With an HTTPS S3 backup target (seen with Cloudflare R2) every restic request fails withx509: certificate signed by unknown authority. restic treats that as transient and retries without end, sokept admin backupand Admin → Status's snapshot list hang instead of failing.This adds
ca-certificatesto theos-baseinstall, pinned like the other OS packages to bookworm-security's version,20250419~deb12u2(architectureall, read from the Debian archive on 2026-11-18).ha-osbuilds onos-base, so the Home Assistant image gets it too.What changes for people who run Kept: backups to AWS S3, R2, B2 and other HTTPS S3 endpoints work without a workaround. Until this is released, the workaround is mounting the host's CA bundle and setting
SSL_CERT_FILE(whichPASSED_ENValready forwards to restic); see #573.Verified on a running install: with the host's bundle mounted through
SSL_CERT_FILE, the same R2 target backs up normally, and the officialrestic/restic:0.19.1image (which has CA certificates) reaches it at once.Checks
bash scripts/ci-local.shpasses (or--fast, and say which steps you couldn't run): not run. The change is the Dockerfile only. Locally I built--target os-baseon amd64: the pin resolves,/etc/ssl/certs/ca-certificates.crtis there, and restic in that stage reacheshttps://s3.amazonaws.com(a dummy key getsAccess Deniedat once, no x509 error). The full image, arm64 and the smoke test are left toimages-amd64/images-arm64.