Operations Guide · EN + 繁中

How to Run Multiple Services on a Single VPS

A practical setup for Caddy, Hysteria2, and Node services on one VPS, while safely sharing port 443.

English

Architecture

  • Caddy on TCP 80/443 for websites and reverse proxy.
  • Hysteria2 on UDP 443 for proxy traffic.
  • Node app (for example books) on 3001, proxied by Caddy.

Core steps

  1. Set Hysteria2 listen: :443 in /etc/hysteria/config.yaml.
  2. Disable Caddy HTTP/3: { servers { protocols h1 h2 } }.
  3. Validate and reload Caddy.
  4. Confirm ports with ss -lntup.

Expected result

caddy listens on TCP 443, and hysteria listens on UDP 443, no conflict.

繁體中文

架構說明

  • Caddy 使用 TCP 80/443 提供網站與反向代理。
  • Hysteria2 使用 UDP 443 提供代理服務。
  • Node 應用(例如 books)跑在 3001,由 Caddy 反代。

核心步驟

  1. /etc/hysteria/config.yaml 設定 listen: :443
  2. 在 Caddy 全域停用 HTTP/3:{ servers { protocols h1 h2 } }
  3. 驗證並重載 Caddy 設定。
  4. ss -lntup 確認連接埠。

預期結果

caddy 監聽 TCP 443hysteria 監聽 UDP 443,兩者可同機並行。