Problem with Letsencrypt and Nextcloud Configuration on Docker.

  • Hello


    I'm having troubles with Letsencrypt, Nextcloud and I receive this message.

    Welcome to our server

    The website is currently being setup under this address.

    For help and support, please contact: me@example.com


    I have read some posts in this and other forums, trying to change pieces of code, reinstall Nextcloud, permissions on the folders but nothing is working for me.


    The domain is basscloud.duckdns.org. nextcloud is the name of the container and 444 the internal port of this container.


    Nextcloud.subdomain from letsencrypt (I have some thinkings about upstream_nextcloud and ports

    Code

    Display Less



    config from nextcloud docker: The trusted domain number 2 is to access via 444 port without https and ssl certificate while it doesn't work.

    PHP

    Display More



    Some ideas to try?? Tell me please!


    Sorry about me putting this information on another Thread.

  • Try to change proxy_pass $upstream_proto://$upstream_nextcloud:$upstream_port; with proxy_pass https://yourhostIP:444;

    Wher yourhostIP is your real host IP address, for instance 192.168.1.5:444


    If your Letsencrypt configuration is correct and your opened ports into your router too then it should work

  • I would not recommend the advice by VMax (sorry!).

    Are the nextcloud container and letsencrypt container connected in a docker network. When this is the case, no need to change any ip or ports (much more failsafe this way).


    What is the output of docker logs -f letsencrypt ? Any errors after Server ready. (exectt LuaJIT)?

  • I would not recommend the advice by VMax (sorry!).

    Are the nextcloud container and letsencrypt container connected in a docker network. When this is the case, no need to change any ip or ports (much more failsafe this way).


    What is the output of docker logs -f letsencrypt ? Any errors after Server ready. (exectt LuaJIT)?


    That is bottom of the log. The two containers are in the same network, called basscloud. I have also both in bridge network. It is necessary to delete from that network?

    Code
    [services.d] done.
    nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
    Server ready
    run-parts: /etc/periodic/weekly/libmaxminddb: exit status 6
  • run-parts: /etc/periodic/weekly/libmaxminddb: exit status 6 I unfortunately dont know what this error means. :(


    On my server it helped changing proxy_max_temp_file_size 2048m; to proxy_max_temp_file_size 1024m;

  • Its not that is doesnt work. But it is not necessary to change this config, because as long as the containers are connected in a docker network they can find each other through the docker dns service.

    The reason not to recommend it is that it adds another point of failure (typos, wrong ip, wrong port, etc).

  • I understand what you mean, what i wrote is the translation of all those code lines, just i give the result directly as i know which is it...

    I don't see any problem with doing this, also , if it don't work then he is sure that his trouble is somewhere else, probably in the configuration of nextcloud container.

    What i see reading his post again is that he set 444 as internal port of nextcloud container, instead, it should be the external one (host side to be clear) and the internal one (container side) 443... and maybe he made the same mistake with the 80 port, i don't know, he didn't post both the entire containers configuration....

  • what i wrote is the translation of all those code lines,

    that is not entirely correct. the advantage is that you dont have to expose nextcloud at all to your local network. This is also why it should not matter if he exposed the wrong port. Because port 443 will be automatically exposed (through the dockerfile config).

  • Could be the PUID and PGID configuration? Letsencrypt has PUID 998 and Nextcloud 911 (docker default).

    Its not that is doesnt work. But it is not necessary to change this config, because as long as the containers are connected in a docker network they can find each other through the docker dns service.

    The reason not to recommend it is that it adds another point of failure (typos, wrong ip, wrong port, etc).

    I will try to put all the information. (I pasted it from portainer)


    NEXTCLOUD


  • Hello. When I copy the information to you, I realise that the /config folder was wrong. I delete the container and made it another time, putting thecontainers in the same network and now it work like a charm!


    maybe it helps people in the same case. Finally de Nextcloud.subdoimain.conf is:


  • that is not entirely correct. the advantage is that you dont have to expose nextcloud at all to your local network. This is also why it should not matter if he exposed the wrong port. Because port 443 will be automatically exposed (through the dockerfile config).

    Maybe i didn't explane myself well enough, i never ment to expose nextcloud to the local network, the ip address i wrote is intended to be the host ip and the port the same; anyway, he found the mistake so that's the important thing.

  • All containers

    ok, I just did it on the letsencrypt container.


    ATENTION! I only changed the folder from docker GUI and the container lost the network "basscloud" (the one nextcloud and letsencrypt share) , with 502 Bad Gateway message after it. I put Letsencrypt restored in "basscloud" network and now works fine.


    We need to keep our view on details, since it could be a little error the cause of problem. (and waste of time).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!