1 Commits

Author SHA1 Message Date
fanyang89
46ba73600d docs(installation): refresh Docker Compose example
Update the Watchtower image reference and align the bilingual compose
example with the current setup guidance.
2026-03-28 11:39:11 +08:00
4 changed files with 153 additions and 228 deletions

View File

@@ -41,36 +41,41 @@ This section only introduces installation methods.
::: details docker-compose.yml
```yaml [docker-compose.yml]
services:
watchtower: # Used to automatically update easytier image, delete this part if not needed
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- WATCHTOWER_NO_STARTUP_MESSAGE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 --cleanup --label-enable
easytier:
image: easytier/easytier:latest # Domestic users can use m.daocloud.io/docker.io/easytier/easytier:latest
hostname: easytier
container_name: easytier
labels:
com.centurylinklabs.watchtower.enable: 'true'
restart: unless-stopped
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
environment:
- TZ=Asia/Shanghai
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- /etc/easytier:/root
- /etc/machine-id:/etc/machine-id:ro # Map host machine code
command: -d --network-name <user> --network-secret <password> -p tcp://<your-public-ip>:11010
services:
# watchtower automatically updates the EasyTier image; remove this section if not needed
watchtower:
image: nickfedor/watchtower
container_name: watchtower
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- WATCHTOWER_NO_STARTUP_MESSAGE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 --cleanup --label-enable
easytier:
# Users in mainland China can use the DaoCloud mirror
# image: m.daocloud.io/docker.io/easytier/easytier:latest
image: easytier/easytier:latest
hostname: easytier
container_name: easytier
labels:
com.centurylinklabs.watchtower.enable: 'true'
restart: unless-stopped
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
environment:
- TZ=Asia/Shanghai
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- /etc/machine-id:/etc/machine-id:ro
command: >
-d --network-name <user> --network-secret <password>
-p tcp://<public-ip-of-other-peer-or-public-node>:11010
```
:::

View File

