If you’re talking about streaming your own music, you could set up Jellyfin and then do all of the work to safely put it behind a reverse proxy and access it remotely.
It’s a lot of work though, and you don’t get new music. Still, that’s about as good as you’re going to get if you want a legal FOSS option (others have posted illegal options if you’re looking for that.)
Navidrome is also a nice self-hosted option for music streaming. I recently cancelled my Spotify subscription in favor of hosting my own music library on it.
If you’re talking about streaming your own music, you could set up Jellyfin and then do all of the work to safely put it behind a reverse proxy and access it remotely.
It’s a lot of work though, and you don’t get new music. Still, that’s about as good as you’re going to get if you want a legal FOSS option (others have posted illegal options if you’re looking for that.)
Navidrome is also a nice self-hosted option for music streaming. I recently cancelled my Spotify subscription in favor of hosting my own music library on it.