docker启动
docker run --restart always \--name derper -p 12345:12345 -p 3478:3478/udp \-v /root/.acme.sh/xxxx/:/app/certs \-e DERP_CERT_MODE=manual \-e DERP_ADDR=12345 \-e DERP_DOMAIN=xxxx \-d ghcr.io/yangchuansheng/derper:latest
docker-compose启动
version: "3"services:derper:container_name: derperimage: ghcr.io/yangchuansheng/derper:latestenvironment:- DERP_HOST=xxx.xxx.xxx.xxx(公网IP)- DERP_CERT_MODE=manual# - DERP_ADDR=12345- DERP_DOMAIN=(域名)- DERP_STUN=true- DERP_VERIFY_CLIENTS=falsevolumes:- ./certs/derper.xxxxxx.top/:/app/certsports:- "12345:12345"- "3478:3478/udp"restart: alwaysnetwork_mode: host
参考文档:
自建 DERP 中继服务器,从此 Tailscale 畅通无阻