Can't access my website via https

OK that part makes sense.

Production and Staging are completely different IPs.
Can you connect to staging?
Can staging connect to you?

Do you have firewall logs you can check?

Can not sure how to do that can you give me an example command?

So if my domain is example.ddns.net I should do the command
certbot certonly --webroot -w /usr/local/www -d example.ddns.net

check your LE logs:
grep http /var/log/letsencrypt/letsencrypt.log | grep directory | grep staging

2018-05-05 01:15:43,302:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/directory.
2018-05-05 01:15:43,935:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “GET /directory HTTP/1.1” 200 724
“keyChange”: “https://acme-staging-v02.api.letsencrypt.org/acme/key-change”,
“website”: “https://letsencrypt.org/docs/staging-environment/
“newAccount”: “https://acme-staging-v02.api.letsencrypt.org/acme/new-acct”,
“newNonce”: “https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce”,
“newOrder”: “https://acme-staging-v02.api.letsencrypt.org/acme/new-order”,
“revokeCert”: “https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert
2018-05-05 01:15:43,937:DEBUG:acme.client:Sending HEAD request to https://acme-staging-v02.api.letsencrypt.org/acme/new-acct.
2018-05-05 01:15:44,023:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “HEAD /acme/new-acct HTTP/1.1” 405 0
2018-05-05 01:15:44,027:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/new-acct:
2018-05-05 01:15:44,246:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “POST /acme/new-acct HTTP/1.1” 201 579
Location: https://acme-staging-v02.api.letsencrypt.org/acme/acct/6035707
2018-05-05 01:15:44,251:DEBUG:certbot.main:Picked account: <Account(RegistrationResource(body=Registration(status=u’valid’, terms_of_service_agreed=None, contact=(u’mailto:jschwrtz9@gmail.com’,), agreement=None, key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPublicKey object at 0x80952e090>)>)), uri=‘https://acme-staging-v02.api.letsencrypt.org/acme/acct/6035707’, new_authzr_uri=None, terms_of_service=‘https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf’), 935669f8efaf84eade404deff9dae9d0, Meta(creation_host=‘localhost.my.domain’, creation_dt=datetime.datetime(2018, 5, 5, 1, 15, 44, tzinfo=)))>
2018-05-05 01:15:44,286:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/new-order:
2018-05-05 01:15:44,401:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “POST /acme/new-order HTTP/1.1” 201 389
Location: https://acme-staging-v02.api.letsencrypt.org/acme/order/6035707/763349
https://acme-staging-v02.api.letsencrypt.org/acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y
“finalize”: “https://acme-staging-v02.api.letsencrypt.org/acme/finalize/6035707/763349
2018-05-05 01:15:44,404:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y.
2018-05-05 01:15:44,495:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “GET /acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y HTTP/1.1” 200 671
“url”: “https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096324”,
“url”: “https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325”,
2018-05-05 01:15:44,504:DEBUG:acme.client:Sending POST request to https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325:
2018-05-05 01:15:44,610:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “POST /acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325 HTTP/1.1” 200 230
Link: https://acme-staging-v02.api.letsencrypt.org/acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y;rel=“up”
Location: https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325
“url”: “https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325”,
2018-05-05 01:15:47,612:DEBUG:acme.client:Sending GET request to https://acme-staging-v02.api.letsencrypt.org/acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y.
2018-05-05 01:15:47,700:DEBUG:urllib3.connectionpool:https://acme-staging-v02.api.letsencrypt.org:443 “GET /acme/authz/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y HTTP/1.1” 200 1280
“url”: “https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096324”,
“url”: “https://acme-staging-v02.api.letsencrypt.org/acme/challenge/Ty5TyjqxISPKlH7rR13OpxPZpxMqIi7fJgm7lPh-l-Y/125096325”,

curl https://acme-staging-v02.api.letsencrypt.org/directory

Do you see html content or does it time out?

{
"keyChange": "https://acme-staging-v02.api.letsencrypt.org/acme/key-change",
"meta": {
"caaIdentities": [
"letsencrypt.org"
],
"termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf",
"website": "Staging Environment - Let's Encrypt"
},
"newAccount": "https://acme-staging-v02.api.letsencrypt.org/acme/new-acct",
"newNonce": "https://acme-staging-v02.api.letsencrypt.org/acme/new-nonce",
"newOrder": "https://acme-staging-v02.api.letsencrypt.org/acme/new-order",
"r1pi8zUBdGI": "Adding random entries to the directory",
"revokeCert": "https://acme-staging-v02.api.letsencrypt.org/acme/revoke-cert"

That is good.
That means you can get to staging.

The problem must be when staging tries to get back to you.

Check your names here: https://letsdebug.net/

says there is no problem
All OK

at https://letsdebug.net/your.domain/numbers
click “Show verbose information.” just below the green box.
Show the first blue box “LetsEncryptStaging

Challenge update failures for example.ddns.net in order https://acme-staging-v02.api.letsencrypt.org/acme/order/5751349/763852
acme: error code 403 “urn:ietf:params:acme:error:unauthorized”: Invalid response from http://example.ddns.net/.well-known/acme-challenge/nFqy9H5XKKrHv3c4fjwDSC9z3AOYFsh1ZyrkUbKGQ18: “<html>
<head><title>404 Not Found</title></head>
<body bgcolor=“white”>
<center><h1>404 Not Found</h1></center>
<hr><center>”

cant see all the tags.
edit your post (click the pencil icon) and add \ in front of all <
make all <
look like \<

HTTPCheck
DEBUG
Requests made to the domain
Request to: example.ddns.net/x.x.x.x, Result: [Address Type=IPv4,Response Code=404,Server=nginx], Issue:

I think I’ve come as far as I can go on this.
We would have to check the staging environment logs for your specific domain/IP.
And I don’t have access to either of those.
Maybe @schoen can help figure this one out for you.

Am I being overly paranoid by not sharing my domain name?Can I private message it to you so its not searchable on the site?

Yeah.
But that would only be half of the required pieces.
So, it’s really not that important right now (at least not to me).
In order for LE to help you will have to give them some info - you could do it in private message though and still maintain your paranoia level at 100% :wink:

If you like.
I could try some basic tests.
To which, I would ask that you place a TEST.TXT file in the challenge folder.

But my connections would come from different IPs.
So I’m not sure it would show anything - especially if it didn’t fail
Like the production system; it didn’t fail either.

so if I run the command
certbot certonly --staging --webroot -w /usr/local/www -d <domain_name>
I should get a congratulations message but the certificates won’t be saved if it works properly?

It would be “saved” as normal.
But the “certonly” would keep it from replacing a working cert.
Certonly means just get the cert and do nothing else.

All certs are kept, production, staging, even expired ones are all in the archive folder.

ls -l /etc/letsenrypt/archive/<your.domain>/
You should see multiple cert#.pem, chain#.pem, fullchain#.pem and privkey#.pem files
The symlinks in the
ls -l /etc/letsenrypt/live/<your.domain>/
would show you which of those # versions in now in use.

Interesting. I ran my script again and got the same error with certbot command in the script. Then I ran the command in the jail not from the script and got.
Congratulations! Your certificate and chain have been saved at: