![]() |
|
Guide How to Set Up Cloudflare with CloudPanel (DNS, SSL and Real Visitor IPs) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CloudPanel (https://adminsforum.com/Forum-cloudpanel) +---- Forum: CloudPanel Guides & Tutorials (https://adminsforum.com/Forum-cloudpanel-guides-tutorials) +----- Forum: CloudPanel Domains, DNS & SSL Guides (https://adminsforum.com/Forum-cloudpanel-domains-dns-ssl-guides) +----- Thread: Guide How to Set Up Cloudflare with CloudPanel (DNS, SSL and Real Visitor IPs) (/Thread-guide-how-to-set-up-cloudflare-with-cloudpanel-dns-ssl-and-real-visitor-ips) |
How to Set Up Cloudflare with CloudPanel (DNS, SSL and Real Visitor IPs) - JAY - 10-19-2026 How to set up Cloudflare with CloudPanel (DNS, SSL and real visitor IPs) Cloudflare sits between your visitors and your server. It hides your server's IP address, blocks a lot of bad traffic and caches files close to your visitors, all on the free plan. CloudPanel works well with it, but a few settings have to match, or you get errors like "too many redirects" or SSL warnings. This guide explains each setting in plain words and tells you exactly what to choose. How it works, in one picture Code: Visitor → Cloudflare (orange cloud) → your CloudPanel serverStep 1: Add your domain to Cloudflare
Step 2: Point the domain to your server In Cloudflare, go to DNS > Records and make sure you have:
Step 3: Get an SSL certificate on CloudPanel You have two good options. Pick one. Option A: Let's Encrypt (easiest) In CloudPanel, open the site, go to SSL/TLS > Actions > New Let's Encrypt Certificate and create it. It renews by itself. If it fails while the orange cloud is on, switch the records to grey for a minute, create the certificate, then switch back to orange. Option B: Cloudflare Origin Certificate (lasts up to 15 years)
Step 4: Choose the right SSL mode in Cloudflare Go to SSL/TLS > Overview and choose Full (strict).
Step 5: Lock the site to Cloudflare (optional, recommended) Now that everything goes through Cloudflare, you can stop people from skipping it by hitting your server's IP directly. In CloudPanel, open the site's Security tab and turn on Allow traffic from Cloudflare only. Only do this when all the site's web records are orange. Details: CloudPanel site security. What about visitor IP addresses? Behind Cloudflare, every request arrives from a Cloudflare address, which would make your logs and WordPress plugins think all visitors are Cloudflare. CloudPanel already handles this: it keeps a list of Cloudflare's IP ranges and restores the real visitor IP in Nginx. The list updates automatically every day. To refresh it by hand, run as root: Code: clpctl cloudflare:update:ipsThings that go wrong, and the fix
Sources (checked October 2026): Cloudflare: SSL/TLS encryption modes · Cloudflare: Origin CA certificates · CloudPanel CLI Related: Free SSL in CloudPanel · SSL renewal failed |