Website timing out with Cloudflare as DNS provider

I’ve having some trouble with setting up my DNS with Cloudflare and
Let’s Encrypt. I’m following this guide, but it always times out when I try to go to the URL I set up on my registrar.

I don’t have port forwarding setup yet, but I don’t think that should matter as far as I know, because I’m connecting from a local computer.

i responded to you in discord, you need to follow the guide or do more troubleshooting (ie, show some logs from your router and your container and then hope someone is willing to assist)

Do you mind giving me a guide I can follow to set this up? I’m reading these but I can’t seem to figure it out from them:

I feeling like I’m missing something here about getting my domain to redirect to Nextcloud.

So I ended up just adding a new A record to Cloudflare that pointed to my local IP and that works. Now I have to troubleshoot the problem of getting this when I go to my domain:
Screenshot_2020-02-09 502 Bad Gateway

Welp for other people, fixed it by fixing my config.php:

<?php
$CONFIG = array (
  'memcache.local' => '\OC\Memcache\APCu',
  'datadirectory' => '/data',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://cloud.mydomain.com/',
  'overwritehost' => 'cloud.mydomain.com',
  'overwriteprotocol' => 'https',
  'trusted_domains' =>
    array (
      0 => '192.168.0.28:443',
      1 => 'cloud.mydomain.com',
    ),
);

just to add clarity for visitors, the issue was that the trusted domains array was outside of the main array.

<?php
$CONFIG = array (
  'memcache.local' => '\OC\Memcache\APCu',
  'datadirectory' => '/data',
  'trusted_proxies' => ['letsencrypt'],
  'overwrite.cli.url' => 'https://cloud.mydomain.com/',
  'overwritehost' => 'cloud.mydomain.com,
  'overwriteprotocol' => 'https',
);
  'trusted_domains' =>
    array (
      0 => '192.168.0.28:443',
      1 => 'cloud.mydomain.com',
    ),

like this, and he fixed it to what he shows to resolve the issue. There was also an issue in the upstream naming that was corrected on the letsencrypt proxy config.