TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: An Almost Free, Open Source TURN Server

122 pointsby cookie_monstaabout 2 months ago
Hi HN,<p>I have been messing around with WebRTC for a few years now but when it comes to the TURN server I never quite got to my gold standard of free, self-hosted and open source. I decided to give it a go using Oracle Cloud Infrastructure&#x27;s free tier, meaning that my total spend got down to domain name hosting. I know plenty of people have been burnt by Oracle in the past, but I have had servers running on the free tier for 5 years now without so much as a hiccup. Regardless, the concepts will be the same using any cloud based server.<p>This is the first time I&#x27;ve written up an end-to-end technical how-to like this and the audience I am writing for is really myself - I know just enough about networks and web dev and Linux, etc to get all this running and there are plenty of snippets out there on the web that tell you how to do one thing or another, but nowhere that puts it all together in one place so if I&#x27;m explaining what is obvious to you, my apologies - like I say, I&#x27;m writing to myself here.<p>I don&#x27;t know that this even is a Show HN - @dang, if it isn&#x27;t, please feel free to recategorise&#x2F;edit the title.<p>@Everybody else, I am happy to answer questions if I can but please bear in mind that I am not claiming to be an expert on any of the tech gathered together to make this work.

13 comments

markisusabout 2 months ago
This has got me reading about TURN and it just seems like a huge ugly hack. Two computers want to send UDP to each other. They are electrically connected by sets of physical cables. They could even be down the street from each other. But they don’t know how to get their routers to set the right bits in their translation tables. Instead it’s just easier to send all their traffic through a third computer in another city thousands of miles away or maybe into outer space and back. Have I got it right?
评论 #43512248 未加载
评论 #43512328 未加载
评论 #43513435 未加载
评论 #43515743 未加载
评论 #43512233 未加载
ggmabout 2 months ago
99% of this does not depend on Oracle, you can do this on any vm hosting platform you can get. The only point of using Oracle is the price point which will vanish as soon as they can cease using it to build market share. Good to show btw. Nice instructions. They&#x27;re mostly platform neutral. It might be a different interface to manage on another host of course but the outcome would be much the same.
评论 #43510965 未加载
Uptrendaabout 2 months ago
Respect++ for what you said about Peerjs. I used those servers myself for testing when I wrote my own TURN client and always felt a little bad about it. But it saved me tons of time before setting up my own. Now I have my own server (though not as well setup as yours -- your guide is good.)<p>This is a valuable contribution. IMO, the Internet needs more STUN, TURN, and MQTT servers. It&#x27;s even more valuable if they support as many protocols as possible and have IPv4 &#x2F; IPv6. For STUN -- running it with two IPs means it can support bind requests which is necessary for testing NAT types.
评论 #43511013 未加载
keepamovinabout 2 months ago
This how to is extremely comprehensive and well written. You have a knack for writing technical tutorials and documentation that are accessible, clear and simple. Well done!<p>Good prose, clearly not written by AI - respect!
评论 #43511509 未加载
miki123211about 2 months ago
&gt; Additionally, some people have privacy concerns about running their data through anything associated with the big G.<p>It&#x27;s important to point out that Web RTC is E2E encrypted, so Google never actually sees your data.<p>As long as the server you use for signaling is secure, your TURN server may as well be run by the NSA. Since initial signaling is extremely low-bandwidth compared to the actual call, it&#x27;s usually fine to handle it in your application directly.<p>THe actual problem with WebRTC is that, in its default setup, every call participant leaks their IP address to everybody else, and you need to upload your data n-1 times for n call participants, making it almost unusable on slow connections. You can mitigate both of these problems with an SFU, essentially a central server that takes in streams from all clients and distributes them further, but then you lose the E2E.
Sean-Derabout 2 months ago
Great write up! It isn’t free, but the price&#x2F;what it offers is really great with Hetzner. I switched from digital ocean.<p>Did you evaluate any other TURN servers? I’m curious about your thoughts of the Elixir and Go ones. Maybe even more exist, I haven’t looked recently
评论 #43511852 未加载
importabout 2 months ago
How to doc recommends using Oracle Free Tier but they recently had a breach and leaked login server data <a href="https:&#x2F;&#x2F;www.bleepingcomputer.com&#x2F;news&#x2F;security&#x2F;oracle-customers-confirm-data-stolen-in-alleged-cloud-breach-is-valid&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.bleepingcomputer.com&#x2F;news&#x2F;security&#x2F;oracle-custom...</a>
telesillaabout 2 months ago
Look at Stunner as a Kubernetes friendly alternative to coturn.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;l7mp&#x2F;stunner" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;l7mp&#x2F;stunner</a><p>For those of you needing turn services without wanting to host, I can highly recommended Xirsys. Excellent service and while pricing is more than Cloudflare you get better network quality.<p>If you prefer Cloudflare, unless you are using GBs a day you&#x27;ll most likely have a $0 monthly bill which makes it an excellent choice for small projects and testing.
nubinetworkabout 2 months ago
I&#x27;m not paying oracle for cloud services, I learned my lesson the hard way, they&#x27;re still emailing me about random cloud stuff despite me telling them to stop contacting me.
j45about 2 months ago
This codebase seems to be a little old - does anyone have it running as is, or close to as is?
nurettinabout 2 months ago
If I was tasked to get this up and running, I would probably start with porting the entire thing to postgres.
BiteCode_devabout 2 months ago
Can&#x27;t we have TURN over something like bittorrent or ifps so that it&#x27;s decentralized ?
评论 #43516127 未加载
ranger_dangerabout 2 months ago
The problem I see with TURN is there&#x27;s basically no way to prevent people from abusing it publicly for relaying any traffic they want, without any of your own web sites or WebRTC apps involved.
评论 #43511759 未加载
评论 #43512351 未加载
评论 #43517420 未加载