Skip to content

Latest commit

 

History

History
35 lines (18 loc) · 1.48 KB

Cloudflare-via-Script.md

File metadata and controls

35 lines (18 loc) · 1.48 KB

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:

  1. Sign up for a free Cloudflare account.

  2. 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.

    • Ex. Namecheap.com -> "Dashboard" -> your domain -> "Manage" -> "Name Servers" -> "Custom DNS" -> add the nameservers in.

  3. Go to Cloudflare.com.

    1. Under the "Crypto" tab, set "SSL" to Full (strict).

    2. Under the "Overview" tab, click "Get your API key", then retrieve your "Global API Key".

  4. Run the following python script:

    python3 /opt/scripts/cloudflare/cloudflared.py
    
  5. 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.