{"id":82421,"date":"2026-07-25T08:50:45","date_gmt":"2026-07-25T00:50:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/82421.html"},"modified":"2026-07-25T08:50:45","modified_gmt":"2026-07-25T00:50:45","slug":"rustdesk-%e8%87%aa%e5%bb%ba%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84-docker-%e9%83%a8%e7%bd%b2%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/82421.html","title":{"rendered":"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863"},"content":{"rendered":"<h4>\u73af\u5883\u51c6\u5907\u4e0e\u524d\u7f6e\u8981\u6c42<\/h4>\n<p>\u7cfb\u7edf\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6&#xff1a;<\/p>\n<ul>\n<li>Linux \u670d\u52a1\u5668&#xff08;\u5185\u6838\u7248\u672c \u2265 3.10&#xff09;&#xff0c;\u63a8\u8350 Ubuntu\/Debian\/CentOS<\/li>\n<li>\u5df2\u5b89\u88c5 Docker \u53ca Docker Compose<\/li>\n<li>\u786c\u4ef6\u914d\u7f6e&#xff1a;1 \u6838 CPU\u3001512MB~1GB \u5185\u5b58<\/li>\n<li>\u670d\u52a1\u5668\u5e26\u5bbd\u5efa\u8bae\u81f3\u5c11 5Mbps<\/li>\n<\/ul>\n<p>\u9632\u706b\u5899\u9700\u8981\u5f00\u653e\u4ee5\u4e0b\u7aef\u53e3&#xff1a;<\/p>\n<ul>\n<li>21115 (TCP)&#xff1a;NAT \u7c7b\u578b\u6d4b\u8bd5<\/li>\n<li>21116 (TCP &amp; UDP)&#xff1a;\u6838\u5fc3\u7aef\u53e3&#xff08;ID \u6ce8\u518c\u4e0e\u5fc3\u8df3\u670d\u52a1&#xff09;<\/li>\n<li>21117 (TCP)&#xff1a;\u4e2d\u7ee7\u670d\u52a1<\/li>\n<li>\u53ef\u9009 21118\/21119 (TCP)&#xff1a;\u7f51\u9875\u5ba2\u6237\u7aef\u652f\u6301<\/li>\n<\/ul>\n<p>\u4f7f\u7528 ufw \u9632\u706b\u5899\u53ef\u4e00\u952e\u653e\u884c&#xff1a;<\/p>\n<p>sudo ufw allow 21115:21117\/tcp &amp;&amp; sudo ufw allow 21116\/udp<\/p>\n<h4>Docker Compose \u90e8\u7f72\u65b9\u6848<\/h4>\n<p>\u521b\u5efa\u9879\u76ee\u76ee\u5f55\u5e76\u7f16\u5199\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>mkdir -p ~\/rustdesk-server &amp;&amp; cd ~\/rustdesk-server<br \/>\nvim docker-compose.yml<\/p>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9\u5199\u5165 docker-compose.yml&#xff1a;<\/p>\n<p>version: &#039;3.8&#039;<br \/>\nservices:<br \/>\n  hbbs:<br \/>\n    container_name: rustdesk-hbbs<br \/>\n    image: rustdesk\/rustdesk-server:latest<br \/>\n    command: hbbs<br \/>\n    volumes:<br \/>\n      &#8211; .\/data:\/root<br \/>\n    network_mode: &#034;host&#034;<br \/>\n    depends_on:<br \/>\n      &#8211; hbbr<br \/>\n    restart: unless-stopped<\/p>\n<p>  hbbr:<br \/>\n    container_name: rustdesk-hbbr<br \/>\n    image: rustdesk\/rustdesk-server:latest<br \/>\n    command: hbbr<br \/>\n    volumes:<br \/>\n      &#8211; .\/data:\/root<br \/>\n    network_mode: &#034;host&#034;<br \/>\n    restart: unless-stopped<\/p>\n<p>\u542f\u52a8\u670d\u52a1&#xff1a;<\/p>\n<p>docker compose up -d<\/p>\n<p>\u68c0\u67e5\u5bb9\u5668\u72b6\u6001&#xff1a;<\/p>\n<p>docker ps<\/p>\n<p>\u67e5\u770b\u8fd0\u884c\u65e5\u5fd7&#xff1a;<\/p>\n<p>docker logs rustdesk-hbbs<\/p>\n<h4>\u83b7\u53d6\u516c\u94a5&#xff08;Key&#xff09;<\/h4>\n<p>\u670d\u52a1\u542f\u52a8\u540e&#xff0c;\u516c\u94a5\u4f1a\u751f\u6210\u5728 .\/data \u76ee\u5f55\u4e0b&#xff1a;<\/p>\n<p>cat .\/data\/id_ed25519.pub<\/p>\n<p>\u590d\u5236\u8f93\u51fa\u7684\u516c\u94a5\u5185\u5bb9\u5907\u7528\u3002<\/p>\n<h4>\u5ba2\u6237\u7aef\u914d\u7f6e<\/h4>\n<p>\u5728 RustDesk \u5ba2\u6237\u7aef\u4e2d\u914d\u7f6e&#xff1a;<\/p>\n<li>\u8fdb\u5165 \u8bbe\u7f6e -&gt; \u7f51\u7edc -&gt; ID\/\u4e2d\u7ee7\u670d\u52a1\u5668<\/li>\n<li>ID \u670d\u52a1\u5668&#xff1a;\u586b\u5199\u670d\u52a1\u5668\u516c\u7f51 IP \u6216\u57df\u540d<\/li>\n<li>\u4e2d\u7ee7\u670d\u52a1\u5668&#xff1a;\u7559\u7a7a&#xff08;\u9ed8\u8ba4\u4e0e ID \u670d\u52a1\u5668\u76f8\u540c&#xff09;<\/li>\n<li>API \u670d\u52a1\u5668&#xff1a;\u7559\u7a7a<\/li>\n<li>Key&#xff1a;\u7c98\u8d34\u4e4b\u524d\u83b7\u53d6\u7684\u516c\u94a5<\/li>\n<li>\u70b9\u51fb\u201c\u5e94\u7528\u201d<\/li>\n<p>\u5ba2\u6237\u7aef\u5de6\u4e0b\u89d2\u663e\u793a\u201c\u5c31\u7eea\u201d\u5373\u8868\u793a\u8fde\u63a5\u6210\u529f\u3002<\/p>\n<h4>\u8fdb\u9636\u5b89\u5168\u5efa\u8bae<\/h4>\n<p>\u5f3a\u5236\u5f00\u542f\u52a0\u5bc6&#xff08;\u9700\u5728 docker-compose.yml \u4e2d\u6dfb\u52a0&#xff09;&#xff1a;<\/p>\n<p>environment:<br \/>\n  &#8211; ENCRYPTED_ONLY&#061;1<\/p>\n<p>\u4fee\u6539\u540e\u91cd\u542f\u5bb9\u5668&#xff1a;<\/p>\n<p>docker compose up -d &#8211;force-recreate<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883\u51c6\u5907\u4e0e\u524d\u7f6e\u8981\u6c42\u7cfb\u7edf\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6&#xff1a;Linux \u670d\u52a1\u5668&#xff08;\u5185\u6838\u7248\u672c \u2265 3.10&#xff09;&#xff0c;\u63a8\u8350 Ubuntu\/Debian\/CentOS\u5df2\u5b89\u88c5 Docker \u53ca Docker Compose\u786c\u4ef6\u914d\u7f6e&#xff1a;1 \u6838 CPU\u3001512MB~1GB \u5185\u5b58\u670d\u52a1\u5668\u5e26\u5bbd\u5efa\u8bae\u81f3\u5c11 5Mbps\u9632\u706b\u5899\u9700\u8981\u5f00\u653e\u4ee5\u4e0b\u7aef\u53e3&#xff1a;21115 (TCP)&#xff1a;NAT \u7c7b\u578b\u6d4b\u8bd521116 (TCP &amp; UDP)&#xff1a;\u6838<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[200],"topic":[],"class_list":["post-82421","post","type-post","status-publish","format-standard","hentry","category-server","tag-200"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/82421.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u73af\u5883\u51c6\u5907\u4e0e\u524d\u7f6e\u8981\u6c42\u7cfb\u7edf\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6&#xff1a;Linux \u670d\u52a1\u5668&#xff08;\u5185\u6838\u7248\u672c \u2265 3.10&#xff09;&#xff0c;\u63a8\u8350 Ubuntu\/Debian\/CentOS\u5df2\u5b89\u88c5 Docker \u53ca Docker Compose\u786c\u4ef6\u914d\u7f6e&#xff1a;1 \u6838 CPU\u3001512MB~1GB \u5185\u5b58\u670d\u52a1\u5668\u5e26\u5bbd\u5efa\u8bae\u81f3\u5c11 5Mbps\u9632\u706b\u5899\u9700\u8981\u5f00\u653e\u4ee5\u4e0b\u7aef\u53e3&#xff1a;21115 (TCP)&#xff1a;NAT \u7c7b\u578b\u6d4b\u8bd521116 (TCP &amp; UDP)&#xff1a;\u6838\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/82421.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-25T00:50:45+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82421.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/82421.html\",\"name\":\"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-25T00:50:45+00:00\",\"dateModified\":\"2026-07-25T00:50:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/82421.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/82421.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/82421.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/82421.html","og_locale":"zh_CN","og_type":"article","og_title":"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u73af\u5883\u51c6\u5907\u4e0e\u524d\u7f6e\u8981\u6c42\u7cfb\u7edf\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6&#xff1a;Linux \u670d\u52a1\u5668&#xff08;\u5185\u6838\u7248\u672c \u2265 3.10&#xff09;&#xff0c;\u63a8\u8350 Ubuntu\/Debian\/CentOS\u5df2\u5b89\u88c5 Docker \u53ca Docker Compose\u786c\u4ef6\u914d\u7f6e&#xff1a;1 \u6838 CPU\u3001512MB~1GB \u5185\u5b58\u670d\u52a1\u5668\u5e26\u5bbd\u5efa\u8bae\u81f3\u5c11 5Mbps\u9632\u706b\u5899\u9700\u8981\u5f00\u653e\u4ee5\u4e0b\u7aef\u53e3&#xff1a;21115 (TCP)&#xff1a;NAT \u7c7b\u578b\u6d4b\u8bd521116 (TCP &amp; UDP)&#xff1a;\u6838","og_url":"https:\/\/www.wsisp.com\/helps\/82421.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-25T00:50:45+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/82421.html","url":"https:\/\/www.wsisp.com\/helps\/82421.html","name":"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-25T00:50:45+00:00","dateModified":"2026-07-25T00:50:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/82421.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/82421.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/82421.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"RustDesk \u81ea\u5efa\u670d\u52a1\u5668\u7684 Docker \u90e8\u7f72\u6587\u6863"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=82421"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/82421\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=82421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=82421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=82421"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=82421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}