@@ -1,115 +1,73 @@
# Install as a Windows Service
After EasyTier is installed as a Windows service, it can run in the background and start automatically with the system. This is useful for long-running or unattended deployments.
> Thanks to BeiChen℃ for providing the tutorial, and dawn-lc for providing the one-click install/uninstall script
The recommended approach is to use the official `install.cmd` script for installation, updates, and removal. You no longer need to prepare NSSM manually.
On Windows systems, installing certain applications as services allows them to run automatically in the background without manual intervention, greatly improving the stability and convenience of the application.
> Thanks to BeiChen℃ for the original tutorial and dawn-lc for the one-click install/uninstall script.
This tutorial will use NSSM (Non-Sucking Service Manager) to install the EasyTier application as a Windows service as an example, and provide a detailed explanation of the entire operation process.
## Quick Start
## 1. Preparation
Open PowerShell in your EasyTier directory and run:
**Download EasyTier Application**:
```PowerShell
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd
```
Download the latest version of the `Windows` operating system `command line program` compressed package.
If GitHub is not accessible, use the mirror proxy command instead:
After downloading, extract the compressed package to a local directory, such as `D:\EasyTier`.
```PowerShell
iwr "https://ghfast.top/https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd -ughp
```
The current directory should contain at least the following files:
The script will guide you through the setup and start the service automatically after installation succeeds.
- `easytier-core.exe` (core program)
- `easytier-cli.exe` (command line tool)
- `Packet.dll` (runtime library)
- `wintun.dll` (runtime library)
## Before You Start
**Download NSSM**:
1. Download the latest Windows command line package.
2. Extract it to a fixed directory such as `D:\EasyTier`.
3. Download `install.cmd` into the same directory:
Open your browser and visit the NSSM official website [https://nssm.cc/](https://nssm.cc/download).
```PowerShell
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"
```
On the official website page, find the version suitable for your system (usually the latest version), click the download link to download it locally.
4. Make sure the directory contains at least these files:
After downloading, find the version corresponding to your device architecture (such as: `win64`), and extract the `nssm.exe` from it to the local directory where `EasyTier` is located.
- `easytier-core.exe`
- `easytier-cli.exe`
- `Packet.dll`
- `wintun.dll`
- `install.cmd`
**Download Install/Uninstall Script**:
Do not move this directory after installation, or the service path configuration may break.
Start PowerShell in the current directory and execute the following commands:
## Installation Steps
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/install.cmd" -OutFile "install.cmd"`
1. Open PowerShell in the EasyTier directory.
2. Run the install script:
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/uninstall.cmd" -OutFile "uninstall.cmd"`
```PowerShell
.\install.cmd
```
## 2. Preparation Work
3. Choose a configuration mode and provide the required values when prompted.
4. After the script finishes, the Windows service is created and started automatically.
1. Ensure the current directory contains the following files:
## Configuration Modes
- `easytier-core.exe` (core program)
- `easytier-cli.exe` (command line tool)
- `nssm.exe` (service management tool)
- `Packet.dll` (runtime library)
- `wintun.dll` (runtime library)
- `install.cmd` (install script)
- `uninstall.cmd` (uninstall script)
- `File`: use a local configuration file. Best when you already have a config file prepared.
- `Remote`: use centralized management from a remote server. Best for managing multiple devices.
- `CLI`: pass parameters directly on the command line. Best for quick testing or custom startup arguments.
2. Place the entire folder in a fixed location.
## Common Commands
## 3. Install Service
- Install the service:
1. Run `install.cmd`
2. Follow the prompts to enter configuration information.
3. After installation is complete, the service will start automatically.
```PowerShell
.\install.cmd
```
## 4. Uninstall Service
- Uninstall the service:
1. Run `uninstall.cmd`
2. The script will automatically stop and delete the service.
```PowerShell
.\install.cmd -Uninstall
```
## 5. Notes
- Update EasyTier:
1. Do not move the program file location after installation
```PowerShell
.\install.cmd -Update
```
## 6. Common Questions
## Parameter Reference
**Q: How to modify service configuration?**
### Basic
- `-H` / `-?` / `-Help`: show help information and exit.
### Service Actions
- `-U` / `-Update`: update EasyTier to the latest version.
- `-X` / `-Uninstall`: uninstall the EasyTier service.
### Download Proxies
- `-UGHP` / `-UseGitHubProxy`: download through a GitHub mirror proxy. Default: `$false`.
- `-GHP` / `-GitHubProxy <proxy>`: specify the GitHub mirror proxy address. Default: `https://ghfast.top/`.
- `-UP` / `-UseProxy`: use a custom proxy. Default: `$false`.
- `-P` / `-Proxy <proxy>`: specify the custom proxy address. Default: `http://127.0.0.1:7890`.
### Configuration and Service Name
- `-C` / `-ConfigType <type>`: set the configuration mode. Supported values: `File`, `Remote`, `CLI`.
- `-N` / `-ServiceName <name>`: set the installed service name. Default: `EasyTierService`.
- `<other arguments...>`: when `CLI` mode is used, any remaining arguments are passed to EasyTier.
## FAQ
**Q: How do I change the service configuration?**
A: First run `.\install.cmd -Uninstall`, then install the service again with the new configuration.
**Q: Why should I keep the directory in the same place after installation?**
A: The Windows service stores the paths to the EasyTier executables and script. If the directory moves, the service may fail to start.
A: First uninstall the service, then reinstall it

View File

@@ -41,36 +41,41 @@
::: details docker-compose.yml
```yaml [docker-compose.yml]
services:
watchtower: # 用于自动更新easytier镜像若不需要请删除这部分
image: containrrr/watchtower
container_name: watchtower
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- WATCHTOWER_NO_STARTUP_MESSAGE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 --cleanup --label-enable
easytier:
image: easytier/easytier:latest # 国内用户可以使用 m.daocloud.io/docker.io/easytier/easytier:latest
hostname: easytier
container_name: easytier
labels:
com.centurylinklabs.watchtower.enable: 'true'
restart: unless-stopped
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
environment:
- TZ=Asia/Shanghai
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- /etc/easytier:/root
- /etc/machine-id:/etc/machine-id:ro # 映射宿主机机器码
command: -d --network-name <用户> --network-secret <密码> -p tcp://<您的公网IP>:11010
services:
# watchtower 用于自动更新 EasyTier 镜像,若不需要可以删除此节
watchtower:
image: nickfedor/watchtower
container_name: watchtower
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- WATCHTOWER_NO_STARTUP_MESSAGE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 --cleanup --label-enable
easytier:
# 国内用户可以使用 daocloud.io 镜像
# image: m.daocloud.io/docker.io/easytier/easytier:latest
image: easytier/easytier:latest
hostname: easytier
container_name: easytier
labels:
com.centurylinklabs.watchtower.enable: 'true'
restart: unless-stopped
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
environment:
- TZ=Asia/Shanghai
devices:
- /dev/net/tun:/dev/net/tun
volumes:
- /etc/machine-id:/etc/machine-id:ro
command: >
-d --network-name <用户> --network-secret <密码>
-p tcp://<其他对等节点 / 公共节点的公网 IP>:11010
```
:::

View File

@@ -1,115 +1,72 @@
# 安装为 Windows 服务
将 EasyTier 安装为 Windows 服务后,它可以在后台自动运行,并支持随系统启动,适合长期在线或无人值守的场景。
> 感谢 北辰℃ 提供的教程,以及由 dawn-lc 提供的一键安装/卸载脚本
当前推荐直接使用官方 `install.cmd` 脚本完成安装、更新和卸载,无需再手动准备 NSSM
在 Windows 系统中,将某些应用程序安装为服务可以使其在后台自动运行,无需用户手动干预,极大地提高了应用的运行稳定性和便捷性
> 感谢 北辰℃ 提供的教程,以及 dawn-lc 提供的一键安装/卸载脚本
本教程将以使用 NSSMNon-Sucking Service Manager工具将 EasyTier 应用安装为 Windows 服务为例,详细介绍整个操作流程
## 快速开始
## 一、前期准备
推荐直接在 EasyTier 文件目录中打开 PowerShell然后执行
**下载 EasyTier 应用**
```PowerShell
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd
```
下载最新版本的 `Windows` 操作系统的 `命令行程序` 压缩包。
如果无法访问 GitHub可以使用镜像代理
下载完成后,将该压缩包解压到本地目录,比如`D:\EasyTier`
```PowerShell
iwr "https://ghfast.top/https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"; .\install.cmd -ughp
```
当前目录下应至少包含以下文件:
- `easytier-core.exe` (核心程序)
- `easytier-cli.exe` (命令行工具)
- `Packet.dll` (运行库)
- `wintun.dll` (运行库)
脚本会根据提示完成配置,并在安装成功后自动启动服务。
**下载 NSSM**
## 安装前准备
打开浏览器,访问 NSSM 官网 [https://nssm.cc/](https://nssm.cc/download)。
1. 下载最新版本的 Windows 命令行程序压缩包
2. 将压缩包解压到固定目录,例如 `D:\EasyTier`
3. 在该目录中下载 `install.cmd`
在官网页面中找到适用于你系统的版本(通常是最新版本),点击下载链接将其下载到本地
```PowerShell
iwr "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.cmd" -OutFile "install.cmd"
```
下载完成后,找到对应您设备架构的版本(如:`win64`),将其中的`nssm.exe`解压到`EasyTier`所在的本地目录。
4. 确认目录中至少包含以下文件:
- `easytier-core.exe`
- `easytier-cli.exe`
- `Packet.dll`
- `wintun.dll`
- `install.cmd`
**下载 安装/卸载 脚本**
安装完成后请不要移动该目录,否则服务配置中的路径会失效。
在当前目录下启动PowerShell并执行以下命令:
## 安装流程
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/install.cmd" -OutFile "install.cmd"`
1. 在 EasyTier 所在目录中打开 PowerShell。
2. 运行安装脚本:
`iwr "https://github.com/EasyTier/EasyTier/raw/refs/heads/main/script/uninstall.cmd" -OutFile "uninstall.cmd"`
```PowerShell
.\install.cmd
```
## 二、准备工作
3. 根据提示选择配置模式,并填写所需参数。
4. 安装完成后,脚本会自动创建并启动 Windows 服务。
1. 确保当前目录下包含以下文件:
- `easytier-core.exe` (核心程序)
- `easytier-cli.exe` (命令行工具)
- `nssm.exe` (服务管理工具)
- `Packet.dll` (运行库)
- `wintun.dll` (运行库)
- `install.cmd` (安装脚本)
- `uninstall.cmd` (卸载脚本)
## 配置模式说明
2. 将整个文件夹放在固定位置。
- `File`:使用本地配置文件,适合已经准备好配置文件的场景。
- `Remote`:使用远程服务器集中管理,适合统一维护多台设备。
- `CLI`:直接通过命令行传参启动,适合临时调试或自定义参数较多的场景。
## 三、安装服务
## 常用命令
1. 运行`install.cmd`
2. 按照提示输入配置信息。
4. 安装完成后会自动启动服务。
- 安装服务
## 四、卸载服务
```PowerShell
.\install.cmd
```
1. 运行`uninstall.cmd`
2. 脚本会自动停止并删除服务。
- 卸载服务:
## 五、注意事项
```PowerShell
.\install.cmd -Uninstall
```
1. 安装后不要移动程序文件位置
- 更新 EasyTier
```PowerShell
.\install.cmd -Update
```
## 参数参考
### 基础参数
- `-H` / `-?` / `-Help`:显示帮助信息并退出。
### 服务操作
- `-U` / `-Update`:更新 EasyTier 到最新版本。
- `-X` / `-Uninstall`:卸载 EasyTier 服务。
### 下载代理
- `-UGHP` / `-UseGitHubProxy`:使用 GitHub 镜像代理下载,默认值为 `$false`。
- `-GHP` / `-GitHubProxy <代理地址>`:指定 GitHub 镜像代理地址,默认值为 `https://ghfast.top/`。
- `-UP` / `-UseProxy`:使用自定义代理,默认值为 `$false`。
- `-P` / `-Proxy <代理地址>`:指定自定义代理地址,默认值为 `http://127.0.0.1:7890`。
### 配置与服务名
- `-C` / `-ConfigType <类型>`:指定配置模式,可选值为 `File`、`Remote`、`CLI`。
- `-N` / `-ServiceName <名称>`:指定安装后的服务名,默认值为 `EasyTierService`。
- `<其他参数...>`:当使用 `CLI` 模式时,会作为额外参数传递给 EasyTier。
## 常见问题
## 六、常见问题
**Q: 如何修改服务配置?**
A: 先执行 `.\install.cmd -Uninstall` 卸载服务,再使用新的配置重新安装
**Q: 为什么安装后不能移动目录?**
A: Windows 服务会记录 EasyTier 可执行文件和脚本所在路径,移动目录后服务可能无法正常启动。
A: 先卸载服务,然后重新安装