The best open source alternative to Apple Music is Libre.fm, which is both free and Open Source. If that doesn't suit you, our users have ranked more than 100 alternatives to Apple Music and 12 is open source so hopefully you can find a suitable replacement. Other interesting open source alternatives to Apple Music are Ampache (Free, Open Source), Audius Music (Free, Open Source), nuclear (Free, Open Source) and Maloja (Free, Open Source).
Audius is a streaming platform built for all musicians, not just those signed to labels. Build a fanbase, share your works in progress, and then publish your completed tracks for all the world to hear.