I ran into the same error message and was unable to update, until I found the following solution (with the help of ChatGPT, which analyzed the script for me):
The update.sh calls another script to check the versions of the necessary programs, “_modules/scripts/core.sh”. This script is only accepting docker compose versions starting with a 2, so the newer version 5 isn’t recognized as being new enough… 😕
Substituting the search for version 2 with a search for versions 2-9 solved the problem for me, now I was able to perform an update again. In anticipation of core.sh being changed back during the update, I kept the command in a little script, placed in the same directory as the update.sh:
fix-compose-version-check.sh
#!/bin/bash
sed -i \
-e 's/grep -e "\^2\." -e "\^v2\."/grep -E "^(v)?[2-9]\\."/g' \
-e 's/grep "\^2\."/grep -E "^(v)?[2-9]\\."/g' \
_modules/scripts/core.sh
So there is no need to downgrade to docker compose v2 and hold this program at that state.
Make that script executable with chmod +x fix-compose-version-check.sh and run it before running update.sh.
In order to provide this solution to everyone, it would be helpful to make a git commit, right? If someone is able and willing to do that, I can provide a patch, a commit message and a PR-description.
Best regards,
t_matze
Patch
file: _modules/scripts/core.sh
diff --git a/_modules/scripts/core.sh b/_modules/scripts/core.sh
index 4c7e3c1..9a2f8b7 100755
'--- a/_modules/scripts/core.sh
'+++ b/_modules/scripts/core.sh
@@ -XXX,7 +XXX,7 @@ get_compose_type(){
if docker compose > /dev/null 2>&1; then
'- if docker compose version --short | grep -e "^2." -e "^v2." > /dev/null 2>&1; then
'+ if docker compose version --short | grep -E "^(v)?[2-9]\." > /dev/null 2>&1; then
COMPOSE_VERSION=native
COMPOSE_COMMAND="docker compose"
fi
@@ -YYY,7 +YYY,7 @@ get_compose_type(){
'- if docker-compose version --short | grep "^2." > /dev/null 2>&1; then
'+ if docker-compose version --short | grep -E "^(v)?[2-9]\." > /dev/null 2>&1; then
COMPOSE_VERSION=standalone
COMPOSE_COMMAND="docker-compose"
fi
Important notice: due to the forum’s software recognizing - and + as markup for bullet list items, I had to escape them with an apostroph. All occurences of ' must be removed before applying the patch.
Commit Message
Subject
Relax Docker Compose version check to allow newer major versions
Body:
Docker Compose recently introduced major version v5, skipping v3 and v4
by design. The current version detection in core.sh only accepts v2.x,
causing newer Compose versions to be rejected incorrectly.
This change relaxes the version check to allow Docker Compose major
versions >= 2, with or without a leading ‘v’, for both native and
standalone Compose commands.
No functional behavior is changed beyond version detection.
PR description for github
Problem
Mailcow currently only accepts Docker Compose versions starting with 2.x
or v2.x. With the official Docker Compose release v5, which intentionally
skipped v3 and v4, this check incorrectly rejects valid and supported
Compose installations.
Solution
This PR relaxes the version check to accept Docker Compose major versions
greater than or equal to 2, with or without a leading v, for both:
- native docker compose
- standalone docker-compose
Scope
- Minimal change
- No behavioral impact beyond version detection
- Fully backwards compatible with existing v2 installations
Tested
- Debian 12
- Docker Compose v5.x (native plugin)
- Existing v2.x setups remain unaffected
[unknown]
Oops, I just now realize that in the December changelog this problem was already addressed and solved, so no need for committing anything in github anymore. Sorry for the noise. At least, ChatGPT helped me solve the problem basically the same way as the official patch.
https://mailcow.email/posts/2025/release-2025-12/
Oops, I just now realize that in the December changelog that MAGIC pointed to, this problem was already addressed and solved, so no need for committing anything in github anymore. Sorry for the noise. At least, ChatGPT helped me solve the problem basically the same way as the official patch.
https://mailcow.email/posts/2025/release-2025-12/
Oops, I just now realize that in the December changelog that MAGIC pointed to, this problem was already addressed and solved, so no need for committing anything in github anymore. Sorry for the noise. At least, ChatGPT helped me solve the problem basically the same way as the official patch.
https://mailcow.email/posts/2025/release-2025-12/
PS:
Oops, I just now realize that in the December changelog that MAGIC pointed to, this problem was already addressed and solved, so no need for committing anything in github anymore. Sorry for the noise. At least, ChatGPT helped me solve the problem basically the same way as the official patch.
https://mailcow.email/posts/2025/release-2025-12/
I must apologize: I intended to send this post scriptum only once, but when I clicked on “Post Reply”, I got an error message (“something went wrong”). Only after reloading the page, I saw that in spite of this error message, my post had been uploaded. I am not able to edit the post anymore. If some almighty mod wants to clean up, please feel free to do so.