github amayer1983/docksentry v3.0.0-beta.1

pre-releaseone hour ago

The core rework, second half. Telegram, Discord and the Web UI now ask one
place for hosts, targets, the queue and update results, so they answer
alike there. Hosts update side by side, a cleanup waits instead of
being skipped, and from 3.0 on, a self-update that doesn't stay up goes
back to the version that ran.

Upgrading to 3.0

This beta is on :beta only, :latest stays on 2.19.x. /selfupdate takes no beta numbers, so to try it set the image tag in your compose file to :beta. No setting was renamed, moved or removed, and no default changed.

  • A new instance asks for a setup code. With the Web UI on, an instance without a password prints Setup code for this start: … into the container log. Until you set a password or tick "no password", every change in the Web UI wants that code, scripts and API calls included, and Telegram and Discord don't take /restore. That also covers an instance nobody set up, one that runs on environment variables only for example. The code is new on every start. With a password, or open by choice, you won't see it.
  • Saving something else no longer locks a new instance. Since 2.19.0, with the Web UI on and no password, any save that wasn't the setup wizard (/debug or /lang in a chat, for example) locked the Web UI for good. Now only a saved password or the "no password" tick counts as set up, and an instance that got locked that way starts open again and asks for the setup code. A settings.json that 2.x moved aside as damaged keeps the lock, even if a new one was saved since. One that was deleted on 2.x and saved again leaves no trace, so that instance starts open with the setup code too. An instance that ran on WEB_PASSWORD alone opens with the setup code when you take it away, where it used to lock.
  • An empty saved password is named at the start. A settings.json from an old version that still holds "web_password": "" overrules WEB_PASSWORD, so that instance runs without a password and asks for the setup code, where it used to lock. The start log now says so: take web_password out of settings.json and restart.
  • Changes go by POST only. GET /api/check answers 405 now. A script that starts a check sends POST with an Origin or Referer header that matches the address it calls. Logging out and finishing the setup are POSTs too. The pages also can't be shown in another site's frame any more, so a Homarr, Organizr or Home Assistant iframe panel stays empty.
  • Backups leave secrets out unless you ask. The Web UI's export link, Telegram /backup and Discord /backup no longer carry the Web UI password, bot tokens, webhook URLs or addresses with credentials in them, and restoring such a file keeps the ones you have. The copy in /data/backups/ still has them. An export with everything needs a tick and your current password under Settings. A backup never changes the Web UI password or username while one is set.
  • A new instance turns away a backup without a password. In 2.20.0-beta.3 an older backup imported onto a new instance left it locked. Now the import refuses it before anything is written and says how: finish the wizard with a password first and restore under Settings, or bring an export with passwords. A backup with the "no password" choice still moves an open instance as it is.
  • Sign-in pauses after five wrong tries. From one address, Basic Auth included: a minute first, and twice as long each time five more misses follow, 15 minutes at most. It ends on its own, and an hour without a miss forgets it. Behind a reverse proxy everyone comes from the proxy's address, so a pause there hits all of them. Changing the Web UI password or username now asks for the current one. Forgot it? A password saved in the Web UI beats WEB_PASSWORD. Stop the container, take web_password out of settings.json in the data directory, set WEB_PASSWORD and start it again. A username saved in the UI beats WEB_USERNAME the same way.
  • Telegram takes command words exactly. /ping no longer runs /pin, /notes no longer /note, /language no longer /lang. A command it doesn't know gets "Unknown command" in a private chat, and in a group only when it's addressed to the bot (/foo@yourbot), since a bare /foo there may belong to another bot. /debug on and /debug off set it rather than toggling.
  • A self-update keeps <name>_old until the new version stays up. The helper (<name>_updater) now watches the new container: healthy, where it has a healthcheck and the old one was healthy, otherwise 30 seconds running without a restart. With Docksentry's own healthcheck that's up to 280 seconds, never more than 15 minutes. Only then is <name>_old removed. While it watches, updates of your other containers and Telegram's restart-dependents button wait for it, and /restart, /selfupdate, the Web UI's Self-Update button and AUTO_SELFUPDATE answer "not now". A docker restart of Docksentry from outside in that window looks like a crash to the helper and rolls back.
  • If it doesn't stay up, it rolls back. When the new version exits, restart-loops, turns unhealthy or disappears, the helper removes it, renames <name>_old back and starts it. The same when Docker stops answering about it and the watch runs out that way; then the message says Docker didn't answer instead of claiming the new version failed. The old version says so on every channel, with the version, the reason and the new container's last log lines when the helper could write its log. A /selfupdate asked privately on Discord gets that answer as a direct message; only if that can't be delivered does it go to the channel, with a note why.
  • AUTO_SELFUPDATE skips an image that was rolled back. It leaves exactly that image out until a newer one is pushed under the tag. A rollback because Docker didn't answer isn't held against the image, so that one is tried again. /selfupdate and the Web UI's Self-Update button still take it. It also never switches to an image older than the version that runs.
  • The jump from 2.x to 3.0 is still swapped the old way. The helper script is built by the version that runs, so a self-update from 2.x removes the old container right away, as before. The watch and the rollback start with the first self-update from 3.0 on.
  • New files in /data. selfupdate_rolled_back.json is the helper's note after a rollback, read and removed at the next start. selfupdate_refused.json holds the id of the image the automatic self-update leaves out. The automatic check removes it once that image runs, so with AUTO_SELFUPDATE off it can stay. update_inflight.<host>.json is the note for an update in flight on a remote host (the local one keeps update_inflight.json), and update_inflight.kept.<host>.<name>.json a failed update's note kept for the next start. .setup_state says whether the instance was set up. pair_stepped_down.json is left by a <name>_old that stepped back after a reboot, or whose take-back a stop cut short, and is read and removed at the next start. selfupdate_watch_reply.json remembers who asked privately for a self-update while the helper watches, and goes at the next start after that.
  • Going back to 2.x is something you do on purpose. /selfupdate 2.19.3 (or that tag in your compose file) works, /selfupdate previous on this beta goes to the newest 2.19.x. The start then says "updated v3.0.0-beta.1 → v2.19.3" with the 2.19.3 notes, that's only the wording. If a start of 3.0 named both <name> and <name>_old after a failed update, sort those two out before you go back: 2.19.x doesn't read that note, and its next update of <name> removes <name>_old. With restart: always, a reboot inside the watch of that step back can leave both running, since 2.x has no check of its own: restart <name>_old (3.0 steps back by itself once it sees the 2.x stay up) or stop it. With unless-stopped only the 2.x comes back, and it clears the helper's log at its first start, so a <name>_old you start by hand then takes nothing back and just runs beside it. And set a password before you go back: 2.19.x locks the Web UI of a 3.0 instance that has none but saved anything. If you come back to 3.0 later, the password you set on 2.x still works, but 3.0 only counts the instance as set up once it saves something; until then, taking that password away opens it with the setup code instead of locking it.

