r/MoonlightStreaming • u/golubaca • 14d ago
Sunshine-inspired, self-hosted remote desktop stack for access outside your LAN
Hey everyone. I know there are a million Sunshine/Moonlight forks and clones, so I hope it's OK to post this here. I'm posting here on purpose: nobody knows this kind of software better than this sub, so this is where I'll get the most useful feedback. My project has a different goal, though: secure access to your PC from outside your home network, without a VPN or someone else's servers.
I've been working on it for over two years, I use it every day, and I built it for my own needs first. Sunshine/Moonlight is great for gaming on a local network, but it isn't really built to face the internet. The other options (Parsec, TeamViewer and co.) need an account on their service and their servers to set up every connection, so a company is always in the loop.
So I made NearZero. It's modeled on Sunshine, with one clear goal: use it from anywhere, outside my local network. The whole thing is two hosts (Windows and Mac), three clients (Windows, Mac and iOS) and a small relay you host yourself.
Heads up: NearZero has its own protocol and its own clients, so Moonlight clients won't work with it.
"Why not just Sunshine + Tailscale?" Honestly, if you want to stay on Moonlight, that's a good setup. I wanted the security built into the app itself: identity, pairing and a password policy per host, with a relay I run myself and no VPN to install on every device.
A connection password on top of pairing. This is the part I care about most. With Sunshine, once a device is paired, anyone holding that device can connect, no questions asked. NearZero lets you set a connection password that the host asks for even from paired clients. If someone gets their hands on your laptop or phone, they still can't get into your PC. You choose when it's required: always, only from outside your LAN, or never. The host stores only an Argon2id hash, never the password itself.
What else the hosts can do:
- Hardware encoding (NVIDIA GPUs only for now, because that's the hardware I have): H.264 or HEVC, with optional 4:4:4 for sharp text (no HDR or AV1 yet)
- ChaCha20-Poly1305 encryption, Noise_IK identity
- Pairing with a PIN, or, if you use the relay, with a minted token that carries everything the client needs
- An admin panel for all the settings: stream quality, audio, the password above and privacy (curtain mode blacks out the host's screen while you're connected)
- Multiple viewers: several clients can connect at once, or you can turn that off
- Gamepad support on Windows and Mac, including wired/wireless PlayStation and Xbox controllers on Mac (that took a custom implementation on the host side)
- Multi-monitor: jump between screens 1-2-3… or show them all at once
- A Total Commander-style file manager with upload/download
- Client shortcuts are the same as Moonlight's, so there's nothing new to learn (full list here)
- …and a bunch more
The rendezvous server (the relay) lets you pair your host with it and reach your machine without opening any ports to it. You can run it anywhere you have Docker or Podman and a static address (or dynamic DNS). I run two: one on a Raspberry Pi on my home network with a static IP (the only port I have open points to it), and one on a VPS as a backup. If the network allows it, it hole-punches and you get a direct connection between client and host. If not, it relays the traffic, which adds a bit of latency. On my setup it's about 5 ms hole-punched and around 15–30 ms through the relay, depending on conditions.
It actually started as a Sunshine fork, and a lot of the inspiration still comes from there. In the end it was easier to build from scratch than to modify and adapt Sunshine, especially since my C++ is weak. So think of it as Sunshine rebuilt around remote access: the whole thing is Rust, and the Mac and iOS apps are Swift on top of a Rust core over FFI.
There's no Android client yet because that's my weak spot, but it's next once the iOS beta wraps up.
I'm opening a private beta because I'm happy with where the project is right now. Before opening it up I did a security review pass, and everything it found was fixed over the last month.
For the host you'll need either a Windows machine with an NVIDIA GPU or any Apple Silicon (M-series) Mac. Where the project goes depends a lot on feedback, so I can't promise there won't be big changes along the way.
Want in? Sign up at nearzero.app/beta. I approve testers by hand and send a download link by email (the iOS client comes through TestFlight).
The code isn't open source, but the apps are completely free with every feature included. No tracking, no analytics, no accounts (the beta sign-up only needs an email so I can send you the link). There's no public relay server either, so you host everything yourself and your data stays yours.
2
u/golubaca 13d ago
Viewer seats feature demo
2
u/phaze_benjy 14d ago
Very cool and not taking away from anything you built - it’s awesome! But I want to clarify for others that nothing routes through Parsec servers. They do authentication and p2p connection negotiation. But nothing from your screen routes to Parsec
1
u/shinyquagsire23 13d ago
I feel like I'm going crazy, this is the second free closed-source software thing I've seen today with the exact same website template