Post

Wildcard Certificate in Nginx Proxy Manager Using Cloudflare

This guide assumes that you are currently using Cloudflare for DNS and Nginx Proxy Manager as your reverse proxy.

Nginx Proxy Manager

  • Log into Nginx Proxy Manager
  • Click ‘SSL Certificates’
  • Click ‘Add SSL Certificate - LetsEncrypt’

The Add dialog will pop up and the following information needs to be entered:

  • For ‘Domain Names’ put *.myserver.com, then click Add *.myserver.com in the drop down that appears
  • Toggle ON ‘Use a DNS Challenge’ and ‘I Agree to Let’s Encrypt Terms of Service’.
  • When toggling ‘DNS Challenge’, a new section will appear asking for the DNS Provider. Select Cloudflare
  • Also, the ‘Credentials File Content’ box will appear. Place your Cloudflare API Token in the highlighted area as seen in the image below.

NPM.png

Cloudflare

  • Log into Cloudflare and click your domain name
  • Scroll down and on the right hand side of the page and locate the API section
  • Click ‘Get Your API Token’
  • On the next page, click the API Tokens header
  • Click ‘Create Token’ on the next page
  • At the bottom of the page, click ‘Get Started’ under the ‘Custom Token’ header
  • On the next page, give the token a name (I called mine NPM for Nginx Proxy Manager)
  • Under Permissions, select ‘Zone’ in the left hand box, ‘DNS’ in the center box, and ‘Edit’ in the right hand box
  • At the bottom of the page, click ‘Continue to Summary’
  • On the next page, click ‘Create Token’.

Once the token is created, it will take you to a page with the newly created token listed so that you can copy it. Click the Copy button or highlight the token and copy it.

Nginx Proxy Manager

Back on the Nginx Proxy Manager page:

  • Highlight the sample token in the Credentials File Content box and paste your newly created token
  • Leave the ‘Propagation Seconds’ box blank
  • Click Save
  • The box will change to Processing…. with a spinning icon

It may take a minute or two. Once it is finished, it will go back to the regular SSL Certificates page but with your new wildcard certificate added.

This post is licensed under CC BY 4.0 by the author.