Known limits

  • The self-update watch trusts the healthcheck only where it can. It goes by the healthcheck only when the old container was healthy. The shipped healthcheck asks the Web UI or Telegram; with webhooks only it always passes, so the watch ends with its first check, after about a minute. With e-mail and no Telegram, Web UI or webhook, the check never passes, so it's the 30-second rule, and a new version that dies later than that isn't rolled back.
  • On a Telegram install without the Web UI, a Telegram outage right after a self-update can roll back a good version. The healthcheck there asks api.telegram.org. If its first three checks fail, about three minutes from the start, the new version counts as unhealthy and goes back, and AUTO_SELFUPDATE leaves that image out until a newer one comes. /selfupdate still takes it.
  • A reboot during the watch leaves <name>_old stopped, not removed. If the host reboots or Docker restarts in those few minutes, the helper is gone. With restart: unless-stopped, the default in the compose example, Docker leaves <name>_old down, because the helper had stopped it: only the new <name> comes back. If that one doesn't stay up, docker start <name>_old takes it back as described below. With restart: always both come back. If the new <name> starts second, it stops <name>_old and keeps it with its restart policy set to no, and says so. If <name>_old starts second, it watches <name> for 30 seconds and steps back the same way when it stays up. If it doesn't stay up and the helper's log shows its watch was cut off, <name>_old does what the helper would have done: it removes the new container, takes the name <name> back with the new one's restart policy, leaves that image out of AUTO_SELFUPDATE, and tells whoever asked for the self-update. If Docker won't remove the new one or doesn't answer, the message says what to do by hand, and how to start the old one and set its restart policy back if it's stopped by then. A new <name> that comes back alone watches itself: 30 seconds, and where the old one was healthy before the stop, until its healthcheck's first verdict too, as the helper would. Once it has stayed up, a <name>_old you start later takes nothing back. If the helper itself goes away without a reboot (killed, removed by hand) while <name> runs on, its log still reads as a cut-off watch until <name> starts again, and a <name>_old you start beside a stopped <name> before then takes the version back. A new version that only dies after its own start has stopped <name>_old isn't caught, and each of its restarts stops <name>_old again: remove <name> first (its image stays), then rename <name>_old back and start it. Podman 4.9 can't change a restart policy, so there a later reboot can bring <name>_old up again; keep its image (podman tag) rather than renaming it if you want it. The next self-update removes <name>_old.
  • With a DATA_DIR that isn't a mount of its own, a rollback goes unexplained. The image always puts a volume on /docksentry, so this only happens if you pointed DATA_DIR somewhere else. The helper then has nowhere to leave its note and log, so the rollback still happens, but the start after it can't say why. AUTO_SELFUPDATE then doesn't know to leave that image out and takes it again, and updates of your other containers don't wait for the watch. A reboot inside the watch isn't put right there either: with no helper log there's nothing for <name>_old to go back by, and where no mount holds DATA_DIR at all, both come back with restart: always and neither steps back.

