r/netbird • • 8d ago

self-hosted reverse proxy slow speeds

I'm so frustrated with Netbird reverse proxy slow speeds! specially when it comes to jellyfin and nextcloud!

is this issue common?

to put my setups simply:

- VPS ubuntu (from hostinger) self-hosted netbird latest

- locally 2 Truenas servers (made as a resource and 2 routing peers for high availability on netbird)

- Jellyfin and nextcloud runing on main server truenas

- (both jellyfin and nextcloud reverse proxy configuration were made following TechHub "netbird" official tutorial so i don't believe there's a config issue here!

the issue:

P2P connection (remotely) using netbird client give full speed.

But using the reverse proxy i see 20 maybe 30% of the actual speed (for jellyfin that just constant buffering and for nextcloud slow upload and download speeds)

i have started a discussion in github https://github.com/netbirdio/netbird/discussions/8665

3 Upvotes

18 comments sorted by

2

u/lagdetselv 8d ago

cause of many issues with netbird reverse proxy I started to make my own reverse proxy. Traefik on my own VPS routes on a netbird tunnle to my local (DMZ) traefik which then routes to my internal services.

1

u/Foreignwelcome2 8d ago

How is that working for you? Also can give steps to reproduce this not the most tech savvy

1

u/lagdetselv 8d ago

Working great. If youre not that tech savy I wouldn't reccomend it, because you are more vulnerable to the internet if you don't take steps to correctly secure it.

For more detailed steps feel free to DM me. Don't want to write up my setup publically.

1

u/foofoo300 8d ago

i find that it is still slower than plain wireguard for that matter, i am going back to plain wireguard for fast connections, sucks though

1

u/lagdetselv 8d ago

I don't have tested that because I always connect through the netbird vpn.. 

1

u/StillLoading_ 8d ago

Proxy is probably only doing relayed connrctions to your backend services. You can enable the debug endpoint on the proxy container via env vars to check the embedded netbird client status. Or you check the connection to the proxy-<random id> peer on your backend server (e.g. nextcloud).

If thats the case, there has been a fix for that in 0.83 that allows you to map your VPS public IP to the proxy container. You also need to set and forward a wireguard port to the container to get P2P working.

1

u/Foreignwelcome2 8d ago

so from my server (nextcloud/jellyfin) when i run

netbird status -d:

( proxy-.netbird.selfhosted:
  NetBird IP: 100xxx
  Public key: xxxxx
  Status: Connected
  -- detail --
  Connection type: P2P
  ICE candidate (Local/Remote): srflx/prflx
  ICE candidate endpoints (Local/Remote): xxxx
  Relay server address: rels://xxxxx
  Last connection update: 3 hours, 9 minutes ago
  Last WireGuard handshake: 4 seconds ago
  Transfer status (received/sent) 964.2 MiB/1.8 GiB
  Quantum resistance: false (connection might not work without a remote permissive mode)
  Networks: -
  Latency: 76.663385ms)

i only see 1 proxy (though im reverse proxy many services is thats normal? Also i see it says P2P does that rule out what you talking about? and how can i run debug whats the env variable

1

u/StillLoading_ 8d ago

That looks okay to me. You could still check on the proxy side via debug endpoint if it's P2P on both ends to make sure. It might also be worth checking what throughput you get between your client and the VPS to see if there's a bottleneck there.

1

u/NomadicSun 8d ago

Yes I experienced this exact issue too. Currently looking into other options

1

u/balirious 8d ago

Slooow af painfully slow

0

u/FORCEGC 8d ago

Mine is great. Extremely fast. I run on truenas as well going out to vps as control plane. Works well. You have to have a configuration error. I'd dig into speed tests between hosts and vps

1

u/Foreignwelcome2 8d ago

How are you running netbird on truenas from the catalog or just docker or container LXC

1

u/FORCEGC 8d ago

Docker container

1

u/Foreignwelcome2 8d ago

im curios why didnt you opt for the catalog one its just a docker? or LXC container then youd have the benifit of bridging and actually access the services with original IPs?

1

u/FORCEGC 8d ago

You can bridge just fine in docker? And I can access the services with ip perfectly fine. But I use my own domain to host. I have several public websites and game servers running. All work perfectly

0

u/WikibearTheReal 6d ago

Isn't that pretty obvious? If you're using a reverse proxy on a VPS, all your traffic goes through that VPS. Of course it's going to be slower if the VPS has limited bandwidth or network performance.

Especially when streaming video! Your home server first uploads the video stream to the VPS, and then the VPS forwards it to your device. So you're routing the entire video stream through an additional server for no good reason. Even if the connection between the VPS and your home server is P2P, you're still not bypassing the VPS.

The logical solution is to use NetBird directly on your devices and configure Split DNS, using an internal DNS server like Pi-hole, AdGuard Home, or something similar.

Use the same domain internally and externally. When you're connected through NetBird (which uses WireGuard), your internal DNS resolves the domain to your server's private NetBird IP, so you connect directly without going through the VPS.

When you're outside without NetBird, the domain resolves to the public VPS IP and traffic goes through the reverse proxy.

Same domain, different IP depending on where you are. No unnecessary detour through the VPS.

You don't even need an exit node for this. NetBird with Split DNS is enough.

1

u/Foreignwelcome2 5d ago

wrong analysis chief it should be slower but NOT 20% of actual speed also on previous netbitrd i used reverse proxy with two jellyfin 4k hdr streams together and had no issues!! now cant do one 4k and yep im using split DNS with pihole and unbound

1

u/WikibearTheReal 5d ago

You can only stream what your local Internet upload speed allow. If you go directly into your network and this is slower as over proxy... sure, there something wrong. Doesn't make any sense to me. Check routing.