{"id":142,"date":"2022-12-01T19:51:59","date_gmt":"2022-12-01T11:51:59","guid":{"rendered":"https:\/\/namo.one\/?p=142"},"modified":"2022-12-01T19:51:59","modified_gmt":"2022-12-01T11:51:59","slug":"%e5%88%a9%e7%94%a8cloudflare%e7%9a%84api-token%e8%87%aa%e5%8a%a8%e6%9b%b4%e6%96%b0dns%e8%ae%b0%e5%bd%95%e7%9a%84%e5%85%ac%e7%bd%91ip%e5%9c%b0%e5%9d%80","status":"publish","type":"post","link":"https:\/\/byso.top\/?p=142","title":{"rendered":"\u5229\u7528cloudflare\u7684api token\u81ea\u52a8\u66f4\u65b0dns\u8bb0\u5f55\u7684\u516c\u7f51IP\u5730\u5740"},"content":{"rendered":"\n<p><strong>\u751f\u6210Cloudflare\u7684Token<\/strong><\/p>\n\n\n\n<p>1.\u5728\u5bf9\u5e94\u7684\u57df\u540dDNS\u914d\u7f6e\u4e0b\u5efa\u7acb\u4e00\u4e2aA\u8bb0\u5f55<\/p>\n\n\n\n<p>2. \u5728My Profile\u4e0b\u7684API Tokens\u4e0b\u65b0\u5efa\u7acb\u4e00\u4e2aToken \u300bCreate Cutom Token<\/p>\n\n\n\n<p>3. \u53d6\u540d\u201chome_IP\u201d<\/p>\n\n\n\n<p>4. \u5efa\u7acb\u4e09\u4e2aZone permission\uff0c \u5206\u522b\u662fZone Settings\uff1aRead\uff0c Zone\uff1aRead\uff0cZone DNS\uff1aEdit<\/p>\n\n\n\n<p>5. \u9009\u62e9Zone Resources\uff1aAll zones from an account: &lt;\u5bf9\u5e94\u7684\u90ae\u4ef6\u8d26\u53f7><\/p>\n\n\n\n<p>6. \u9009\u62e9Continue to summary \u7136\u540e\u70b9\u51fbCreate Token<\/p>\n\n\n\n<p>7. \u786e\u4fdd\u8fd9\u4e2aToken\u88ab\u8bb0\u5f55\u4e0b\u6765\uff0c\u56e0\u4e3a\u5b83\u53ea\u663e\u793a\u4e00\u6b21\u5e76\u4e14\u4e0d\u80fd\u91cd\u65b0\u53d6\u56de\uff0c\u5fd8\u4e86\u53ea\u80fd\u518d\u6b21\u66f4\u65b0\u751f\u6210\u4e00\u4e2a\u65b0\u7684token\uff0c\u6709\u4e86\u8fd9\u4e2atoken\uff0c\u5c31\u53ef\u4ee5\u53bb\u4e0b\u4e00\u6b65\u4e86<\/p>\n\n\n\n<p><strong>\u5728Docker\u5185\u5b89\u88c5\u81ea\u52a8\u66f4\u65b0\u672c\u5730\u516c\u7f51ip\u5730\u5740\u7684\u5bb9\u5668<\/strong><\/p>\n\n\n\n<p>\u5229\u7528\u8fd9\u4e2a\u955c\u50cfDocker CloudFlare DDNS\u6765\u76f4\u63a5\u751f\u6210Docker Stack\uff0c\u5e76\u751f\u6210\u5bb9\u5668\u540e\u542f\u52a8\u3002\u542f\u52a8\u524d\uff0c\u7f16\u8f91\u4e00\u4e0bdocker compose\u6587\u4ef6\uff0c\u628a\u524d\u9762\u751f\u6210\u7684token\u66ff\u4ee3XXXXX\uff0c\u628a\u5bf9\u5e94\u7684\u57df\u540d\u548c\u5b50\u57df\u540d\u586b\u5165zone\u548csubdomain\uff0c\u5373\u53ef\u542f\u52a8\u5bb9\u5668\uff0c\u542f\u52a8\u540e\u68c0\u67e5log\u6587\u4ef6\u786e\u4fdd\u6267\u884c\u6b63\u786e\uff0c\u5bf9\u5e94\u7684dns\u8bb0\u5f55\u5373\u4ee5\u83b7\u5f97\u4e86\u66f4\u65b0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '2'\r\nservices:\r\n  cloudflare-ddns:\r\n    image: oznu\/cloudflare-ddns:latest\r\n    restart: always\r\n    environment:\r\n      - API_KEY=xxxxxxx\r\n      - ZONE=example.com\r\n      - SUBDOMAIN=subdomain\r\n      - PROXIED=false<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u751f\u6210Cloudflare\u7684Token 1.\u5728\u5bf9\u5e94\u7684\u57df\u540dDNS\u914d\u7f6e\u4e0b\u5efa\u7acb\u4e00\u4e2aA\u8bb0\u5f55 2. \u5728My Profile [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,2],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-cloudflare","category-docker","category-linux-applications"],"_links":{"self":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":1,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/byso.top\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/byso.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}