Changed

  • Updates on different hosts run side by side. An update on one host no longer waits for another, one host never runs twice at once, and each host works off its own queue. A self-update waits until no host is updating and then runs alone.
  • A cleanup during updates is queued instead of skipped. /cleanup, the Web UI button, the cleanup after auto-updates and the one after a disk warning wait for the updates and for a scheduled run to finish all its hosts. Then every container that ran before has to run cleanly for 30 seconds (and stay healthy, where it has a healthcheck and isn't marked trust-running), for 10 minutes, or HEALTHCHECK_MAX_STARTING if that's longer. If it doesn't get there, nothing is pruned, you get the containers that aren't right, and the rollback images stay.
  • An update that rebuilds a container with docker run doesn't go ahead when Docksentry can't write in its data directory. On a read-only or full /data nothing is stopped or renamed, and the result says why. The note it writes there is what lets a cut-off update be put right later. An update through docker compose keeps no <name>_old and runs as before. If /data fills up just before the rename, the result says the folder is full and what to do instead of a bare [Errno 28]. A history entry that can't be written is left out and no longer takes the message with it.
  • In Telegram, a batch of updates is one message that runs along. "Update all", /update <pattern>, a worked-off queue and the scheduled run open one message and edit it as each container goes. Only the opening, a failed container and the closing count come as messages of their own, the rest are edits. /check over several hosts works the same way, only a host with updates still sends its own message with the buttons. When Telegram is rate-limited or away, the status is sent again once at most, without a sound, and nothing is held back to go out later.
  • "Updates available" in Telegram is tidier. The heading says how many and on which host ("🔄 2 updates · local"), the buttons sit two to a row without the size, the date line says "Image from …", and an update with the same date before and after says "new build from …".
  • A queued request says what runs. "Running now · local: web, 1/6, then 5 more", and that its turn comes after, in Telegram, Discord and the Web UI. Results name the host in the heading instead of on every line.
  • A host that doesn't answer is one short sentence, like "srv30 unreachable (Docker is not answering) · next try in 60 s", in Telegram and Discord alike. The raw Docker or SSH output goes to the log. "Update all" in Telegram, Discord and the Web UI carries on with the other hosts and says one line for the dead one.
  • A host that just failed is left alone by the monitor for a while too, a minute at first and up to 15. The scheduled check and updates you start always ask.
  • A tap in Telegram on a pinned or excluded container says why it isn't updated, like "📌 web: pinned — not updated" or "🚫 web: excluded from updates — not updated", instead of "not in update list", and without an "Updating web…" first.
  • While Docksentry is being stopped, nothing new starts. No channel takes or queues an update, the answer says why, and the queue it drops is named with the stop.
  • latest and beta only move forward. The release workflow leaves them where they are when a fix for an older line is tagged; that one gets its own version tag only.
  • After an update cut off mid-way, the start tells you the next update of <name> removes <name>_old. Rename it first if you want to keep it.

Fixed

  • A rollback on a flaky link never removes the only copy of a container. It removes and renames only when the host confirms the backup is there and belongs to this update, never brings back an older <name>_old, and says plainly "rolled back" only when the old container is back and started; otherwise it adds what went wrong, says where things stand, and the next start looks again. A refused rename to <name>_old starts the container again instead of leaving it stopped.
  • A link that drops right after a container's stop no longer reads as "auto-removed". The update goes on and asks the host again at every step. Where the host stays silent, the note is kept for the next start, and <name> isn't left stopped without a word. A lost link is recognised by what Docker and Podman actually say (over SSH they report it as an error, not with ssh's exit code), and a kill that finds the container already stopped counts as stopped.
  • A later update leaves a kept <name>_old alone while a failed update's note waits for the next start, and says so, in the history too.
  • An update cut off by a broken link keeps its note for the next start, and that start no longer says a running container needs a hand or was started again. Where the host doesn't answer, the note stays and it looks again. A host that isn't reachable when Docksentry starts keeps its note too, and recovery messages name the host.
  • A group dependent that can't be stopped is no longer recreated beside its running original. When a group's head is updated, or on Telegram's restart-dependents button, and a dependent's stop fails, that dependent is left as it is and the result says so. Where the host stopped answering, it says the dependent may be stopped or still running, and whether a restart of Docksentry looks at it again.
  • An update that ends before it rebuilds anything no longer lists Compose settings as "missing on the new container". That line came under a failed stop, a refused rename, or a link that dropped before the new container was started, where no new container was built.
  • If Docksentry was killed while an update waited for the new container, the next start removes <name>_old only when <name> stays up. It watches <name> for 30 seconds: running the whole time, no restart, not unhealthy. A container in a restart loop reads as running most of the time, so one look isn't enough. Otherwise both stay and the start names them. It used to remove <name>_old whenever a container named <name> existed, running or not.
  • The weekly report counts an update as rolled back only where the old container is back and running.
  • A /selfupdate asked during the automatic self-update check or during another /selfupdate starts once that one is done. It used to wait for good.
  • A self-update that breaks before its helper starts says so and leaves no "success" row in the history. One whose helper start hangs says it couldn't be confirmed, and one that didn't happen isn't reported as a self-update at the next start.
  • When the automatic self-update doesn't happen, the scheduled checks go on. They used to stop until a restart.
  • The self-update checks the image it pulled. If it can't be inspected, the automatic one doesn't swap and /selfupdate says it failed.
  • /selfupdate previous works on a beta.
  • A WEB_PASSWORD or a Web UI username with an umlaut works. The request used to end without an answer. The same for an API token in the Bearer header, and Basic Auth credentials that aren't UTF-8.
  • A schedule with a step of 0 (*/0) is refused instead of stopping the scheduler. The setup wizard checks the schedule the way Settings does, and the schedule help shows 0 18 * * * with its stars again.
  • The wizard and the import say plainly that a normal backup carries no password, and how to restore one.
  • A restore that fails halfway puts back what it already wrote, and if even that fails it names the files that may still hold the backup's data. One with a value it can't check stops with a message instead of an error, and an allow list in the backup that isn't a list is left out and named. Damaged or hand-edited entries in the state files are named in the log instead of taken over, and the audit log no longer loses entries when two parts of Docksentry write to it at once.
  • A BOT_LABEL change no longer makes the local backups delete their newest copies. The copies in /data/backups/ are pruned by their time now, not by their name.
  • A container that disappears mid-check no longer switches off every pin and opt-out label on that host for the run.
  • EXCLUDE_CONTAINERS wildcards (systemd-*) silence monitoring alerts too.
  • The dry run names the path the update really takes: remote hosts, multi-file and relative Compose labels.
  • In Telegram, /dryrun, /check <glob> and /update <glob> no longer say "up to date" when a host couldn't be checked, and /check on a single host whose Docker doesn't answer says so instead of going quiet after "Checking for updates...". Flag commands with @all name a host that doesn't answer, in Telegram and Discord.
  • /dryrun @nas runs on that host only, and a command followed by a newline instead of a space works the same.
  • A tap on an update button that was already used stops Telegram's spinner.
  • When several containers share an image, the result shows the old date and the version arrow for each of them, not "new build" from the second one on.
  • Long Discord messages arrive whole. A start with many recovery notes, for example, is sent in pieces under Discord's limit instead of going over it on the webhook or being cut off on the bot.
  • A dead notification channel no longer holds up monitoring. Alerts, the disk warning and the weekly report go out on their own thread.
  • "I'll do it manually" no longer brings back an update that finished at the same moment.
  • A Telegram button whose data is longer than Telegram takes is left out, and the message goes without it. /help works for /dryrun and for /help /.
  • An update window with times that can't be read counts as closed.
  • A note an older version left for a remote host's interrupted update is handled on that host.
  • Web UI: in the list view the Check button starts a check (it got a 404 and nothing happened), and selecting several containers and pressing Update sends them as one request with a banner that says what happened. Image Cleanup under Settings prunes every host like /cleanup, names them first when there are several, and shows what each one freed.
  • More of the Web UI follows the language setting: the backup import's question and answers, the "settings saved" note, the Telegram line under Settings › Info, and the wizard's Telegram badge and "Generic Webhook" label.
  • Several security hardenings.

New

  • HEARTBEAT_URL, off unless set: the scheduler pings an outside uptime monitor (healthchecks.io, Uptime Kuma and the like) every HEARTBEAT_INTERVAL seconds (60 by default, 30 to 86400), so you hear about it when Docksentry stops. The pings pause while a scheduled update run goes, so give the monitor a grace period longer than that. The loop goes round every 30 seconds, so an interval in between is rounded up (45 becomes about 60).
  • Discord /audit takes a host.
  • Discord /hosts check <name> works with a managed host's name, like Telegram's.
  • The start says which registry credentials it found in /.docker/config.json, or why none: no file, a directory instead of a file, or a credential helper the image doesn't have.
  • Images carry an SBOM, full provenance and the commit they were built from.

Don't miss a new docksentry release

NewReleases is sending notifications on new releases.