In this article I’ll show you how to setup Cloudflare with nginx-proxy-manager so that we can proxy connections through Cloudflare and have full SSL setup.

Pre-requisites

  • Nginx Proxy Manager setup
  • Cloudflare setup

Steps:

  1. Visit your Cloudflare dashboard and navigate to the domain which you’d like to use
  2. On the side panel, under SSL/TLS, select the Origin Server option
  3. Thereafter, click create a certificate and choose your desired settings. The defaults should be fine for our purposes.
  4. Save the Origin certificate to domain.pem and Private Key to domain.key. Make sure to protect these or else someone can MITM your connection to Cloudflare.
  5. On the side panel, under Overview section, select how you would like TLS to behave. I have selected Full SSL option.
  6. Navigate to Nginx Proxy Manager admin page, on the top menu select SSL certificates
  7. On this page select “Add Certificate”, make sure it is the button which is next to the question mark box. Thereafter, select custom
  8. For certificate key select domain.key file and for certificate select the domain.pem file
  9. Now when adding a proxy, under SSL select our newly added certificate.