Nextcloud with Letsencrypt using OMV and docker-compose - Q&A

  • I have the same error what have you done?


    Runing OMV 5 and used macom´s instrustion.


    My nextcloud.subfolder.conf looks like


    and the config.php



    thx
    Niklas

  • think thats happens most of us non pros ;)


    your line 5 must go to the end - thats should be all


    maybe add to trusted_domains array
      1 => '192.168.1.1', or what ever is the local IP of your host
    in my case i don't need the :443 port - but, not sure ;)


    main "fail" is just line 5 that must go to the end ;)

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • Thats strange. In my setup i was able to go to https://myserverip:4433 and got a site which told me that onlyoffice is ready.


    Your compose file looks good to me.


    Maybe try this subfolder.conf

  • will give it a try later
    but you also used composer to integrate? maybe i miss something at the beginning? i just fly over until the
    "Installation und Einrichtung ONLYOFFICE" section

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • so i edit is like this but same think happend again



    Still
    Internal Server Error


    ngnix error log


    Code
    2020/02/07 19:04:52 [error] 384#384: *1 connect() failed (111: Connection refused) while connecting to upstream, client: ip, server: _, request: "GET /nextcloud/ HTTP/2.0", upstream: "https:/localip/", host: "mydns"
  • you restarted nextcloud and letsencrypt after changing this?



    but ... you now changed line 5 to the end, ok, why you add in line 5 a ), know? that will close your "$Config = array and the rest will still not load ;)


    here is my:


    i just add some commends (#) for you to make the arrays clear ;)


    hope it helps



    @Morlan yeah, looks like ;) will give it some try later the day and if i still hang on, i will "call" you to a new post ;) thx so long

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • Thanks a lot now i have the start page from nextcloud some stupid mistakes
    THX

  • @draddy Thank you! I went and reread my config file as well, and noticed the line 5 closed the config brackets before reaching the rest of the info, should've caught that earlier! Now I am able to get to the nextcloud admin creation page.


    I still feel a bit disheartened as now I'm having some kind of issue with mysql and mariadb..


    When I try and create an admin user in the nextcloud install wizard prompt I receive the error message:


    "Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'nextcloud.nextcloud_default' (using password: YES)"


    I followed the "How to" exactly, using my MYSQL_ROOT_PASSWORD as the password for the user "root", and then tried to make a MariaDB/MYSQL database with the database: nextcloud and database host: nextclouddb, which seems to line up with what's written in the docker-compose.yml file.


    I tried searching around for answers to the issue, and they pertained to creating a new database / user in CLI instead of the nextcloud wizard, but I didn't seem to have any luck following their instructions.


    Does anybody here have any experience with this very final issue? :D


    (Also, oddly enough I can only access the https://nextcloud.xxx.duckdns.org, all other URLS, including the localip:444 still send me to the "Welcome to our server" page. Is this normal?)

  • Well it’s normal. The 'overwrite.cli.url' =>  will change the other addresses.


    The MySQL error seems to come from a new version of MariaDB. I circumvented it by defining a nextcloud database when setting up the MariaDB container. For this method to work you first need to delete your MariaDB app data folder.
    Then add these environmental variables to the MariaDB section of the docker-compose.yml:



    Code
    - MYSQL_DATABASE=nextcloud
    - MYSQL_USER=nextcloud
    - MYSQL_PASSWORD=secretpassword

    this will create a database at the creation of the container. So again docker-compose up -d
    Then in the Nextcloud admin setup page you enter
    user: nextcloud
    database: nextcloud
    Password: secretpassword
    Database host: nextclouddb

  • Good to know about the overwrite!


    And also good to hear this isn't a new frontier for the people here either, will definitely give this a try.


    I went to /srv/dev-disk-by-name-disk1/appdata, but there is no "mariaDB" folder, there is letsencrypt / nextcloud / nextclouddb available. Are we talking about the nextclouddb, or should I have mariaDB named folder in here?


    Thanks again Morlan! You've been incredibly helpful with this.

  • soo, back to big problems -joke :P


    just if someone else try to get onlyoffice working with this setup here is my composer "extension" just add to end of the nextcloud composer file


    don't ask me the last line - but in my tests it looks like its needed this way ^^


    subfolder config for letsencrypt by @Morlan (works perfekt, thx m8)


    you need a local cert - just follow this steps line by line in cli: and fill in the informations needed (you can also skip most but: (Common Name (e.g. server FQDN or YOUR name)) is requiered) - here you enter your localip.

    Code
    mkdir -p /app/onlyoffice/DocumentServer/data/certs
    cd /app/onlyoffice/DocumentServer/data/certs
    openssl genrsa -out onlyoffice.key 4096
    openssl req -new -key onlyoffice.key -out onlyoffice.csr
    openssl x509 -req -days 3650 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
    openssl dhparam -out dhparam.pem 4096
    chmod 400 onlyoffice.key
    chmod 400 onlyoffice.crt
    chmod 400 onlyoffice.csr
    chmod 400 dhparam.pem


    after this is all done compose the docker docker-compose up -d


    if all went ok - you should see a "Thank you for choosing ONLYOFFICE!" if you connect to https://<OMVIP>:4433


    know you can just add it to your next cloud (sry for german screenshot :P) (you will find this in Settings after Installing the "OnlyOffice" pack in your Nextcloud)


    soo, hm, just good luck ;)

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    Einmal editiert, zuletzt von draddy ()

  • I know you were working with @stinkycheese problems, but I just noticed your post and ran the command. Here's what I got.

    Code
    ii  docker-ce                        5:19.03.4~3-0~debian-buster         arm64        Docker: the open-source application container engine
    ii  docker-ce-cli                    5:19.03.4~3-0~debian-buster         arm64        Docker CLI: the open-source application container engine
    ii  docker-compose                   1.21.0-3                            all          Punctual, lightweight development environments using Docker
    ii  golang-docker-credential-helpers 0.6.1-2                             arm64        native stores to safeguard Docker credentials
    ii  python3-docker                   3.4.1-4                             all          Python 3 wrapper to access docker.io's control socket
    ii  python3-dockerpty                0.4.1-1                             all          Pseudo-tty handler for docker Python client (Python 3.x)
    ii  python3-dockerpycreds            0.3.0-1                             all          Python3 bindings for the docker credentials store API

    After trying docker-compose from the command line I tried to use the stacks tab in Portainer to run the yml file and I get this failure notice. Maybe that will shed some light:

    Hi,


    How did you solved your problem ?
    I have the same with my RockPro64 (really hesitating to by a HC2...).

    • Offizieller Beitrag

    @aldrick Here's an article that gives a work around to replace the new version of iptables in Buster to "legacy". Apparently the "new" iptables in Buster prevent Docker-network from working properly. I hope that helps. I'm assuming you are using OMV 5. If you are on OMV 4 then this is not going to help you.

  • hi,


    update for nextcloud 18.0.1 is available - but i only got a "Parsing response failed. File not found." error on the very 1st step with the buildin webupdater.


    can someone tell me the trick to get it working? ;)


    thx


    €dit: ok - done - 2 solutions:
    1. add (if not done) export port like 444 to the nextcloud 443 port


    2. remove the 2 lines from your config.php and restart nextcloud docker

    Code
    'overwritewebroot' => '/nextcloud',
      'overwrite.cli.url' => 'https://your.host/nextcloud',

    docker restart nextcloud


    3. connect to nextcloud via browser with
    https://<yourhostip>:444


    4. run the update from the webgui


    5. readd the 2 lines from stepp 2 in config.php and restart docker


    solution2: (for me the "better" since i don't have to change files ...
    1. ssh to host


    2. run
    docker exec -it nextcloud sudo -u abc php /config/www/nextcloud/updater/updater.phar
    say yes to update
    say no to occ upgrade (will not work the default way)
    keep maintenance mode if ask


    3. run
    docker exec -it nextcloud sudo -u abc php /config/www/nextcloud/occ upgrade


    4. run
    docker exec -it nextcloud sudo -u abc php /config/www/nextcloud/occ maintenance:mode --off


    5. connect to your nextcloud like you always do - done.



    keep playing!
    draddy

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    Einmal editiert, zuletzt von draddy ()

  • I'm getting an error when trying to obtain my letsencrypt cert. I'm using the free provider SPDNS.ORG. It seems that my domain is not reachable when you add the "www" in front of it.


    The exact error messages look like this:


    Performing the following challenges:
    http-01 challenge for http://www.mySPDNS.org
    Challenge failed for domain
    ...
    Domain: http://www.mySPDNS.org
    Type: dns
    Detail: DNS problem: NXDOMAIN looking up A for
    http://www.mySPDNS.org - check that a DNS record exists for
    this domain




    Is that something I can fix? I tried without the subdomain parameter, but then this happens:


    The following errors were reported by the server:


    Domain: mySPDNS.org
    Type: connection
    Detail: Fetching
    http://mySPDNS.org/.well-known…z8sgLBjd73c1vjhBJmXtS3WA:
    Connection refused


    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

Jetzt mitmachen!

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