網路與服務工具
PocketBase、changedetection、Slack 與 DNS 服務完整指南。
📦 後端服務
PocketBase
核心內容:
- PocketBase 安裝與設置
- 資料庫管理
- API 設計
- 身份驗證
- 實時訂閱
- 部署指南
🔍 監控與協作
changedetection.io
核心內容:
- 網頁變更監控
- 通知設置
- 過濾規則
- 自動化工作流
- 實用案例
Slack
核心內容:
- Socket Mode 設置
- 事件訂閱
- Bot 開發
- 互動組件
- 最佳實踐
🌐 DNS 與網域
DuckDNS
核心內容:
- 動態 DNS 設置
- IP 自動更新
- 定時腳本
- 故障排除
SSL 證書
核心內容:
- Let's Encrypt 證書申請
- 自動續期設置
- DuckDNS 整合
- HTTPS 配置
- 安全最佳實踐
網路工具
核心內容:
- 網路診斷工具
- 封包分析
- 連線測試
- 效能監控
💡 實戰應用
PocketBase 快速開始
# 下載 PocketBase
wget https://github.com/pocketbase/pocketbase/releases/download/v0.20.0/pocketbase_0.20.0_linux_amd64.zip
unzip pocketbase_0.20.0_linux_amd64.zip
# 啟動服務
./pocketbase serve
# 訪問管理介面
open http://127.0.0.1:8090/_/
DuckDNS 自動更新腳本
#!/bin/bash
# duckdns-update.sh
DOMAIN="your-domain"
TOKEN="your-token"
curl "https://www.duckdns.org/update?domains=${DOMAIN}&token=${TOKEN}"
# 加入 crontab
# */5 * * * * /path/to/duckdns-update.sh
Let's Encrypt 證書申請
# 安裝 certbot
sudo apt install certbot
# 申請證書(使用 DNS 驗證)
sudo certbot certonly --manual --preferred-challenges dns -d *.yourdomain.duckdns.org
# 自動續期
sudo certbot renew --dry-run
Slack Bot 快速開始
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler
app = App(token="xoxb-your-token")
@app.message("hello")
def message_hello(message, say):
say(f"Hi <@{message['user']}>!")
if __name__ == "__main__":
handler = SocketModeHandler(app, "xapp-your-app-token")
handler.start()
changedetection 監控設置
# docker-compose.yml
version: '3'
services:
changedetection:
image: ghcr.io/dgtlmoon/changedetection.io
ports:
- 5000:5000
volumes:
- ./datastore:/datastore
environment:
- PUID=1000
- PGID=1000
最後更新: 2025-12-01