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

  • What is the URL that you are using for nextcloud? It looks like you are only registering www as a subdomain. If you are trying to register ohiskyy.duckdns.org as the main nextcloud subdomain, it don't think that would work. I could never get nextcloud to work as a subfolder. I would also register nextcloud as a subdomain in letsencrypt and configure nextcloud.ohiskyy.duckdns.org as your nextcloud site.

  • @ohiskyy do you have any docker containers that are up and running properly... ie.. you've properly set up your appdata and data folders? Or is nextcloud and any other docker giving you trouble?


    You're using OMV 4, which isn't necessarily a bad thing... but I can't figure out why you're having so much trouble with technodad's videos on Nextcloud... as they are pretty thorough. If you can install Portainer (he has a video for this as well), I can post a docker-compose file you can use that should help you get this working, but you'll still have to edit some config files, etc...

  • Hello!


    I am able to get to the final stretch of this tutorial with letsencrypt returning a working cert and all my containers running without any error messages, but once I have all my containters up and running accessing my primary duckdns url gives me a message:


    Welcome to our server The website is currently being setup under this address.
    For help and support, please contact: me@example.com



    When I try and access nextcloud, either via ip and :444 or my duckdns url, I get a message:



    I read through this thread and changed 'proxy_max_temp_file_size' 2048m to 1024m in my proxy prefs .conf file as it was giving me an error message.


    I also went through and tried both subfolder and subdomain methods, but both of them returned the same error message.


    It's safe to assume there's some misconfiguration in my config.php or my proxy confs subdomain / subfolder .conf files?


    Here are all three of them if anyone wouldn't mind taking a quick peek at them:


    1. config.php



    2. nextcloud.subdomain.conf



    3. nextcloud.subfolder.conf



    Is it bad to have both subdomain and subfolder conf files "activated" and without the .sample at the end. I've removed them occasionally, but haven't noticed any difference between having the opposing .conf file active while using the other method, but I guess it's worth a mention that both are currently active.


    Thanks for the help!

  • hi,


    for my knowlage nextcloud will only work with subdomain OR subfolder - your config looks like subdomain
    but

    Code
    array (
    0 => '192.168.1.112:444',
    0 => 'nextcloud.xxx.duckdns.org',
    ),


    is wrong, line 3 have to be

    Code
    1 => 'nextcloud.xxx.duckdns.org',

    its an array, and you change entry 0 two times ... ;)


    to access via letsencrypt just use:
    nextcloud.localip or nextcloud.your-duck.duckdns.org

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • Looks like you also posted the subdomain config in the subfolder part.
    Did you use the guide so far (docker-compose to set it up) so that letsencrypt and Nextcloud are connected in a docker network?
    For subdomain method did you specify a Nextcloud subdomain when setting up letsencrypt (SUBDOMAINS=www,nextcloud)?

  • Ah!


    Good catch, just a plum old mistake on my part. Switched out the array to 1 =>, and deleted my subfolder.conf file as to avoid any overlap.


    Once I did this I rand "docker-compose up -d" at my directory with the .yml file, restarted letsencrypt, ran "docker logs -f letsencrypt" and restarted nextcloud, but all is the same..


    Accessing nextcloud via nextcloud.xxx.duckdns.org, or localip:444 results in error messages, as does accessing omv via duckdns or localip.


    But thanks for the doublecheck, that would've definitely kept me bugged down if that was in the mix :D

  • Looks like you also posted the subdomain config in the subfolder part.
    Did you use the guide so far (docker-compose to set it up) so that letsencrypt and Nextcloud are connected in a docker network?
    For subdomain method did you specify a Nextcloud subdomain when setting up letsencrypt (SUBDOMAINS=www,nextcloud)?

    Ah yes I forgot to post my docker-compose.yml file!



    Yeah I used the docker-compose setup 1-to-1 as in the how-to, the subdomains have both www and nextcloud.
    My disk is called disk1 as to avoid confusion in the long naming strings this time around, and I have added a duckdns image / container into the mix as someone was advised in a related thread, but I don't know if its necessary as its not part of the primary how-to?


    I'm also puzzled by what you mean by "posting the subdomain config to the subfolder part", did I mess up posting it here or somewhere in my config files?


    Currently I tried and deleted the other (subfolder) config file, and now currently have this as my subdomain.conf file, but nothing has changed yet.



    Thanks for the help!

  • Just to be clear. The message is the "Welcome to our server"?


    I dont see any faults in the configs. Can you post the output of the access.log from /srv/dev-disk-by-label-disk1/appdata/letsencrypt/log/nginx directly after trying to connect to your url?

  • Just to be clear. The message is the "Welcome to our server"?


    I dont see any faults in the configs. Can you post the output of the access.log from /srv/dev-disk-by-label-disk1/appdata/letsencrypt/log/nginx directly after trying to connect to your url?

    This is what I see, so yes.


    Also when attempting nextcloud I get:


    My access.log (sorry if there's some extra, it was a long file so I copied the ones with the relevant timestamp.)




    Would there be any point in starting over, could there be something erroneously configured / set now that I have been trying out many different things?


    Cheers, and thanks again for the help!

  • @keinhen I’m no Linux power user but I have tried and failed (and succeeded) installing Nextcloud enough to know that when you get to “Welcome to Our Server” you are getting really close.

    • That means you have correctly/successfully set up your container and have generated a valid cert. Don’t start over!
    • Your config.php and Nextcloud....conf files probably just need fine tuning.
    • If you are knocking on the Nextcloud setup page but receiving error messages, then your files in #2 above are correct, and you just don’t have the right info inserted in the setup page. Go back to @macom’s [How-To] and follow that last section precisely. When I first used that guide I remember inserting information hanging around in my mind from previous guides, and kept wondering why I was getting those errors. Finally I decided to slow down and read each line of the final setup (slowly) and was amazed that it worked. I’m not saying this is your problem but it could be.

    Good luck.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • hallo again ;)


    can someone tell me what i have to add to the composer if i want use the onlyoffice integration in nextcloud? :)


    there is a "free" version that should work.


    thx (quick forum search tell me only some members got it, but no little how-to - don't like to research the wheel :P )

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • Onlyoffice is an app activated from within Nextcloud. Once Nextcloud is up and running you install/activate it under your user icon at the top right corner of the Nextcloud web page: /apps/Office & text

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • yeah found that,
    installed community server and onlyoffice integration, but can't get it working ...


    get 2 errors if i try to open a *.docx file
    "Community document server is not supported for this instance, please setup and configure an external document server"
    and
    "can't execute x2t binary, ensure php can execute binaries in the app folder"



    found this: https://github.com/nextcloud/d…erver_community/issues/10 but didn't help - but - they say must be a problem with the linuxserver docker image of nextcloud if i understand it right.



    so ... don't know - everyone got it working? maybe with a extra docker for the community server? ;)

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • Yes you can set up a docker. For nextcloud to connect to onlyoffice, a https connection is needed. So you need to include onlyoffice in the letsencrypt container.
    I’m on vacation right now so I can’t give you the configs right now.

  • @keinhen I’m no Linux power user but I have tried and failed (and succeeded) installing Nextcloud enough to know that when you get to “Welcome to Our Server” you are getting really close.

    • That means you have correctly/successfully set up your container and have generated a valid cert. Don’t start over!
    • Your config.php and Nextcloud....conf files probably just need fine tuning.
    • If you are knocking on the Nextcloud setup page but receiving error messages, then your files in #2 above are correct, and you just don’t have the right info inserted in the setup page. Go back to @macom’s [How-To] and follow that last section precisely. When I first used that guide I remember inserting information hanging around in my mind from previous guides, and kept wondering why I was getting those errors. Finally I decided to slow down and read each line of the final setup (slowly) and was amazed that it worked. I’m not saying this is your problem but it could be.

    Good luck.

    Thanks for the pointers!


    Reading through slowly and not rushing definitely usually is the key, but I am still left confounded. I guess the issue is with the config.php and .conf files, but I can't seem to find anything awry, and I have tried back and forth tweaking a few parameters relating to port numbers to double check for the all-to-probable human error i've added into the mix. I'll have to keep looking at them and referencing @macom 's howto! It's just a bit tough going line by line as I am using both the subdomain and duckdns variants listed in the comments to get things up and running, so there is no clear one page read-through :D maybe a cup of coffee on a less busy morning could be what gets this finally past the finish line.


    Thanks again!

  • but sounds good,
    so - ehm - i just stay on and wait till you will find some more time for me ;)


    letsencrypt and nextcloud is running (with macoms tutorial) ;)


    if it will help, i use subfolder cause my dyndns will not support subdomain but i like that dyn xD

    ___________________________
    OMV5@AsRock j3455 8GB RAM

  • @keinhen were you successful in accessing Nextcloud locally?


    @draddy I’ll be back in 3 weeks. This German guide (https://decatec.de/home-server…ce-mit-eigener-subdomain/ ) helped me.

    Before successfully obtaining the cert from letsencrypt, when I was still receiving error messages from "docker -f logs letsencrypt", I was able to access nextcloud locally.


    Now when I type localip:444, I receive security warnings that caution about proceeding to the website, like I used to have when I had a nextcloudpi instance running successfully. Also, if I forget the https:// prefix, I get this warning



    This also used to happen, so I take it as a sign I've gotten closer.


    But in short: no, I can't access nextcloud locally anymore.

  • @Morlan maybe you find something i do wrong ;)


    try to add to composer file like


    create a proxy conf:

    but got onyl


    502 Bad Gateway



    also with
    https://192.168.177.40:4433 i only get a "site not reachable"



    what i miss?


    this is in my test VM


    or is it wrong to try get it in the composer file? goal was to have that one file for all and have onlyoffice in the same network?


    also - in the appdata folder for onlyoffice is only the cert i created with the howto you linked - need to set other volumes?


    thx

    ___________________________
    OMV5@AsRock j3455 8GB RAM

Participate now!

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