Cloudflare

  • Views Views: 1,382
  • Last updated Last updated:
  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now
  • Introduction

    Rather than repost the excellent instructions on how to initially set up Cloudflare as your DNS provider, here is the link to their page: https://support.cloudflare.com/hc/e...Create-a-Cloudflare-account-and-add-a-website

    Note that if you have multiple sites you do NOT need a separate account for each. You can add multiple sites, each with a different IP, to the same Cloudflare account. They will all share the same API - which makes it easier to manage - but each has their own IPs, A Record(s), CNAMEs, Page Rules, etc.

    Failure to configure CF correctly will result in cert errors or too many redirect errors. Once you applied this changes, make sure you clear your browser cache and purge the CF cache!

    DNS Setup

    • 1 A record that is mydomain.com and points to your IP, enable orange cloud.
    • for each app, add a CNAME, use the appname for the Name and @ for the value, orange cloud on
    • To hide the actual IP from the public, everything must have the "orange cloud" enabled.
    • You need to have 1 A record listing the top level domain to the actual IP of your domain (i.e. mydomain.com)
      • DO NOT USE WILDCARDS They do not work for free accounts! If you have one, remove it! You have to create a separate listing for each sub-domain (i.e. Portainer.mydomain.com)
    • Use CNAMEs for the sub domains (i.e. Portainer.mydomain.com) that are an alias of the TLD you listed for your A record.
    A record for TLD


    TypeNameValueTTLStatus
    Amydomain.com111.111.111.111AutomaticOrange ☁
    CNAMEPlex@AutomaticOrange ☁
    CNAMEPortainer@AutomaticOrange ☁
    CNAMERadarr@AutomaticOrange ☁
    CNAMESonarr@AutomaticOrange ☁
    CNAMENZBGet@AutomaticOrange ☁
    CNAMESABnzbd@AutomaticOrange ☁
    • Add CNames for the rest of the apps that you are using, use the appname as listed in PG as the Name.
    TypeNameValueTTLStatus
    CNAMEappname@AutomaticOrange ☁

    Crypto Settings

    Setting NameValue
    SSLFull (strict)
    Always Use HTTPS🟩 On
    HTTP Strict Transport Security (HSTS)🟩 On, Include Subdomains: On, Preload: On
    Authenticated Origin Pulls🟩 On
    Minimum TLS VersionTLS 1.2
    Opportunistic Encryption🟩 On
    Onion Routing🟥 Off
    TLS 1.3Enabled +0RTT
    Automatic HTTPS Rewrites🟩 On
    Disable Universal SSLKeep Universal SSL On (do nothing)
    Once you applied this changes, make sure you clear your browser cache and purge the CF cache!

    Caching Rules

    Setting NameValue
    Caching LevelStandard
    Browser Cache ExpirationRespect Existing Headers
    Always OnlineOff
    Development ModeOff

    Page Rules

    This step is very important Failure to setup this page rule will result in CF terminating your account! Note: You are limited to 3 page rules for free.

    Plex page rule for Cloudflare


    Alternatively, you can bypass the CF cache for everything using:

    UrlCache Level
    https://*.mydomain.com/*Bypass

    Cloudflare as Content Delivery Network (CDN) for Plex

    1. Go to Plex web
    2. Go to settings
    3. Go to Network
    4. Enable Advanced Settings
    Plex Network SettingValue
    LAN Networks172.17.0.0/16,172.18.0.0/16
    Treat WAN IP As LAN BandwidthChecked
    Custom server access URLshttps://plex.mydomain.com:443
    • You must have https:// and :443, just like it's listed above.

    Plex Remote Access

    Disable "Remote Access", Everything will still connect, including all the apps.
    • Note: You will see red ! next to remote access. Learn to ignore this, this is normal and expected. Everything will still connect just fine if you followed all of the configuration to a T.
    Once you applied this changes, make sure you clear your browser cache and purge the CF cache!
  • Loading…