Your keys. Your music. Your freedom.
Features β’ Quick Start β’ Documentation β’ Contributing
FreeWave is a lightweight, open-source music player that leverages the Nostr protocol for decentralized, censorship-resistant music distribution. By combining Nostr events with yt-dlp for content retrieval, FreeWave delivers a privacy-first listening experience free from centralized platforms.
- Privacy-First: Your listening habits stay private
- Decentralized: No central authority controls your music
- Censorship-Resistant: Built on Nostr's distributed network
- Creator-Friendly: Direct connection between artists and listeners
- Open Source: Community-driven and transparent
- Nostr Integration - Listens to Nostr relays for secure, censorship-resistant song commands
- Automatic Playback - Downloads and plays songs using
yt-dlpandmpv - Smart Caching - Locally caches recently played songs for faster playback
- Dual Modes - Supports both personal and social listening experiences
- Secure Key Management - Uses environment variables for private key storage
- Auto-Cleanup - Automatically removes files after playback
- ποΈ Extensible - Easy to customize and extend for hardware projects
Before installing FreeWave, ensure you have:
| Requirement | Version | Purpose |
|---|---|---|
| Node.js | β₯18.0 | Runtime environment |
| npm | (bundled) | Package management |
| yt-dlp | latest | Audio fetching |
| mpv | latest | Audio playback |
git clone https://github.com/Codepocketdev/FreeWave.git
cd FreeWavenpm installUbuntu / Debian
sudo apt update
sudo apt install mpv python3-pip -y
pip3 install yt-dlpmacOS
brew install mpv yt-dlpWindows
- Install Node.js
- Download yt-dlp.exe
- Download mpv.exe
- Add both to your PATH
Create a .env file in the project root:
NOSTR_PRIVATE_KEY=<your_hex_private_key>Converting Keys to Hex
From nsec key:
import { nip19 } from "nostr-tools";
const result = nip19.decode("nsec1yourkeyhere");
console.log(Buffer.from(result.data).toString("hex"));From npub key:
# Create decode-npub.mjs
nano decode-npub.mjs
# Run the decoder
node decode-npub.mjs <your_npub>Perfect for local terminal-based playback.
Send a song command:
node scripts/send-song-command.mjs "Song by Artist"Start the listener:
node scripts/listen-and-play-song.mjsListen to songs from a specific Nostr user.
node scripts/social-listen-play.mjs <artist_npub> <relay_url>Example:
node scripts/social-listen-play.mjs npub1abc... wss://relay.damus.ioFreeWave/
βββ scripts/
β βββ send-song-command.mjs # Personal mode publisher
β βββ listen-and-play-song.mjs # Personal mode listener
β βββ social-listen-play.mjs # Social mode listener
βββ .env # Environment configuration
βββ .gitignore
βββ package.json
βββ README.md
Transform FreeWave into a physical music node with these components:
| Component | Use Case |
|---|---|
| Android Phone (v13+) | Portable Nostr node via Termux |
| Raspberry Pi (3/4/5) | 24/7 listener with speaker output |
| Arduino/ESP32/ESP8266 | LED control & physical buttons |
| OLED/LCD Display | Track information display |
| RGB LEDs/Neopixels | Visual music feedback |
| Powerbank/UPS | Off-grid operation |
| Rotary Encoder | Physical playback control |
| Mini Amplifier | Enhanced audio output |
- LED Visualizer: Sync RGB strips to song changes
- Track Display: Show current song info on OLED screen
- Physical Controls: Add buttons for play/pause/skip
- Portable Node: Battery-powered Raspberry Pi in custom enclosure
We welcome contributions from the community! Here's how you can help:
- Report bugs and issues
- Suggest new features
- Improve documentation
- Create GUI/web interface
- Optimize performance
- Share hardware builds
- Add tests
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.
If you find FreeWave useful, please consider:
- β Starring the repository
- π¦ Sharing on social media
- π€ Contributing to the project
- π¬ Joining the discussion on Nostr
Made with β€οΈ by the FreeWave community
Report Bug β’ Request Feature β’ Nostr Community