So, i just tried to install mailcow and everything went fine, until i tried the last step in the docs for installation, which is runnning docker-compose up -d:

WARNING: The WATCHDOG_NOTIFY_EMAIL variable is not set. Defaulting to a blank string.
Removing mailcowdockerized_nginx-mailcow_1
mailcowdockerized_memcached-mailcow_1 is up-to-date
mailcowdockerized_sogo-mailcow_1 is up-to-date
mailcowdockerized_olefy-mailcow_1 is up-to-date
mailcowdockerized_clamd-mailcow_1 is up-to-date
mailcowdockerized_ejabberd-mailcow_1 is up-to-date
mailcowdockerized_dockerapi-mailcow_1 is up-to-date
mailcowdockerized_watchdog-mailcow_1 is up-to-date
mailcowdockerized_solr-mailcow_1 is up-to-date
mailcowdockerized_redis-mailcow_1 is up-to-date
mailcowdockerized_unbound-mailcow_1 is up-to-date
mailcowdockerized_php-fpm-mailcow_1 is up-to-date
mailcowdockerized_mysql-mailcow_1 is up-to-date
Recreating a49de35c3104_mailcowdockerized_nginx-mailcow_1 ...
mailcowdockerized_postfix-mailcow_1 is up-to-date
mailcowdockerized_dovecot-mailcow_1 is up-to-date
mailcowdockerized_rspamd-mailcow_1 is up-to-date
mailcowdockerized_ofelia-mailcow_1 is up-to-date
mailcowdockerized_netfilter-mailcow_1 is up-to-date
Recreating a49de35c3104_mailcowdockerized_nginx-mailcow_1 ... error

ERROR: for a49de35c3104_mailcowdockerized_nginx-mailcow_1  Cannot start service nginx-mailcow: driver failed programming external connectivity on endpoint mailcowdockerized_nginx-mailcow_1 (deb2ecd401aa2d619387c6734710ca1486c35cac6e733a143ed1dc5587a8df49): Error starting userland proxy: listen tcp4 127.0.0.1:443: bind: address already in use

ERROR: for nginx-mailcow  Cannot start service nginx-mailcow: driver failed programming external connectivity on endpoint mailcowdockerized_nginx-mailcow_1 (deb2ecd401aa2d619387c6734710ca1486c35cac6e733a143ed1dc5587a8df49): Error starting userland proxy: listen tcp4 127.0.0.1:443: bind: address already in use
ERROR: Encountered errors while bringing up the project.

I use NGiNX on a Debian 10 Server and here something i think might be related to the error: For some reason my own website that I’ve made myself as a little project (in /var/www/) does not only show up with www.example.com which it’s meant to do (server_name www.example.com; in sites-available/sites-enabled config), but when i got to mail.example.com it shows the same contents as www.example.com ? Also my own Website i mentioned only listens on port 80 on ipv4 and ipv6
Help pls i have no idea what to do …

Edit:
It also didn’t create something like a mailcow.conf file or similar in etc/nginx/sites-available, I don’t know if that’s important but gonna add that on here

  • MAGIC

    • Forum Staff
    • volunteer
    Moolevel 48

Since you already have one webserver running you can’t run a second one on the same port which mailcow tries to do when you start the stack - hence the error message.

You may configure your local nginx as reverse proxy for the mailcow one. See more info on the docs: Redirecting...

    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!

    MAGIC but there is no NGiNX config for mailcow in etc/nginx/sites-available, should i just make one?

    • diekuh

      • Community Hero
      • volunteer
      Moolevel 110

    The reverse proxy configuration according to the docs is mandatory. 🙂

      • MAGIC

        • Forum Staff
        • volunteer
        Moolevel 48

      Yes you need to create a site conf for this then.

        MAGIC how should i call the site config? or does that not matter? also doesn’t a side config need more than that in it? again sorry for smol brain disease, try explaining it to someone who has less brain than a zombie pls

        Or try explaining it in German if you can explain it easier that way, I’m a native German speaker anyways, just like to always go for English support because it’s better/faster on most services and my English is definitely better than my understanding of mail servers, or servers in general tbh .-.

        • MAGIC

          • Forum Staff
          • volunteer
          Moolevel 48

        The file name of the config doesnt matter. It only need to contain the snipped which is in the docs.

          MAGIC Yeah i tried exactly that but that didn’t work and I’m still getting the same error, that’s why I asked that
          Doesn’t it need root and index specified in the site config? I tried with and without including root and index

          23 days later

          I still haven’t resolved this issue :T
          Right now I tried stopping NGiNX and then running docker-compose up -d which gets rid of the errors in the original post, but then NGiNX won’t start up again

          root@localhost:/opt/mailcow-dockerized# systemctl status nginx
          ● nginx.service - A high performance web server and a reverse proxy server
             Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
             Active: failed (Result: exit-code) since Fri 2021-05-28 17:13:56 CEST; 8s ago
               Docs: man:nginx(8)
            Process: 16096 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
            Process: 16097 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
          
          May 28 17:13:54 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
          May 28 17:13:54 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
          May 28 17:13:55 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
          May 28 17:13:55 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
          May 28 17:13:55 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
          May 28 17:13:55 localhost nginx[16097]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
          May 28 17:13:56 localhost nginx[16097]: nginx: [emerg] still could not bind()
          May 28 17:13:56 localhost systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
          May 28 17:13:56 localhost systemd[1]: nginx.service: Failed with result 'exit-code'.
          May 28 17:13:56 localhost systemd[1]: Failed to start A high performance web server and a reverse proxy server.

          I really don’t know what could possibly try to take up that port .-.

          • MAGIC

            • Forum Staff
            • volunteer
            Moolevel 48

          Well because you didnt really read the docs above?
          Change the ports in mailcow.conf and create a site…

            MAGIC which one, nginx conf or the one in the mailcow-dockerized folder? In any way, I tried doing that on both and it didn’t do a thing, out of frustration i also tried about a billion random ports and i get the same error with no matter which port, always says it’s already used by something else …

            I’m really getting tired of this by now .-.
            I kinda just wanna hop on a Discord call and share my screen with someone from support who actually knows what their doing (unlike me)

            itzMiney#0727

            If someone actually wants to do that then pls somewhere around early afternoon cuz I’m going to get some sleep now (CEST / GMT +1)

            5 days later
            21 days later

            bump
            Still didn’t resolve this .-.

            a month later

            i still haven’t resolved this, my brains computing power is too low for this .-.

            If someone from support has time I’d really like to solve this live in a Discord Call or something dunno

            No one is typing