accolon I missed the shutting down part but how do i update to the latest version with v1 when getting the error? Doesn’t matter if I have the v1 binary in place or not. The error stays the same.

What I did (in error)

  • Installed Docker compose v2 via apt
  • removed the v1 binary
  • ran ./update.sh without errors (it updated itself and told me to rerun)
  • ran ./update.sh again and got the error
  • I put v1 binary back in place to make sure that’s not the issue - still got the error
  • now shut down the stack as you mentioned it (overlooked that one) and still am getting the same error.

I wonder if there’s any way out this mess :-/ Sorry for not reading the docs correctly. Not my kind of style usually.

So it doesn’t work for me.
I have now removed docker compose plugin with apt remove. Then run the update script and then already comes the error. Although I have uninstalled it but it still finds it?

`root@mail:/opt/mailcow-dockerized# apt remove docker-compose-plugin
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
docker-compose-plugin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 26.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database … 37443 files and directories currently installed.)
Removing docker-compose-plugin (2.6.0debian-buster) …
root@mail:/opt/mailcow-dockerized# ./update.sh
checking docker compose version…
Found Compose v2!
Checking internet connection… OK
Checking for newer update script…
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Native IPv6 implementation available.
This will enable experimental features in the Docker daemon and configure Docker to do the IPv6 NATing instead of ipv6nat-mailcow.
!!! This step is recommended !!!
mailcow will try to roll back the changes if starting Docker fails after modifying the daemon.json configuration file.
Should we try to enable the native IPv6 implementation in Docker now (recommended)? [y/N] N
OK, skipping this step.
Validating docker-compose stack configuration…
1 error(s) decoding:

  • error decoding ‘Ports’: Invalid ip address :: address ::: too many colons in address

Oh no, something went wrong. Please check the error message above.`

Ok, not sure if that is the solution but it seems to have worked for me.

Here’s what I did:

  • shut down the whole mailcow stack (docker-compose down)
  • I stepped back one git commit as explained in the docs
  • ran ./update.sh from there with v1 binary still in place (and v2 installed which doesn’t really conflict)
  • update.sh ran successfully telling me to run it again
  • I then set git back to the latest from master branch (git checkout master && git pull)
  • Then ran ./update.sh again and it ran through

Looks like things are finally up and running now for me. Let me know how it goes for you @Hindin-The-G but be aware that I didn’t really know what I am doing so now guarantee that this is how it’s supposed to go.

Hi, is not working on my side: I used the 2022-05-06_09_46_38. did I something wrong?

