Script will: (1) add (or update) all the Cloudbox [[subdomains|Basics: Accessing Cloudbox Apps#default apps]] into Cloudflare, and (2) will enable DNS and HTTP proxy (CDN) for Plex.
Steps to setup Cloudflare are as follows:
-
Sign up for a free Cloudflare account.
-
Set the Name Servers to what Cloudflare instructs you to on your Domain Registrar's website (e.g. GoDaddy, Namecheap, etc). You do not need to make changes to the DNS settings there.
-
Go to Cloudflare.com.
-
Run the following python script:
python3 /opt/scripts/cloudflare/cloudflared.py
-
When asked, enter your email address, API key, domain, and server IP address.
Note 1: The script will only set the subdomains to one IP address. If you have a separate Plex and Feeder setup, you will need to login to Cloudflare and adjust the IP addresses for their respective subdomains.
Note 2: From now on, any DNS settings changes and/or adding of subdomains will now be done on Cloudflare instead of your Domain Registrar's website.