Nextcloud / LetsEncrypt - Solution for exit code '125' / --network error

  • Hi everyone,


    here is my quick solution to the problem:


    2>&1' with exit code '125': docker: conflicting options: cannot attach both user-defined and non-user-defined network-modes. See 'docker run --help'.



    First of all, you don't need the extra argument --network xxx anymore. But first things first:


    • Create the letsencrypt container like in the TDL video only with the extra argument --cap-add=NET_ADMIN
    • Create a new network (i.E. my-net) in bridge mode and put your letsencrypt and nextcloud containers both in here
    • Putty or ShellinaBox:
      • docker restart
      • docker logs -f nameofyourletsencryptcontainer
      • now it will take some time to create the certificate:

        • It should show: Generating DH parameters, 2048 bit long safe prime, generator 2
          This is going to take a long time
          ......
          DH parameters successfully created - 2048 bits


          IMPORTANT NOTES:
          - Congratulations! Your certificate and chain have been saved at ...

      • docker restart
      • Edit letsencrypt file according to your conditions: nextcloud.subdomain.conf
      • Edit nextcloud file according to your conditions: config.php
      • Check if all ports on your router are forwarded correctly
      • restart nextcloud




    For me, it works like a charm. :)



    Regards

  • Hi,


    I ran into the exact same problem and I am really grateful for your posted solution.


    However, as a newbie, I am a bit unsure how to execute step 2: "Create a new network (i.E. my-net) in bridge mode and put your letsencrypt and nextcloud containers both in here"


    Just to make sure: Part 1 of that step is executed through the docker UI, in the networks tab, right? I get that part. And the two containers I add by choosing the relevant network in the settings of the relevant containers?


    I think I might have it right, just trying to verify before I start messing something up. :)


    Thanks in advance!

  • I got the same error at first, so I removed the "my-net" argument and I was able to start the container. After that I could access the "server setup" page on my duckdns domain. What I want to know what is the deal with the my-net stuff, why do we use it? It worked for me without it? Do I still need it? I'm a bit confused.

  • You attach the containers to a customized docker network so Dockers internal dns service can resolve the docker container names. This is needed so containers can interact with each other.
    That it works for you means that containers can find each other in some way. Either your edited the proxy-conf files to point at the ip address of your omv server or you used docker-compose (which automatically joins containers in a network) or maybe some other method I am not aware of.



    As a sidenote: when you edited the proxy-confs to point at an ip address it can cause your nginx reverse proxy to crash if the ip is not reachable (https://blog.linuxserver.io/20…rypt-nginx-starter-guide/)

  • (...)

      • Edit nextcloud file according to your conditions: config.php
      • Check if all ports on your router are forwarded correctly
      • restart nextcloud


    (...)

    Hello,


    thanks for your help! I almost got it done now. All the steps went smoothly untill... for some reason i still cant get to nextcloud via the subdomain (https://mysubdomain.duckdns.org).
    Despite double and triple checking the trusted domains section in the config.php and restarting the nextcloud container,i keep getting "Access through untrusted domain" error.


    Does anyone have an idea why my duckdns subdomain still does not get trusted?


    Update: i found my mistake. In my foolish first attempts i created two different folders for nextcloud. And i edited the config.php within the first obsolete folder. So my modifications did not have any effects. Its all good now!

    Einmal editiert, zuletzt von volka () aus folgendem Grund: Problem solved

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!