Custom own DERP with high-speed VPS
Question
Is it possible for me to rent a high-speed vps to be my own DERP server?. And are there detailed instructions for creating your own DERP server? I read the Docs on the homepage but still don't understand how to deploy. Thanks so much
Sort by:
Best
Open comment sort options
Comments Section
It will help with latency (ping), but not much for speed. The problem is derp relay use tcp, not udp. I give up my custom derp long time ago.
I wish there was a Tailscale router.
So, how to customize DERP using UDP protocol?, do you know?
The issue with speed is because Tailscale's DERP relay servers are public and thus throttled heavily to accommodate many users.
Could you explain this a little more? I think most people want to host their own DERP server in order to avoid the congested/throttled public DERP relay servers. So, I still would expect a throughput improvement by hosting a custom DERP server on the same device as my exit node. No?
Yes there are tons of VPS offering cheap boxes for people to "rent". My suggestion is find something that is very close to your home/country to minimize latency as much as possible
Note: If you are dealing with tailscale clients in different countries/locations you will want to pick a VPS that will let you stand up a virtual box in a country that is closes between the different countries. This can get tricky if you have clients on opposites sides of the world or clients that are constantly on the move/traveling.
Pick a VPS that meets your budget
Pick a distro for your server (Go with ubuntu)
Important step: Make sure the SSH port is locked down to YOUR public ip address, that way you dont expose SSH directly to the entire internet
SSH into your VPS and update your virtual server
apt-get update && apt-get dist-upgrade
Once its updated then walk through these steps:
https://headscale.net/running-headscale-linux/#installation
Depending on what VPS you go with you might need to open up the ports for headscale to work
https://earvingad.github.io/posts/headscale/
AWS lightsail is pretty simple when it comes to standing up an instance, but make sure you understand the costs associated with it once the free tier ends
Make sure you read up on the VPS when it comes to bandwidth. Some do charge when you hit a certain threshold when it comes to data out of a VPS (this varies from VPS to VPS) so do your research! Last thing you want is a random huge bill because you transferred a ton of stuff with your VPS
Thank you for your enthusiastic support. Do i need open any ports (NAT) for headscale ?
My experience is that it's still really slow unfortunately