Letsencrypt, nextcloud, duckdns with TDL video tutorial

  • I have been banging my head against the wall with this for a while watching all of TDL's videos on the subject and trying out a number of different edited configs and junk. To start off with I successfully had nextcloud working with mariadb just before attempting to add on duckdns and letsencrypt. I have managed to make it as far as getting my certs authenticated but I'm stuck at the "welcome to our server" page and I can't find a solution that works.


    I took a bunch of screenshots and put them into one picture to upload hopefully its easily readable. It feels like nextcloud and letsencrypt are having issues communication because if I take down letsencrypt and the code in the config files then nextcloud will just work normally in my browser but then I put them back and the "welcome to our server". Appreciate any help you guys can give me.


    Really hoping its something just simple and dumb that I've been overlooking.



    # make sure that your dns has a cname set for nextcloud
    # assuming this container is called "letsencrypt", edit your nextcloud container's config
    # located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
    # 'trusted_proxies' => ['letsencrypt'],
    # 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
    # 'overwritehost' => 'nextcloud.your-domain.com',
    # 'overwriteprotocol' => 'https',
    #
    # Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
    # array (
    # 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
    # 1 => 'nextcloud.your-domain.com',
    # ),



    server {
    listen 443 ssl;



    server_name nextcloud.*;



    include /config/nginx/ssl.conf;



    client_max_body_size 0;



    location / {
    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_nextcloud nextcloud;
    proxy_max_temp_file_size 1024m;
    proxy_pass https://$upstream_nextcloud:443;
    }
    }






    <?php
    $CONFIG = array (
    'memcache.local' => '\\OC\\Memcache\\APCu',
    'datadirectory' => '/data',
    'instanceid' => 'xxxxxxxxxxxxxxx',
    'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'trusted_domains' =>
    array (
    0 => '192.168.1.101:444',
    1 => 'nextcloud.subdomain-name.duckdns.org',
    2 => 'subdomain-name.duckdns.org:444',
    3 => 'localhost',
    ),
    'overwrite.cli.url' => 'https://nextcloud.subdomain-name.duckdns.org',
    'overwritehost' => 'nextcloud.subdomain-name.duckdns.org',
    'trusted_proxies' =>
    array (
    0 => 'letsencrypt',
    ),
    'overwriteprotocol' => 'https',

    'dbtype' => 'mysql',
    'version' => '15.0.0.10',
    'dbname' => 'nextcloud',
    'dbhost' => '192.168.1.101:3306',
    'dbport' => '',
    'dbtableprefix' => 'oc_',
    'dbuser' => 'xxxxxxxxx',
    'dbpassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxx',
    'installed' => true,
    );

  • in the nextcloud.subdomain.conf change
    proxy_pass https://$upstream_nextcloud:443; to
    proxy_pass https://$upstream_nextcloud:444;


    Also I don't see a container path for the letsencrypt container. And it seems the tz is missing in the nextcloud container

  • I set the container path and then whenever I run the docker command it gets set to the way you see it in the screenshot. When I'm able to work on it again I'll try the changes and get back to you. Appreciate the reply!!

    • Offizieller Beitrag

    I have been banging my head against the wall with this

    I'm convinced this is a prerequisite for a successful Nextcloud install.


    The first two install videos by @TechnoDadLife, here and here, are the ones to go with because they go together, and will give you what you want in the end. If you try to incorporate the later video on Letsencrypt (which is sort of a stand-alone video) you will run into trouble. I will say there is more than one way to do this. There are two domain name layouts: nextcloud.subdomain.duckdns.org, and subdomain.duckdns.org. In my example files you will find the latter layout and I have used "abc" as my sample domain. This gives you a much shorter domain name.


    I'll attach text copies of my config.php and nextcloud.subdomain.conf files, as well as some screen shots of my containers. The first two are from the Letsencrypt container, and the third one is from the DuckDNS container. Hope this helps.


    example-config.php.txtexample-nextcloud.subdomain.conf.txt

    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

  • so since I made that post I deleted the old openmediavault server and recreated it and ran through all the steps. Once again I was able to get nextcloud running the same as before and I've tried your guy's suggestions and I'm getting a 502 bad gateway now, which might be a good thing, but here's the catch is this openresty thing that I'm seeing. I guess I need to install openresty? I set this up in a virtual machine and have installed other dockers and plugins using TDL's videos and this is the first time I've had an issue.

  • what do you mean by properly? i ran the docker create network command as shown in the video but the --network my-net tag breaks my containers so i join them this way. I know that it would be ran as --network nextcloud but i had created it as my-net before and ran it as shown in the videos and it just breaks the containers. i saw people talking about doing it through the network gui like this but i never assigned them an ip address manually in the connection settings.

  • man I'm really at a loss. I really appreciate the help you guys are trying to give me but I've copied your settings and I even visited the guide that Morlan posted and read through it, which was very informative, and tried following the steps there but this thing just doesn't want to work. If I do it the way Agricola said I get an internal server error. If I go the duckdns validation route then I just get "welcome to our server". I just really don't know what I could possibly be missing.

  • It should be but I'm not able to convert it to the nextcloud. I realize that I shouldn't be having this much trouble with it. I'm gonna have a friend go over everything with me today step by step and be a second pair of eyes and hopefully he can catch what I'm missing.

  • I have it working now. I really appreciate the help. The only thing I changed this last time around is that my user account has full permissions, I'd been leaving it as vanilla, that I've been setting up the PUID and PGID for though its entirely possible that I was just typing something incorrectly consistently until I was going over everything very slowly and with an extra set of eyes on me.

Jetzt mitmachen!

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