It’s not super well fleshed out by Tailscale but they have a guide.
https://tailscale.com/kb/1118/custom-derp-servers
My last company ran our own DERP servers to have more consistent endpoints we controlled