Beatsync: Millisecond-Accurate Multi-Device Audio You Can Self-Host
If you've ever tried to get two or more phones, laptops, or speakers to play the same song in perfect sync, you know the pain. Bluetooth multipoint is unreliable. Streaming over Wi-Fi usually adds variable latency. And most solutions require cloud services or lock you into a specific ecosystem.
Beatsync is an open-source project that solves this problem head-on. It's a self-hosted system that coordinates audio playback across devices with millisecond accuracy. No cloud, no proprietary hardware, just your own server and standard web browsers.
What It Does
Beatsync lets you create a "sync group" where any device with a web browser can join and play audio in perfect lockstep with everyone else. The server handles clock synchronization, buffering, and playback commands, so when you hit play, pause, or skip, every connected device responds simultaneously.
It's built on top of Web Audio API and uses a custom synchronization protocol that accounts for network jitter and clock drift. The result? Audio that stays aligned within a few milliseconds across devices, even on different networks.
Why It's Cool
Millisecond accuracy isn't easy. Beatsync doesn't just assume all devices have the same clock. It uses a modified NTP-style approach to estimate the offset between each client and the server, then compensates for it in real-time. The author has done the hard work so you don't have to offload playback timing to a third party.
Self-hosted means you control everything. No data leaves your network. No accounts. No ads. You just run the server, open the web app, and go. Perfect for parties, installations, or testing multi-device synchronization in your own projects.
Extensible and simple. The server is written in Go, the client is vanilla JavaScript. You can hook into the sync group via WebSocket or customize the playback logic. It's a great reference for anyone building multi-device audio experiences.
How to Try It
Getting started is straightforward:
Clone the repo
git clone https://github.com/freeman-jiang/beatsync.gitStart the server
cd beatsync && go run server.go
(Make sure you have Go installed.)Open the web app on multiple devices
Navigate tohttp://your-server-ip:8080on each device. They'll automatically join the same sync group.Upload a track or choose from the d