add "cloudsmith/caddy/stable:any-version"; to /etc/apt/apt.conf.d/50unattended-upgrades
Example:
// Automatically upgrade packages from these (origin:archive) pairs
//
// Note that in Ubuntu security updates may pull in new dependencies
// from non-security sources (e.g. chromium). By allowing the release
// pocket these get automatically pulled in.
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that unattended-upgrades
// should also install from here by default.
"${distro_id}ESMApps:${distro_codename}-apps-security";
"${distro_id}ESM:${distro_codename}-infra-security";
"${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
"cloudsmith/caddy/stable:any-version";
};
Link to comment chain (not sure how to add links in a federated way)
Unattended Upgrades only checks and updates programs in repos it knows about. As you found out, you'll need to add the custom repository to the Origins pattern in 50unattended-upgrades.
You can find a list of all repositories and their data using apt policy
Here are the custom repositories I have on one of my servers:
Look at the line starting with release and search for a combination that uniquely identifies the Caddy repository.
The output above is using the short form keywords, while the examples in 50unattended-upgrades use the long form. It's fine to use either.
One special case is the site keyword. This is the URL coming after origin in the output above and might be confusing.
Based on the apt policy output above, here's what I use to enable automatic updates for these repositories.
Using origin and codename follows the standard Debian repos and I'd recommend using that if possible.
Node doesn't provide a reasonable repo file, so I had to set site based on the URL behind origin in apt policy
You're right with the origin. codename or n in short form is any-version. ${distro_codename} won't match that, as it contains the codename for your distro release, like bookworm for Debian 12.
With any-version the repo owner's basically saying you can install this regardless of your distro version or they handle it on their end somehow.
Not exactly what you're asking for, but I'll share what I do. I'm using SaltStack to do config management and one of my salt states brings all packages up to date. This is done every 24 hours. I'm not suggesting you install SaltStack just for that but rather pointing out for people who use config management tools that those might be able to handle unattended upgrades.