# 🐧 Raspberry Pi + Tailscale 安裝與使用完整教程
> 讓你的 Raspberry Pi 輕鬆加入零設定 VPN
> 遠端 SSH、IoT 控制、出國用家裡 IP,全都一次搞定!
---
## 📌 什麼是 Tailscale?
Tailscale 是一個基於 WireGuard 的零設定 VPN,可以讓所有裝置形成自己的「私有網路」。
你能做到:
- 從外面安全 SSH 回 Raspberry Pi
- 讓手機/筆電像在家裡上網
- 遠端控制家裡設備
- 整個團隊共用一個安全網路
---
## 📌 前置需求
- Raspberry Pi(建議:Pi 3 / Pi 4 / Pi 5)
- 作業系統:Raspberry Pi OS / Debian / Ubuntu 均可
- 一個 Tailscale 帳號
(可用 Google / Microsoft / GitHub / Apple 登入)
---
# 🥝 Step 1 — 更新系統套件
建議先更新系統避免相依問題:
```bash
sudo apt update && sudo apt upgrade -y
```
2. 安裝 Tailscale
Tailscale 提供官方安裝指令:
```
curl -fsSL https://tailscale.com/install.sh | sh
```
3. 啟動並登入 Tailscale
```
sudo tailscale up
```
執行後終端機會跳出一段網址,例如:
```
To authenticate, visit:
https://login.tailscale.com/a/xxxxx
```
在你的電腦或手機開啟這個網址 → 以 Google/Microsoft/Apple 登入你的帳號。
4. 確認 Raspberry Pi 已成功加入 Tailscale
登入後,執行:
```
tailscale status
```
你會看到類似:
```
100.100.x.x raspberrypi online
```
另外也可以到 Tailscale 管理頁:
👉 https://login.tailscale.com/admin/machines