Cloudflare Partner CLI

English Version

使用Cloudflare partner功能用CNAME方式接入cloudflare。


如需使用中文菜單,請將環境變量的LANG設置為使用UTF-8 (比如zh_CN.UTF-8)。


  1. 申請Cloudflare partner計劃 。
  2. clone本項目或者直接下載腳本
  3. 運行 python ./
  4. 輸入 host_key。可以從這裡獲得。
  5. 輸入要用來管理域名的賬號 (你的個人賬號,不是partner賬號)。賬戶信息保存在.cfhost文件中。
  6. 按照屏幕提示操作。


  • 源站地址必須為DNS記錄,如,不能填寫IP地址。

This is a CLI program that let you set CNAME to use Cloudflare using the partner program.

Both Python2.x and Python3.x is supported. No extra library is needed.

To use Chinese menu, set environment variable LANG to use UTF-8 (for example, zh_CN.UTF-8).


  1. Apply for partner program at
  2. Clone this repository or download script.
  3. Run python ./
  4. Enter your host_key. You can get it here.
  5. Enter the account you use to manage domains (your personal account, not partner login account). User key is stored in .cfhost.
  6. Follow the instructions on screen.


  • Value of resolve_to has to be DNS record (for example: instead of IP address.