Loading... # 转载自[咕咕鸽](https://blog.laoda.de/archives/docker-compose-install-rustdesk) 【好玩儿的Docker项目】开箱即用!TeamViewer、向日葵的替代品,20分钟自建一个开源远程桌面服务——RustDesk ![咕咕鸽](https://img.laoda.de/i/2023/01/31/u224cj-2.webp)[咕咕鸽](https://blog.laoda.de/s/about "咕咕鸽") **2022-07-02**/**40 评论**/**18 点赞**/**12,073 阅读**/**2,198 字**/推送成功! 07/02 **温馨提示:** 本文最后更新于 2022-07-03,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。 ## 前言 最近不知怎么,经常需要帮朋友远程,远程工具一般都是用向日葵,不过似乎现在需要登陆才能使用。 ![image-20220702073022862](https://img.laoda.de/i/2022/07/02/c2s1sz-2.webp) 总感觉不是很爽。 今天就来推荐一款向日葵的开源替代品——Rust desk ![RustDesk - Your remote desktop](https://img.laoda.de/i/2022/07/02/c4p1ng-2.svg) ## 1. 介绍 一个非常好用的远程桌面软件。 ![image](https://img.laoda.de/i/2022/07/02/c539lo-2.webp) ### 1.1 特点 咕咕这边简单在网上~抄~搜集了一些特点,供大家参考: * 用Rust编写 * 开箱即用,不需要复杂的配置 * 你可以完全控制你的数据,而不用担心安全问题 * 你可以使用官方的rendezvous/relay服务器,也可以建立你自己的rendezvous/relay服务器。 当然我们今天就是和大家分享一下如何搭建。 ## 2. 项目展示 GitHub原项目地址(感谢作者的付出):[https://github.com/rustdesk/rustdesk](https://github.com/rustdesk/rustdesk)(23.2k star) Docker镜像地址:[https://hub.docker.com/r/rustdesk/rustdesk-server/tags](https://hub.docker.com/r/rustdesk/rustdesk-server/tags) 官网地址:[https://rustdesk.com](https://rustdesk.com/) 文档地址:[https://rustdesk.com/docs/zh-cn/self-host/](https://rustdesk.com/docs/zh-cn/self-host/) 直接丢几个图片: ![image-20220630211029167](https://img.laoda.de/i/2022/06/30/ywfk7a-2.webp) ## 3. 搭建环境 * 服务器:~腾讯香港轻量应用服务器24元/月VPS一台~展示用的服务器是[Netcup](https://netcup-sonderangebote.de/)特价款,本期搭建用的是[斯巴达](https://blog.laoda.de/archives/spartanhost)的服务器,(最好是选 **非大陆的服务器** )([腾讯轻量购买链接](https://loll.cc/tx))[Hetzner注册免费得25欧试用金有效期一个月](https://loll.cc/hz) * 系统:Debian 10([DD脚本](https://blog.laoda.de/archives/useful-script#dd%E7%9B%B8%E5%85%B3) 非必需DD用原来的系统也OK) * 安装好Docker、Docker-compose([相关脚本](https://esxdidi.com/default/42.html)) * ~【非必需】域名一枚,并做好解析到服务器上([域名购买、域名解析](https://blog.laoda.de/archives/namesilo) [视频教程](https://www.bilibili.com/video/BV1Sy4y1k7kZ/))~ * ~【非必需】提前安装好宝塔面板海外版本aapanel,并安装好Nginx([安装地址](https://forum.aapanel.com/d/9-aapanel-linux-panel-6812-installation-tutorial))~ * ~【非必需】安装好Nginx Proxy Manager([相关教程](https://blog.laoda.de/archives/nginxproxymanager))~ > 服务器要求: > > 硬件要求很低,最低配置的云服务器就可以了,CPU和内存要求都是最小的。关于网络大小,如果TCP打洞直连失败,就要耗费中继流量,一个中继连接的流量在30k-3M每秒之间(1920x1080屏幕),取决于清晰度设置和画面变化。如果只是办公需求,平均在100K/s。 ## 4. 搭建视频 YouTube:[https://youtu.be/xQ19DLW4kok](https://youtu.be/xQ19DLW4kok) 哔哩哔哩【高清版本可以点击去吐槽到B站观看】: <iframe allowfullscreen="true" class="joe_vplayer" src="https://player.bilibili.com/player.html?bvid=BV1or4y1M7UQ&page=1"></iframe> ## 5. 搭建方式 ### 5.1 搭建 服务器初始设置,参考 [**新买了一台服务器“必须”要做的6件小事**](https://blog.laoda.de/archives/vps-script) [【Docker系列】不用宝塔面板,小白一样可以玩转VPS服务器!](https://blog.laoda.de/archives/hello-docker) > 注意:VPS的内存如果过小,建议设置一下SWAP,一般为内存的1-1.5倍即可,可以让系统运行更流畅! 设置SWAP可以用脚本: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">wget</span> -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh <span class="token operator">&&</span> <span class="token function">chmod</span> +x box.sh <span class="token operator">&&</span> <span class="token function">clear</span> <span class="token operator">&&</span> ./box.sh <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> ![image-20220528185512488](https://img.laoda.de/i/2022/05/28/uoikkd-0.webp) 选择 `18`,然后输入你想要扩容的数值即可。 ![image-20220528185604586](https://img.laoda.de/i/2022/05/28/up2dkf-0.webp) <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">sudo</span> -i <span class="token comment"># 切换到root用户</span> <span class="token function">apt</span> update -y <span class="token comment"># 升级packages</span> <span class="token function">apt</span> <span class="token function">install</span> <span class="token function">wget</span> <span class="token function">curl</span> <span class="token function">sudo</span> <span class="token function">vim</span> <span class="token function">git</span> <span class="token comment"># Debian系统比较干净,安装常用的软件</span> <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 创建一下安装的目录: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">mkdir</span> -p /root/data/docker_data/rustdesk <span class="token builtin class-name">cd</span> /root/data/docker_data/rustdesk <span class="token function">nano</span> docker-compose.yml <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> `docker-compose.yml`填入以下内容: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-yaml line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-yaml"><span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">'3'</span> <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token key atrule">rustdesk-net</span><span class="token punctuation">:</span> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token key atrule">services</span><span class="token punctuation">:</span> <span class="token key atrule">hbbs</span><span class="token punctuation">:</span> <span class="token key atrule">container_name</span><span class="token punctuation">:</span> hbbs <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> 21115<span class="token punctuation">:</span><span class="token number">21115</span> <span class="token punctuation">-</span> 21116<span class="token punctuation">:</span><span class="token number">21116</span> <span class="token punctuation">-</span> 21116<span class="token punctuation">:</span>21116/udp <span class="token punctuation">-</span> 21118<span class="token punctuation">:</span><span class="token number">21118</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> rustdesk/rustdesk<span class="token punctuation">-</span>server<span class="token punctuation">:</span>latest <span class="token key atrule">command</span><span class="token punctuation">:</span> hbbs <span class="token punctuation">-</span>r hbbs.example.com<span class="token punctuation">:</span><span class="token number">21117</span> <span class="token comment"># hbbs.example.com改成</span> <span class="token key atrule">volumes</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> ./hbbs<span class="token punctuation">:</span>/root <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> rustdesk<span class="token punctuation">-</span>net <span class="token key atrule">depends_on</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> hbbr <span class="token key atrule">restart</span><span class="token punctuation">:</span> unless<span class="token punctuation">-</span>stopped <span class="token key atrule">hbbr</span><span class="token punctuation">:</span> <span class="token key atrule">container_name</span><span class="token punctuation">:</span> hbbr <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> 21117<span class="token punctuation">:</span><span class="token number">21117</span> <span class="token punctuation">-</span> 21119<span class="token punctuation">:</span><span class="token number">21119</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> rustdesk/rustdesk<span class="token punctuation">-</span>server<span class="token punctuation">:</span>latest <span class="token key atrule">command</span><span class="token punctuation">:</span> hbbr <span class="token key atrule">volumes</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> ./hbbr<span class="token punctuation">:</span>/root <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> rustdesk<span class="token punctuation">-</span>net <span class="token key atrule">restart</span><span class="token punctuation">:</span> unless<span class="token punctuation">-</span>stopped <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 没问题的话,`ctrl+x`退出,按 `y`保存,`enter`确认。 打开防火墙的端口 `21115`、`21116`、`21117`、`21118`、`21119` > 默认情况下,hbbs 监听 `21115(tcp)`, `21116(tcp/udp)`, `21118(tcp)`,hbbr 监听 `21117(tcp)`, `21119(tcp)`。 > > 务必在防火墙开启这几个端口, **请注意 `21116`同时要开启 `TCP`和 `UDP`** 。 > > 其中 `21115`是hbbs用作NAT类型测试,`21116/UDP`是hbbs用作ID注册与心跳服务,`21116/TCP`是hbbs用作TCP打洞与连接服务,`21117`是hbbr用作中继服务, `21118`和 `21119`是为了支持网页客户端。 > > 如果您不需要网页客户端 `(21118,21119)`支持,对应端口可以不开。 * TCP( **21115, 21116, 21117, 21118, 21119** ) * UDP( **21116** ) ![image-20220630215240864](https://img.laoda.de/i/2022/06/30/zlio5h-2.webp) ![image-20220630220546335](https://img.laoda.de/i/2022/06/30/10h3dqt-2.webp) ![image-20220630215134217](https://img.laoda.de/i/2022/06/30/zkvklo-2.webp) ![image-20220630220629996](https://img.laoda.de/i/2022/06/30/10hlio9-2.webp) 查看端口是否被占用(以 `21115`为例),输入: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">lsof</span> -i:21115 <span class="token comment">#查看21115端口是否被占用,如果被占用,重新自定义一个端口</span> <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 如果出现: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash">-bash: lsof: <span class="token builtin class-name">command</span> not found <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 运行: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">apt</span> <span class="token function">install</span> <span class="token function">lsof</span> <span class="token comment">#安装lsof</span> <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 如果端口没有被占用,我们接着可以运行: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token builtin class-name">cd</span> /root/data/docker_data/rustdesk <span class="token function">docker-compose</span> up -d <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> > **注意:** > > 1、不知道服务器IP,可以直接在命令行输入:`curl ip.sb`,会显示当前服务器的IP。 > > 2、遇到访问不了的情况,请在宝塔面板的防火墙和服务商的后台防火墙里打开对应端口。 ### 5.2 更新 <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token function">cp</span> -r /root/data/docker_data/rustdesk /root/data/docker_data/rustdesk.archive <span class="token comment"># 万事先备份,以防万一</span> <span class="token builtin class-name">cd</span> /root/data/docker_data/rustdesk <span class="token comment"># 进入docker-compose所在的文件夹</span> <span class="token function">docker-compose</span> pull <span class="token comment"># 拉取最新的镜像</span> <span class="token function">docker-compose</span> up -d <span class="token comment"># 重新更新当前镜像</span> <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 利用Docker-compose搭建的应用,更新非常容易~ ### 5.3 卸载 <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash"><span class="token builtin class-name">cd</span> /root/data/docker_data/rustdesk <span class="token comment"># 进入docker-compose所在的文件夹</span> <span class="token function">docker-compose</span> down <span class="token comment"># 停止容器,此时不会删除映射到本地的数据</span> <span class="token function">rm</span> -rf /root/data/docker_data/rustdesk <span class="token comment"># 完全删除映射到本地的数据</span> <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> ## 6. 使用教程 ### 6.1 安装和配置 见咕咕鸽的视频 点击 ID 右侧的菜单按钮如下,选择“ ID/中继服务器”。 ![img](https://img.laoda.de/i/2022/06/30/10vdndr-2.webp) 在 ID 服务器输入框中(被控端+主控端)输入 hbbs 主机或 ip 地址,另外两个地址可以不填,RustDesk会自动推导(如果没有特别设定),中继服务器指的是hbbr(21116)端口。 例如: 例如: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash">hbbs.example.com <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> 或者 <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-bash line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-bash">hbbs.example.com:21116 <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> ![img](https://img.laoda.de/i/2022/06/30/10werrl-2.webp) ![image-20220630230905895](https://img.laoda.de/i/2022/06/30/126s6aa-2.webp) ![image-20220630231000711](https://img.laoda.de/i/2022/06/30/127cdzg-2.webp) ![image-20220630231648227](https://img.laoda.de/i/2022/06/30/12b7cbz-2.webp) ![image-20220630231211642](https://img.laoda.de/i/2022/06/30/128m0xb-2.webp) #### 6.1.1 功能展示 ![image-20220630231557544](https://img.laoda.de/i/2022/06/30/12awwj1-2.webp) ![image-20220630231732435](https://img.laoda.de/i/2022/06/30/12bpj3z-2.webp) ![image-20220630231801433](https://img.laoda.de/i/2022/06/30/12c44fx-2.webp) #### 6.1.2 传输文件 ![image-20220630231912131](https://img.laoda.de/i/2022/06/30/12crxpe-2.webp) ![image-20220630232034319](https://img.laoda.de/i/2022/06/30/12dih3s-2.webp) ### 6.2 几个小问题 #### 6.2.1 加密通话 默认是不加密的。我们可以通过设置Key,来加密通话。 以下来自[官方文档](https://rustdesk.com/docs/zh-cn/self-host/install/): hbbs在第一次运行时,会自动产生一对加密私钥和公钥(分别位于运行目录下的 `id_ed25519`和 `id_ed25519.pub`文件中),其主要用途是为了通讯加密。 ![image-20220630223952511](https://img.laoda.de/i/2022/06/30/111dylz-2.webp) 如果您在上一步骤中没有填写 `Key:`(公钥文件 `id_ed25519.pub`中的内容),不影响连接,但是连接无法加密。 <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-none line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language- language-none">cat /root/data/docker_data/rustdesk/hbbs/id_ed25519.pub <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> ![image-20220630224047960](https://img.laoda.de/i/2022/06/30/111y9hm-2.webp) 如果您禁止没有key的用户建立非加密连接,请在运行hbbs和hbbr的时候添加 `-k _`参数,例如: <pre class="c_title c_hr c_macdot c_hover_tools c_expander c_copy language-yaml line-numbers" tabindex="0"><i class="joe-font joe-icon-arrow-downb code-expander" title="折叠/展开"></i><code class="language-yaml"><span class="token key atrule">version</span><span class="token punctuation">:</span> <span class="token string">'3'</span> <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token key atrule">rustdesk-net</span><span class="token punctuation">:</span> <span class="token key atrule">external</span><span class="token punctuation">:</span> <span class="token boolean important">false</span> <span class="token key atrule">services</span><span class="token punctuation">:</span> <span class="token key atrule">hbbs</span><span class="token punctuation">:</span> <span class="token key atrule">container_name</span><span class="token punctuation">:</span> hbbs <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> 21115<span class="token punctuation">:</span><span class="token number">21115</span> <span class="token punctuation">-</span> 21116<span class="token punctuation">:</span><span class="token number">21116</span> <span class="token punctuation">-</span> 21116<span class="token punctuation">:</span>21116/udp <span class="token punctuation">-</span> 21118<span class="token punctuation">:</span><span class="token number">21118</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> rustdesk/rustdesk<span class="token punctuation">-</span>server<span class="token punctuation">:</span>latest <span class="token key atrule">command</span><span class="token punctuation">:</span> hbbs <span class="token punctuation">-</span>r hbbs.example.com<span class="token punctuation">:</span>21117 <span class="token punctuation">-</span>k _ <span class="token comment"># 加上-k _ </span> <span class="token key atrule">volumes</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> ./hbbs<span class="token punctuation">:</span>/root <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> rustdesk<span class="token punctuation">-</span>net <span class="token key atrule">depends_on</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> hbbr <span class="token key atrule">restart</span><span class="token punctuation">:</span> unless<span class="token punctuation">-</span>stopped <span class="token key atrule">hbbr</span><span class="token punctuation">:</span> <span class="token key atrule">container_name</span><span class="token punctuation">:</span> hbbr <span class="token key atrule">ports</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> 21117<span class="token punctuation">:</span><span class="token number">21117</span> <span class="token punctuation">-</span> 21119<span class="token punctuation">:</span><span class="token number">21119</span> <span class="token key atrule">image</span><span class="token punctuation">:</span> rustdesk/rustdesk<span class="token punctuation">-</span>server<span class="token punctuation">:</span>latest <span class="token key atrule">command</span><span class="token punctuation">:</span> hbbr <span class="token punctuation">-</span>k _ <span class="token comment"># 加上-k _ </span> <span class="token key atrule">volumes</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> ./hbbr<span class="token punctuation">:</span>/root <span class="token key atrule">networks</span><span class="token punctuation">:</span> <span class="token punctuation">-</span> rustdesk<span class="token punctuation">-</span>net <span class="token key atrule">restart</span><span class="token punctuation">:</span> unless<span class="token punctuation">-</span>stopped <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code><span class="copy-button"><i class="joe-font joe-icon-copy" title="复制代码"></i></span></pre> > 实测加上 `-k _`参数后,会导致无法连接,不确定是不是BUG,有解决的小伙伴欢迎在评论区留言交流! 如果要更改key,请删除 `id_ed25519` 和 `id_ed25519.pub` 文件并重新启动 hbbs/hbbr,hbbs将会产生新的密钥对。 #### 6.2.2 把配置放在可执行文件名里 (Windows only) 把 `rustdesk.exe` 修改为 rustdesk-`host=<host-ip-or-name>,key=<public-key-string>`.exe, 例如: rustdesk-`host=192.168.1.137,key=xfdsfsd32=32`.exe,你可以在About窗口看到配置结果,如下图所示。 `host` 和 `key` 都需要添加,缺少一个就不好使。 > 如果密钥中有无效字符而不能用于文件名,请删除 `id_ed25519`文件并重新启动hbbs/hbbr,`id_ed25519.pub`文件将被重新生成,请重复操作直到获得有效字符。 | Menu | About Page | | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | [![img](https://img.laoda.de/i/2022/06/30/10x5em3-2.webp)](https://rustdesk.com/docs/en/self-host/install/images/aboutmenu.png) | [![img](https://img.laoda.de/i/2022/06/30/10x5to7-2.webp)](https://rustdesk.com/docs/en/self-host/install/images/lic.png) | ## 7. 结尾 祝大家用得开心,有问题可以去GitHub提[Issues](https://github.com/rustdesk/rustdesk-server/issues),也可以在评论区互相交流探讨。 同时,有能力给项目做贡献的同学,也欢迎积极加入到[项目](https://github.com/rustdesk)中来,贡献自己的一份力量! ## 8. 参考资料 [https://github.com/rustdesk/rustdesk-server](https://github.com/rustdesk/rustdesk-server) 最后修改:2023 年 02 月 04 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