零配置私有服务多路径共享
简介
在 Tailscale 私有网络中快速搭建多路径文件/服务共享,无需公网 IP 即可安全访问本地资源
原始描述
Manage multiple paths with tailscale serve, serving files, directories, or ports simultaneously without conflicts and control via background mode.
通过你的 Agent 添加
安装目录:tailscale-serve/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
Tailscale Serve Skill
Manage multiple paths with tailscale serve without conflicts.
Key Commands
Check what's currently served
tailscale serve status
Serve a directory or file at a specific path
# Directory
tailscale serve --bg --set-path /slides /path/to/directory
# Single file
tailscale serve --bg --set-path /presentation /path/to/file.html
# Port (for running services)
tailscale serve --bg --set-path /api http://localhost:8080
Serve from a port at root (replaces everything)
tailscale serve --bg 8888
Remove a specific path
tailscale serve --https=443 /slides off
Reset all serving
tailscale serve reset
Important Notes
- Path conflicts: Serving at
/ will override all other paths
- Background mode: Use
--bg to keep it running
- Multiple paths: You can serve multiple things simultaneously with different paths
- Status first: Always check
tailscale serve status before adding new paths
Common Patterns
Serve presentation alongside control UI
# If control UI is at /, serve presentation at a subpath
tailscale serve --bg --set-path /slides ~/clawd/personal-agents-presentation.html
# Access at: https://[hostname].ts.net/slides
Serve multiple directories
tailscale serve --bg --set-path /docs ~/documents
tailscale serve --bg --set-path /slides ~/presentations
tailscale serve --bg --set-path /files ~/files
Serve a local dev server
tailscale serve --bg --set-path /app http://localhost:3000
Workflow
- Check current status:
tailscale serve status
- Choose an unused path (e.g.,
/slides, /docs, /api)
- Serve with
--set-path /your-path /source
- Verify with
tailscale serve status again
- Share the full URL:
https://[hostname].ts.net/your-path
Troubleshooting
# Directory
tailscale serve --bg --set-path /slides /path/to/directory
# Single file
tailscale serve --bg --set-path /presentation /path/to/file.html
# Port (for running services)
tailscale serve --bg --set-path /api http://localhost:8080
tailscale serve --bg 8888
Remove a specific path
tailscale serve --https=443 /slides off
Reset all serving
tailscale serve reset
Important Notes
- Path conflicts: Serving at
/ will override all other paths
- Background mode: Use
--bg to keep it running
- Multiple paths: You can serve multiple things simultaneously with different paths
- Status first: Always check
tailscale serve status before adding new paths
Common Patterns
Serve presentation alongside control UI
# If control UI is at /, serve presentation at a subpath
tailscale serve --bg --set-path /slides ~/clawd/personal-agents-presentation.html
# Access at: https://[hostname].ts.net/slides
Serve multiple directories
tailscale serve --bg --set-path /docs ~/documents
tailscale serve --bg --set-path /slides ~/presentations
tailscale serve --bg --set-path /files ~/files
Serve a local dev server
tailscale serve --bg --set-path /app http://localhost:3000
Workflow
- Check current status:
tailscale serve status
- Choose an unused path (e.g.,
/slides, /docs, /api)
- Serve with
--set-path /your-path /source
- Verify with
tailscale serve status again
- Share the full URL:
https://[hostname].ts.net/your-path
Troubleshooting
tailscale serve --https=443 /slides off
tailscale serve reset
Important Notes
- Path conflicts: Serving at
/ will override all other paths
- Background mode: Use
--bg to keep it running
- Multiple paths: You can serve multiple things simultaneously with different paths
- Status first: Always check
tailscale serve status before adding new paths
Common Patterns
Serve presentation alongside control UI
# If control UI is at /, serve presentation at a subpath
tailscale serve --bg --set-path /slides ~/clawd/personal-agents-presentation.html
# Access at: https://[hostname].ts.net/slides
Serve multiple directories
/ will override all other paths--bg to keep it runningtailscale serve status before adding new pathsServe presentation alongside control UI
# If control UI is at /, serve presentation at a subpath
tailscale serve --bg --set-path /slides ~/clawd/personal-agents-presentation.html
# Access at: https://[hostname].ts.net/slides
tailscale serve --bg --set-path /docs ~/documents
tailscale serve --bg --set-path /slides ~/presentations
tailscale serve --bg --set-path /files ~/files
Serve a local dev server
tailscale serve --bg --set-path /app http://localhost:3000
Workflow
- Check current status:
tailscale serve status
- Choose an unused path (e.g.,
/slides, /docs, /api)
- Serve with
--set-path /your-path /source
- Verify with
tailscale serve status again
- Share the full URL:
https://[hostname].ts.net/your-path
Troubleshooting
tailscale serve --bg --set-path /app http://localhost:3000
- Check current status:
tailscale serve status - Choose an unused path (e.g.,
/slides,/docs,/api) - Serve with
--set-path /your-path /source - Verify with
tailscale serve statusagain - Share the full URL:
https://[hostname].ts.net/your-path
Troubleshooting
"Can't access my served content"
- Check
tailscale serve status- is it at the path you expect? - Did something else overwrite the root
/?
"Want to replace everything with a port"
tailscale serve reset
tailscale serve --bg 8888
"Want to add to existing setup"
# Don't use reset! Just add with --set-path
tailscale serve --bg --set-path /newpath /source
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。