From 1022cd46dbacc5b216ec56ea99255fc7f4d149f7 Mon Sep 17 00:00:00 2001 From: jslyrd Date: Fri, 14 Jun 2024 12:05:08 +0800 Subject: [PATCH] Create Install-as-a-Windows-service.md (#7) --- .vitepress/config/cn.ts | 1 + .vitepress/config/en.ts | 1 + en/guide/network/install-as-a-windows-service.md | 9 +++++++++ guide/network/install-as-a-windows-service.md | 9 +++++++++ 4 files changed, 20 insertions(+) create mode 100644 en/guide/network/install-as-a-windows-service.md create mode 100644 guide/network/install-as-a-windows-service.md diff --git a/.vitepress/config/cn.ts b/.vitepress/config/cn.ts index ddc939d..6bbea76 100644 --- a/.vitepress/config/cn.ts +++ b/.vitepress/config/cn.ts @@ -22,6 +22,7 @@ export const cn = defineConfig({ { text: '子网代理(点对网)', link: '/guide/network/point-to-networking' }, { text: '无公网IP', link: '/guide/network/networking-without-public-ip' }, { text: '使用 WireGuard 客户端接入', link: '/guide/network/use-easytier-with-wirefuard-client' }, + { text: '注册为windows服务(开机自启)', link: '/guide/network/install-as-a-windows-service' }, { text: '其他配置', link: '/guide/network/configurations' }, ], }, diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index 27c093c..f1afda5 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -22,6 +22,7 @@ export const en = defineConfig({ { text: 'Subnet Proxy', link: '/en/guide/network/point-to-networking' }, { text: 'Without Public IP', link: '/en/guide/network/networking-without-public-ip' }, { text: 'Use WireGuard Client', link: '/en/guide/network/use-easytier-with-wirefuard-client' }, + { text: 'Installing as a Windows Service (Auto-Start on Boot)', link: '/en/guide/network/install-as-a-windows-service' }, { text: 'Other Configurations', link: '/en/guide/network/configurations' }, ], }, diff --git a/en/guide/network/install-as-a-windows-service.md b/en/guide/network/install-as-a-windows-service.md new file mode 100644 index 0000000..21bbdd3 --- /dev/null +++ b/en/guide/network/install-as-a-windows-service.md @@ -0,0 +1,9 @@ +# Installing as a Windows Service +1. Go to the NSSM official website [https://nssm.cc/download] to download NSSM and extract it to a local directory. +2. Download the command-line version of `easytier-core.exe`, remember the installation directory, such as `D:\Software\Easytier\cli\easytier-core.exe`. +3. Register it as a Windows service, naming it `easytier_service`: + - `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010` +4. Run `services.msc`, locate the `easytier_service` service, enable it, and set it to start with a delay. +5. To remove the service: `nssm.exe remove easytier_service`. +6. Note that after registering as a service, the program (referring to easytier-core.exe) cannot be modified, deleted, or moved. Otherwise, it needs to be removed for re-registration or modifying the Windows registry. +7. For convenient execution of `easytier-cli.exe` to view connection status, you can place it in `C:\Users\Administrator` (Administrator being your Windows username). Simply open cmd or PowerShell and execute, for example: `easytier-cli.exe peer`. diff --git a/guide/network/install-as-a-windows-service.md b/guide/network/install-as-a-windows-service.md new file mode 100644 index 0000000..ebf172f --- /dev/null +++ b/guide/network/install-as-a-windows-service.md @@ -0,0 +1,9 @@ +# 安装为windows服务 +1. 前往NSSM官网[https://nssm.cc/download]下载NSSM并解压到本地目录 +2. 下载好命令行版easytier-core.exe,记住存放目录,如`D:\Software\Easytier\cli\easytier-core.exe` +3. 将其注册为windows服务,如命名为`easytier_service`: + - `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010` +4. 运行 `services.msc`,找到easytier_service服务,启用并将其设置为延时启动 +5. 如要删除服务:`nssm.exe remove easytier_service` +6. 注意注册成服务后程序(指easytier-core.exe)不能修改、删除或移动,否则需要删除以重新注册或修改win注册表 +7. 为方便执行`easytier-cli.exe`查看连接情况,可将其存放到`C:\Users\Administrator`(Administrator是你windows用户名)底下,随意打开cmd或powershell即可执行,如:`easytier-cli.exe peer`