I ran this command: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-10" --agree-tos --authenticator webroot --email "contact@REDACTED.com.au" --preferred-challenges "dns,http" --domains "vaultwarden.strafebink.io"
It produced this output: See attached log output
My web server is (include version): Unknown
The operating system my web server runs on is (include version): Unraid
My hosting provider, if applicable, is: N/A
I can login to a root shell on my machine (yes or no, or I don't know): Yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot._internal.main:certbot version: 1.21.0
You are using Cloudflare CDN and looks like Cloudflare got a certificate for you. See here. They used Let's Encrypt to issue this cert.
That certificate is used for connections between a client (like a browser) and the Cloudflare edge. This is working fine with https and is secure. You have a problem between your server and the Cloudflare edge which explains the 502 Gateway error you see. You should probably setup a Cloudflare Origin CA certificate for use between your server and Cloudflare. This will be easier than using certbot to create one for that purpose.