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:
- Visit your Cloudflare dashboard and navigate to the domain which you’d like to use
- On the side panel, under SSL/TLS, select the Origin Server option
- Thereafter, click create a certificate and choose your desired settings. The defaults should be fine for our purposes.
- 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.
- On the side panel, under Overview section, select how you would like TLS to behave. I have selected Full SSL option.
- Navigate to Nginx Proxy Manager admin page, on the top menu select SSL certificates
- On this page select “Add Certificate”, make sure it is the button which is next to the question mark box. Thereafter, select custom
- For certificate key select domain.key file and for certificate select the domain.pem file
- Now when adding a proxy, under SSL select our newly added certificate.