`root@mail:/opt/mailcow-dockerized# git log –pretty=oneline | grep -i “before update”
2595a02f1ceb308d823995b294e9e72b7c516e71 Before update on 2022-05-06_09_46_38
012ce959e16e198143539a9404f0c91dd385b251 Before update on 2022-03-28_13_52_06
eddaf7a9752592b5d9daae8cec79047d0b714901 Revert “Before update on 2022-03-02_17_04_05”
24275ffdbf6facaf38ae77a3094363b8e0a01f33 Before update on 2022-03-02_17_04_05
f7ff93a499e51cc603145757c80a495d015c9640 [Update] Stop mailcow before update
00395b99c68ae89ed8d5a83c2e9270641a6f2db0 Fetch origin before update check
root@mail:/opt/mailcow-dockerized# git checkout 2595a02f1ceb308d823995b294e9e72b7c516e71
M update.sh
Note: checking out ‘2595a02f1ceb308d823995b294e9e72b7c516e71’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b <new-branch-name>

HEAD is now at 2595a02f Before update on 2022-05-06_09_46_38
root@mail:/opt/mailcow-dockerized# ./update.sh
checking docker compose version…
Found Compose v2!
Checking internet connection… OK
Checking for newer update script…
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Native IPv6 implementation available.
This will enable experimental features in the Docker daemon and configure Docker to do the IPv6 NATing instead of ipv6nat-mailcow.
!!! This step is recommended !!!
mailcow will try to roll back the changes if starting Docker fails after modifying the daemon.json configuration file.
Should we try to enable the native IPv6 implementation in Docker now (recommended)? [y/N]
OK, skipping this step.
Validating docker-compose stack configuration…
1 error(s) decoding:

  • error decoding ‘Ports’: Invalid ip address :: address ::: too many colons in address

Oh no, something went wrong. Please check the error message above.`

    Hindin-The-G f7ff93a499e51cc603145757c80a495d015c9640 [Update] Stop mailcow before update

    I used that one instead - that’s the one right before that update to docker-compose v2, I figured. Not sure if that is the issue on your end but that one fixed it for me. Could as well be some other issue on your side, too - so not sure.

    Still not working on my end. Can someone help me?

    i have the same issue. mailcow is down. i cant even start it with docker compose v2 nor use the update script. can someone tell me how i can revert to v1?

    okay i fixed it for me:

    edit your mailcow.conf and add your ipv4 address in the HTTP_BIND and HTTPS_BIND section. after that run update.sh and be happy.

    I had both values empty before, for the dual setup. this was something docker compose v2 didnt like i guess.

    A litte hint in the docs would be awesome for this.

    hndrk Sorry the update.sh script is now working. But when I want to access the WebGUI I get now a certificate error and can’t connect as the name in the certificate is wrong?

    Install docker-compose v2.6.0

    sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
    sudo chmod a+x /usr/local/bin/docker-compose
    # Enable & start docker
    sudo systemctl enable docker
    sudo systemctl start docker

      Update docker-compose v1 to v2

      First: backup your server or take a snapshot

      Update os:
      sudo apt update && sudo apt upgrade -y

      Stop MailCow docker stack:

      cd /opt/mailcow-dockerized
      docker-compose down

      Install docker-compose v2

      sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      
      sudo chmod a+x /usr/local/bin/docker-compose
      # Enable & start docker
      sudo systemctl enable docker
      sudo systemctl start docker
      
      docker --version && docker-compose --version
       ./update.sh --check
      
       ./update.sh

      Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y

      Should we try to enable the native IPv6 implementation in Docker now (recommended)? [y/N] N

      Advanced Remove old images and unused volumes
      docker system prune -a –volumes (make sure all of the container are up and running: docker-compose ps -a )

      This is how I upgraded docker-compose v2 and it worked.

        numan
        What I’m wondering is, because you didn’t use the official documented way with the docker compose plugin, if you will have to switch again on december to the plugin.
        Why?
        the commands are slightly different:
        docker-compose
        is used on v1 and on your way.
        If you install the docker compose plugin as written in the docs it’s now:
        docker compose
        for now both commands are covered but i guess, after december the update.sh and stuff will only use docker compose

        4 days later

        numan hello, sorry for the late reply but we were on vacation.

        So the update works now, but I have a problem with the certificates afterwards. I have now entered my public IPv4 address in the mailcow.conf at HTTP_BIND= and HTTPS_BIND=. Otherwise the update script does not work for me. I also use MTA-STS and configured it with the parameters ADDITIONAL_SAN=mta-sts.feinler.net and ADDITIONAL_SERVER_NAMES=mta-sts.feinler.net. This all runs as said with docker-compose v1. After the update I now get the message that the name in the certificate is wrong. My hostname is MAILCOW_HOSTNAME=mail.feinler.net. But when I open the certificate in the browser then it says issued for mta-sts.feinler.net. But this is wrong. I have now already tried the following, but everything does not work.

        1. Ihave already removed the mta-sts.feinler.net entries from the mailcow.conf. Then started the update again. does not work.

        2. then I have deleted the certificates as described here mailcow.github.io Icon TLS-Zertifikate zurücksetzen - mailcow: dockerized Dokumentation

          but has also brought nothing.

        In the log of the ACME it says the following:

        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:18 CEST 2022 - Waiting for Docker API...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:18 CEST 2022 - Docker API OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Waiting for Postfix...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Postfix OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Waiting for Dovecot...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Dovecot OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Waiting for database...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Database OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:19 CEST 2022 - Waiting for Nginx...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:22 CEST 2022 - Nginx OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:22 CEST 2022 - Waiting for resolver...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:23 CEST 2022 - Resolver OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:23 CEST 2022 - Waiting for domain table...
        mailcowdockerized-acme-mailcow-1 | OK
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:23 CEST 2022 - Initializing, please wait...
        mailcowdockerized-acme-mailcow-1 | unable to load certificate
        mailcowdockerized-acme-mailcow-1 | 140599911742280:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
        mailcowdockerized-acme-mailcow-1 | unable to load certificate
        mailcowdockerized-acme-mailcow-1 | 140700120918856:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
        mailcowdockerized-acme-mailcow-1 | unable to load certificate
        mailcowdockerized-acme-mailcow-1 | 139668845890376:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
        mailcowdockerized-acme-mailcow-1 | unable to load certificate
        mailcowdockerized-acme-mailcow-1 | 140011596409672:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:23 CEST 2022 - Generating missing domain private rsa key...
        mailcowdockerized-acme-mailcow-1 | Generating RSA private key, 4096 bit long modulus (2 primes)
        mailcowdockerized-acme-mailcow-1 | .......++++
        mailcowdockerized-acme-mailcow-1 | ....................................++++
        mailcowdockerized-acme-mailcow-1 | e is 65537 (0x010001)
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:24 CEST 2022 - Generating missing Lets Encrypt account key...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:24 CEST 2022 - Valid email address, using daniel@feinler.com for registration
        mailcowdockerized-acme-mailcow-1 | Generating RSA private key, 4096 bit long modulus (2 primes)
        mailcowdockerized-acme-mailcow-1 | .......................................++++
        mailcowdockerized-acme-mailcow-1 | ..................................................................................................++++
        mailcowdockerized-acme-mailcow-1 | e is 65537 (0x010001)
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:26 CEST 2022 - Detecting IP addresses...
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:26 CEST 2022 - OK: 37.120.160.190, 2a03:4000:6:364c:741b:8ff:fe99:3fd1
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Found AAAA record for autodiscover.feinler.com: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Found AAAA record for autoconfig.feinler.com: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Found AAAA record for autodiscover.feinler.net: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:27 CEST 2022 - Found AAAA record for autoconfig.feinler.net: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Found AAAA record for autodiscover.kaufelds.de: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Found AAAA record for autoconfig.kaufelds.de: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Found AAAA record for mail.feinler.net: 2a03:4000:6:364c:741b:8ff:fe99:3fd1 - skipping A record check
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Confirmed AAAA record with IP 2a03:4000:0006:364c:741b:08ff:fe99:3fd1, but HTTP validation failed
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Cannot validate any hostnames, skipping Let's Encrypt for 1 hour.
        mailcowdockerized-acme-mailcow-1 | Thu Jun 16 11:26:28 CEST 2022 - Use SKIP_LETS_ENCRYPT=y in mailcow.conf to skip it permanently.
        mailcowdockerized-acme-mailcow-1 | OK

        I am now really at the end. Is this not working because of DNSSEC or is there something wrong with Docker? I have disabled the correct ufw firewall. What else can it be, it seems like it can’t get the HTTP request through? but why, and why did everything work when setting up with docker-compose v1?

        No one is typing