A fast, beautiful music player for the music you own.
Built for large libraries and classical collections, on Mac, iPhone and iPad.
Mac App Store · Website · Community
Moonlight is a music player for Mac, iPhone and iPad, made for people with large music collections, including classical music. It plays the music files you already own. It's not a streaming service. Your music stays on your devices.
Moonlight is made by Musopen, a non-profit that makes classical music free and accessible.
- Browse a large library quickly by album, artist, song, composer and genre, with fast search across everything.
- Classical-friendly. Composers get their own view alongside artists.
- Playlists and smart playlists. Import and export M3U playlists, or build playlists that fill themselves from rules like rating, composer, genre or when you last played something.
- Ratings and favorites that sync between your Mac, iPhone and iPad through your own private iCloud account. Only this information syncs; your music files are never uploaded.
- Internet radio with a built-in directory of reviewed stations.
- Last.fm scrobbling (optional).
- Themes and Now Playing scenes to change how the player looks.
- Tag editing for common metadata fields.
Supported formats: MP3, AAC/M4A (including ALAC), FLAC, WAV and AIFF.
- macOS 14 Sonoma or later
- iOS / iPadOS 17 or later
Moonlight sends anonymous usage statistics to Google Analytics by default, and you can turn this off in Settings > Privacy. Everything the app sends over the network is listed in PRIVACY.md.
Every source file starts with a short plain-English note explaining what it does. The main folders are:
| Folder | What's in it |
|---|---|
Sources/App |
App startup, the main window, menus and shared app state |
Sources/Database |
The local library database and iCloud sync |
Sources/Scanner |
Finding music files in your folders and reading their tags |
Sources/Playback |
Playing audio, the play queue and media keys |
Sources/Radio |
Internet radio |
Sources/LastFM |
Last.fm scrobbling |
Sources/UI |
Every screen and control you see in the Mac app |
Sources/Mobile |
The iPhone and iPad app |
Tests, MobileTests |
Automated tests |
Developers should also read ARCHITECTURE.md for a short technical overview.
You need a Mac with Xcode 26 or later and XcodeGen.
brew install xcodegen
git clone https://github.com/musopen/moonlight.git
cd moonlight
xcodegen generate
open Moonlight.xcodeprojThe Xcode project is generated from project.yml, so edit that file (not the
.xcodeproj) and re-run xcodegen generate after changing it.
Run the tests without any Apple developer account:
xcodebuild test -project Moonlight.xcodeproj -scheme Moonlight -destination "platform=macOS" CODE_SIGNING_ALLOWED=NOTo sign and run your own copy, including iCloud sync:
- Copy
Config/Signing.local.example.xcconfigtoConfig/Signing.local.xcconfig. - Set your own Apple team ID, bundle ID and iCloud container in it. Git ignores this file.
- Run
xcodegen generateand build theMoonlightscheme in Xcode.
Optional services are off in your own builds unless you add your own keys:
- Last.fm: copy
Config/LastFMSecrets.example.xcconfigtoConfig/LastFMSecrets.local.xcconfigand add an API key from last.fm/api. - Feedback form: off unless you set your own endpoint; copy
Config/Feedback.local.example.xcconfigtoConfig/Feedback.local.xcconfig. - Analytics: builds without a
GoogleService-Info.plistsend no analytics.
Bug reports and pull requests are welcome. See CONTRIBUTING.md. To report a security problem, please follow SECURITY.md instead of opening a public issue.
Moonlight's source code is copyright Musopen and licensed under the Mozilla Public License 2.0. In short, you can use, change and share it, including in other apps. If you distribute changes to Moonlight's own files, those changed files must stay open source under the same license.
Some parts are not covered by Moonlight's license and keep their own terms: third-party libraries, fonts, the Now Playing scene videos and the radio station data. See NOTICE for the full list.
"Moonlight" and the Moonlight app icon identify the official app published by Musopen. They are not covered by the MPL. You're welcome to build, modify and share your own version of this code, but if you distribute it, please give it a different name and icon so people aren't confused about which app is which.

