Hi,

I’m still fairly green in terms of Mailcow so please bear with me if the answer is obvious.

I just tried updating to the latest version which also includes switching from docker-compose v1 to v2. I did that and now update.sh reports some issues with colons in IP address. I opted for the Docker v6-Option if that matters.

root@mail:/opt/mailcow-dockerized# ./update.sh
checking docker compose version...
Found Compose v2!
Checking internet connection... OK
Checking for newer update script...
Updated 0 paths from 47a512ac
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] y
Great! Native IPv6 NAT is active.
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.

The only thing I found is some old discussion prior to docker-compose v2 being used where people said mailcown doesn’t yet work with v2 but it should now, right?

Any help is appreciated.

  • copart replied to this.
    • Best Answerset by Helmi

    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.

    I have the same problem. On my system docker-compose v1 is availabel and also docker compose v2. I’m on the latest May update and all was working fine up to the new version of June. What should we do?

    `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.`

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    Helmi

    did you run update.sh BEFORE updating to docker-compose v2?

      copart Actually I didn’t and got a respective error. So I put v1 back in place. Then it worked and updated itself and told me to run it again. I removed v1 binary again then and rerun it.

        Helmi is it now working on your side?
        What are the steps to proceed?

        I have now both versions on my system. I did it like in the mailcow documentation. Docker-compose down. Then remove v1 binaries. Run update.sh but I got the same error message. What I’m doing wrong?

          Hindin-The-G I have now both versions on my system. I did it like in the mailcow documentation. Docker-compose down. Then remove v1 binaries. Run update.sh but I got the same error message. What I’m doing wrong?

          The docs say:
          “If you are already running the mailcow stack with docker-compose v1, make sure you have shut down the mailcow stack and installed the latest update before upgrading to Compose v2.”

          So run update.sh once with docker-compose v1 to update the script, then disable v1 and enable v2 again.

            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

                  No one is typing