docs: 新增 LXC 部署注意事項、節點對照表、symlink 設定

記錄 Proxmox LXC 環境需使用 --tun=userspace-networking 的解法、
TS_USERSPACE 環境變數在新版失效的坑,以及 /usr/local/bin 的 symlink 設定。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 09:59:56 +08:00
parent 2ffa06ac80
commit a2946efeda
2 changed files with 51 additions and 1 deletions

View File

@@ -46,6 +46,38 @@
`./tailscale``docker exec -i tailscale tailscale` 的包裝腳本。
部署後建議建立 symlink 讓系統全域可用:
```bash
ln -sf /opt/tailscale/tailscale /usr/local/bin/tailscale
```
之後即可在任何路徑直接執行 `tailscale status` 等指令。
## Proxmox LXC 部署注意事項
LXC 容器環境下 `/dev/net/tun` 不存在且無法用 `mknod` 建立tailscaled 會啟動失敗。
**解法:** 使用 userspace networking 模式:
```yaml
# docker-compose.yml
command: >
sh -c "tailscaled --tun=userspace-networking"
```
並移除 volumes 中的 `/dev/net/tun:/dev/net/tun` 掛載。
**注意:**
- `TS_USERSPACE=true` 環境變數在新版 Tailscalev1.96+)無效,必須直接傳 `--tun=userspace-networking` 參數
- userspace networking 模式**不支援** `--advertise-routes``--advertise-exit-node`,該節點無法作為子網路由器或出口節點
## 節點部署對照表
| 主機 | 類型 | Tailscale IP | 主機名稱 | 備註 |
|------|------|-------------|---------|------|
| 192.168.42.126 | Proxmox LXC | 100.64.0.8 | ip-192-168-42-126 | userspace networking無路由/出口功能 |
## 防火牆與路由設定
在主機上執行: