Tailscale is incredibly slow as exit node, while there is a direct connection

Everywhere i look online, tailscale being slow is caused by switching to relay servers when a direct connection cannot be made.
However when i ping home assistant using cellular data on my phone using the tailscale app, it reports there is a direct connection.
I really want this solved and the issue came out of nowwhere. from one day to the other, while i didn’t change any settings. I hope to fix this, and will try to explain the issue in as much detail as possible.

So here is my setup:

tailscale on home assistant OS is running as a exit node, does not have configured settings in the configuration. so everything is on standard. both the tailscale add-on and home assistant core are at the latest versions, as well as the devices that are accessing home assistant.
I have set up a https connection using nginx proxy manager and my domain. i can now use https to access home assistant through my domain. However, it is not making a difference compared to accessing home assistant through the local IP address thats exposed.

What i have tried to solve it:

Using the direct tailscale IP, the domain or the local IP to access home assistant does not matter. all of them are slow outside of my local LAN. within my lan network, everything is blazing fast.

I tried enabling/disabling magicdns to no luck.

I tried removing the key of tailscale and uninstalling tailscale from home assistant, then rebooting, then installing it again, and of course configuring to no luck.

In all the tests i have done, there is always a direct connection to home assistant, according to the tailscale app on my phone using the ping test thats build-in.
I also tried using other wifi networks instead of cellular, they are also super slow.

Speedtest Results:
1,37mbit with home assistant as exit node using cellular data on my phone. without tailscale connected, it’s 56mbit. Upload speed, weirdly enough, was the same at 8mbit, both with exit node connected and without exit node connected.

Would love some assistance to find out why this is so slow. Thanks for reading!

1 Like

What HW do you have HA installed on? Tailscale (or rather wireguard that sits underneat) might be quite resource consuming. I have 1Gbps FTTH connection at home and when using wireguard VPN I get only 80~85Mbps connection, as my Draytek router runs at 95% of CPU at that time!
How exactly is your network configured? You mention using cellular connection from your phone, but is it used as hotspot to conenct HA to Internat or you are running tests from mobile phone connecting to HA, that uses some fixed Internet connection? What is the speed of this link (down/up)?
What is the use case for configuring Tailscale on your HA as exit node? This causes all of your devices with Tailscale active to connect to public internet from your home via HA. If you use Tailscale on HA just to connect to HA, then you do not need either subnet router or exit node functionality to be switched on.

No solution but I have the same experience and frustration.
I have a connection through HomeAssistant and another through a Proxmox setup. Both are about the same, and much slower that the mobile data or remote WiFi permits.

1Gbps FTTH for me too and get a tiny amount. The Proxmox server I run shows the CPU load only at around 2%, so not maxing that out. Latest Unifi Hardware/Router for the home and that has got plenty of performance left to give.

I want to solve it too, but never spent the time on it so following and happy to share thoughts and try things that may be suggested.

1 Like

My router permanently runs wireguard as well. So when i am using home assistant as exit node, all my devices are standard protected behind a vpn with no log policy.
Regarding use case: this allows me to check all the local devices running at home, such as camera settings, movement sensors on wifi and my routers settings, but mostly of course home assistant access from anywhere.

The device running HAOS is a minipc with a n100 cpu. I checked htop in the CLI and while usage is high with all my cameras, disabling frigate did not solve it. I already have seen that frigate uses around 20% of the cpu, and the cpu in total is around 60% usage on average, switching between low and higher clock speed.
Around 10 minutes ago, it was super fast. I seem to get extremely fast connections at random times, but they last for a maximum of 1-2 minutes. And then only like once per week that i notice that. Mostly its so slow that loading the first page after starting the companion app takes around 10 seconds. Loading a frigate card’s first frame takes around 15 seconds. Unusable.

My phone is never acting as hotspot for any device. Minipc and desktop pc go to router by lan cable. Direct speedtests on home assistant and desktop pc are almost as high as my ISP allows. On home assistant 300-400mbit and on my windows desktop around 350-450mbit. It also depends on the vpn server’s activity.

Did you try to use the tailscape app on phone to ping your home assistant exit node?
Hold down on your exit node then click ping. Wondering if your slow exit node also has a direct connection.

I don’t see the option. iPhone user maybe different OS have different options. Will dedicate some time to trying to solve this though, or find alternatives. I moved back from Wire-guard as seemed to drain battery. Though now I only activate when I need to, instead of all the time.

So it means you are running Tailscale VPN tunnel over the Wireguard tunnel? You should expect some slow down then!
Then using Tailscale as exit node does not protect all devices, but only these, that runs Tailscale client. Other are protected by Wiregurd. I’d create some load ballancing rules on router to use Wireguard only for devices not protected by Tailscale.

Wireguard on my router is dedicated to specific connections I want to keep secure and for devices without Tailscale client installed. I’m running Tailscale as exit node on my Synology NAS. Results when testing speed via home WiFi (limited by WiFi 5 AP):

  • without Tailscale exit node: 370/100Mbps
  • with Tailscale as exit node: 168/22Mbps (so overhead of Tailscale is clearly visible)

