Nginx Proxy Manager is a reverse proxy management tool based on Nginx. It provides a user-friendly web interface for easily managing and configuring Nginx reverse proxies. The main features of Nginx Proxy Manager include:
Easy-to-Use Interface: The graphical interface allows users to quickly add and manage proxy hosts (i.e., reverse proxy rules).
SSL Management: Supports automatic SSL/TLS certificate issuance and renewal via Let's Encrypt, ensuring the security of your website.
Access Control: You can set access controls for proxy hosts, such as limiting access to specific IP addresses or requiring basic authentication.
HTTP Proxy & WebSocket Support: Supports both regular HTTP proxies(Related article:Get to know the HTTP protocol) and WebSocket proxies(Related article:Basic introduction to Websocket).
Simple Docker Deployment: Nginx Proxy Manager can be easily deployed via Docker.
Multi-Domain Support: Allows you to manage multiple domains and hosts within the same instance.
Related article:
Guide to Using Nginx Reverse Proxy Function
Nginx Proxy Manager is ideal for users who need to set up reverse proxies between multiple services and wish to simplify the configuration process.
Cloudflare is a company that provides network security and performance optimization services. Their main products include a content delivery network (CDN), DDoS protection, website acceleration, domain name resolution (DNS), and a web application firewall (WAF).
By using Cloudflare services, websites can achieve:
Faster Load Times: Cloudflare's global CDN network caches website content on servers closer to users, reducing load times.
Improved Security: Offers DDoS protection to defend against large-scale traffic attacks, safeguarding websites from malicious threats.
Enhanced Reliability: Improves website availability and performance through intelligent routing and load balancing.
Ease of Management: Provides a user-friendly interface and API, making it easy for website administrators to manage and configure settings.
In summary, Cloudflare helps users improve online content security, speed, and overall user experience.
This article will walk you through the steps of applying for an API token from Cloudflare and configuring a wildcard domain certificate in Nginx Proxy Manager, helping you quickly get started with the setup.
Operating System: Suitable for all operating systems that support Docker, such as Ubuntu, CentOS, Debian, etc. Ensure Nginx Proxy Manager is installed correctly.
Nginx Proxy Manager Version: It is recommended to use the latest version for compatibility and security.
Cloudflare Account: You need a valid Cloudflare account with at least one domain added.
Network Environment: Ensure your server can access the internet for communication with the Cloudflare API.
Cloudflare Official Website: https://www.cloudflare.com
Cloudflare API Token Application Page: https://dash.cloudflare.com/profile/api-tokens
Nginx Proxy Manager Official Documentation: https://nginxproxymanager.com/
Cloudflare Developer Documentation: https://developers.cloudflare.com/
To apply for an API token, visit the following link: Cloudflare API Tokens, or navigate to the API section from any domain page.

Create Token:
Choose either to use a template or create a custom one. Both options are valid.


Permissions Settings:
Select DNS permissions.
Zone Settings:
Choose "All Zones" for the zone settings.
Client IP (Optional):
You can optionally set a client IP address for added security.

Confirmation:
Review the information, and once correct, click "Create Token."

Save Token:
After successful creation, the token will be displayed. Please make sure to save it, as it will only be shown once.

Log into the Nginx Proxy Manager backend.

Navigate to the Certificates page and click Add SSL Certificate.
Domain Name: Enter the wildcard domain you wish to apply for.
Email Address: Provide the email address associated with your Cloudflare account.
DNS Provider: Select Cloudflare.

Once you select Cloudflare as the DNS provider, the credential fields will automatically populate. Replace the value after dns_cloudflare_api_token= with the API token you created earlier.
# Cloudflare API tokendns_cloudflare_api_token=<Your API Token>

Review the information and agree to the terms of service, then click Save.

After a short wait, Nginx Proxy Manager will automatically apply for the wildcard certificate. Once successfully issued, you will see it listed in the certificates section.

At this point, you've successfully applied for the wildcard domain certificate using Nginx Proxy Manager and Cloudflare.