{"id":5848,"date":"2024-12-01T01:02:56","date_gmt":"2024-11-30T17:02:56","guid":{"rendered":"https:\/\/blog.qdac.cc\/?p=5848"},"modified":"2024-12-01T01:02:56","modified_gmt":"2024-11-30T17:02:56","slug":"%e6%95%99%e7%a8%8bheadscale-%e9%85%8d%e7%bd%ae%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e5%87%a0%e4%b8%aa%e7%82%b9","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=5848","title":{"rendered":"[\u6559\u7a0b]Headscale \u914d\u7f6e\u8981\u6ce8\u610f\u7684\u51e0\u4e2a\u70b9"},"content":{"rendered":"\n<p>1\u3001server_url \u7684\u7aef\u53e3\u53f7\u8981\u4e0e\u76d1\u542c\u7684\u7aef\u53e3\u53f7\u4e00\u81f4<\/p>\n\n\n\n<p>2\u3001\/var\/lib\/headscale \u8981\u7ed9\u6743\u9650\u6216\u76f4\u63a5\u7528 chown \u4fee\u6539\u6240\u6709\u8005\u4e3a headscale\uff0c\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u6709\u51e0\u4e2a\u653e\u5230\u4e86\u8fd9\u4e2a\u76ee\u5f55\u4e0b\uff0c\u4fee\u6539\u5230\u522b\u7684\u76ee\u5f55\u6216\u8005\u8d4b\u6743<\/p>\n\n\n\n<p>3\u3001\/var\/run \u76ee\u5f55\u7528 setacl -m u:headscale:rwx \/var\/run \u7ed9 headscale \u5199\u5165\u6743\u9650\u3002<\/p>\n\n\n\n<p>4\u3001\u5982\u679c\u8981\u4f7f\u7528 let&#8217;sencrypt \u7684\u8bc1\u4e66\u81ea\u52a8\u7eed\u671f\uff0c\u6ce8\u610f\u76d1\u542c\u7aef\u53e3\u6309\u5b98\u65b9\u6587\u6863\u8d70\uff0c\u6216\u8005\u7528 nginx \u5efa\u7acb\u4e00\u4e2a ssl \u7f51\u7ad9\uff0c\u7136\u540e\u7528 certbot \u4e00\u7c7b\u7684\u8f6f\u4ef6\u7ed9\u5b83\u81ea\u52a8\u7eed\u671f\uff0c\u7136\u540e\u5c06\u7eed\u671f\u540e\u7684\u8bc1\u4e66\u6587\u4ef6\u590d\u5236\u4e3a ssl_cert_path\/ssl_key_path \u6307\u5b9a\u7684\u503c\uff0c\u6ce8\u610f\u8981\u539f\u59cb\u6587\u4ef6\uff0c\u4e0d\u8981\u7b26\u53f7\u94fe\u63a5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001server_url \u7684\u7aef\u53e3\u53f7\u8981\u4e0e\u76d1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[8],"tags":[],"class_list":["post-5848","post","type-post","status-publish","format-standard","hentry","category-delphi"],"views":931,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/5848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5848"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/5848\/revisions"}],"predecessor-version":[{"id":5849,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/5848\/revisions\/5849"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}