When connecting over cellular (5G):

  • without tailscale (so directly to Internet): 109/15Mbps
  • with Tailscale as exit node (so connecting to home, running connection through NAS/Tailscale and out to public Internet via FTTH): 78/15Mbps

As you can see there is some slow down from using Tailscale as exit node, but yet speeds are reasonable.

For this you only need Subnet Router being configured on Tailscale. Then Tailscale client acts as router TO your home network and any other device outside your house can connect to your local devices using their LAN IP (not Tailnet IPs).

Your PC should be powerful enough not to be a bottleneck, it has better processor than my NAS (Atom C3538) and in my case is quite loaded running some VMs and docker apps.

yes, i am expecting slowdowns. but not towards a speed test of below 2mbit, and i feel that accessing home assistant is even slower then 2mbit. feels like 100kbit or so because the dashboard loads in 10 seconds or so.

And note that my router also has very strong hardware that is not slowing down due to running wireguard vpn. speeds are maxed out to what my ISP plan offers. i already seen other people with the same router do tests, and the router cannot handle 1gbit fully using wireguard. but my 500mbit is no problem.

just for the heck of it, i just tried disabling the wireguard vpn on the router, unfortunately no luck, still slow.

i used openspeedtest to test the device speed. im getting 0.6mbit down from my phone using cellular to home assistant, with tailscale connected. crazy slow, thats less then 100kB per second.

i did the same test on my desktop windows pc now, thats connected to the same router as the home assistant OS minipc. both connected by lan cable.
Results are 28.2mbit down, 5.6mbit up. This is while using the home assistant minipc as exit node.

Then connected back to home assistant itself, still as a exit node. 0.7mbit down, 5.6mbit up.

And out of curiosity a ookla speedtest to the internet with haos as exit node enabled. 1.62mbit down, 3,50mbit up. So around the same result as in post 1 of this thread.

all tests above are with cellular data on my android galaxy s21 ultra phone.

EDIT: i should note that im also in contact with the tailscale team about this now. they took quite a while to respond and thought it was my cell provider giving me slow data, but unfortunately thats not the case as my windows pc is fast, and my home wifi was also slow connecting to home assistant. hope we can figure this out. at least with the windows test of my desktop pc we can conclude there’s something on either tailscale’s end, or on the home assistant minipc or home assistant tailscale add-on thats wrong.

1 Like

Have you tested this from any other device? I’m not into android, so cannot judge this, but perhaps there is something wrong with Tailscale on your mobile or phone itself, that causes slowness?

in my case with iphone app,

speedtest is:
WiFi
112 D, 100 U
via tailscale and hass exit node on wifi its the same. That is on the home network.

Mobile Data
26 D, 0.7 U
via tailscale 4 D 0.14 U
Granted the moble data where I am now is pretty pathetic, but its more pathetic on Tailscale. When the connection is better, away from home, the gap is far larger.

I am behind a CG NAT (research suggests!) with my ISP (Be Fibre/Full Fibre UK) so I have a challenge getting Wireguard or others to work. Just realised its an option on the router to use Wireguard (Unifi Cloud Gateway Ultra) but too hard for me to figure out. Installing in Hass doesnt work, following a guide that had workded before for me, before moving ISP a year back.

I have an external IP on the router that is different to the external IP if I ‘whatsmyip’ . Tailscale at least works, just very ssssllllooooowww

Good suggestion, i just tried it with my wife’s samsung phone. it is quite less powerful then my s21 ultra, but the speed was 1.4mbit, double then what i got on my more powerful phone. i also saw that the home assistant app was slow, but do-able for tasks other then watching video. Very weird!

Openspeedtest result from work wifi to the local ip of home assistant using home assistant as exit node shows that upload speed is not affected so it seems.
64mbit up, 1mbit down. Also previous tests show no problem with upload speeds.
@richsimpson do you also experience that?

I will test over a different wifi and report back.

In the meantime I have changed my ISP and now have a static IP so I can at least implement the router based Wireguard VPN on my Unifi Cloud Gateway Ultra. Removing the CGNAT issue I had that prevented Wireguard or others solutions and meaning I had to rely on Tailscale. This was a long overdue fix I needed to make anyway. This will also mean I can see if it is a VPN thing full stop, or a specific Tailscale issue.

I think that means that we both have similar circumstances and test basis too.

A static ip or not shouldnt matter with tailscale…but who knows. Did you try a other device connected to the same router at your home? Its fast for me(even usinf home assistant as exit node and connected to that, so it’s something to do with home assistant, the tailscale add-on or tailscale itself.

No shouldnt affect Tailscale. It worked but slow.

Now I can also use Wireguard without some really complicated setup, so I can use that as a comparison. Wireguard direct on the router, so no slow don on the HASS enabled machine and ext nodes.

If they are both the same then its not Tailscale. If it is then I have 2 x Tailscale options setup. One on a fast laptop running Proxmox, and another instance within the HASS setup.

I am away this weekend so can do some real testing of the various scenarios and report back.

EDIT - Oh and yes same network with a speedtest and then speedtest via tailscale/hass exit node connection is fast. More or less the same.

Let us know. Especially curious if your upload speed is unaffected like it is with me.