Songhive: A fully federated music platform

Songhive is a self-hosted AGPL-3.0 platform I’ve built in the past couple of months to bring together all the features I wanted from a music platform

It’s still in testing phase, but it’s been mature enough so far to cover most of my music needs.

I only run my personal instance at https://manganiello.music for now, and I’m a bit skeptical whether to run an open public instance (experience tells me that I’ll have to give up my life to moderate it and track copyright violations), but anyone can run the stack on their hardware.

Among the features it provides:

  • :optical_disk: Standard music library management. Playlists, albums, tags, genres etc., plus automatic deduplication and audio metadata management over MusicBrainz

  • :open_file_folder: Support for music from external cloud storage. Plug your S3 bucket, Dropbox account, Google Drive or Nextcloud folder loaded of MP3 files, and manage them under one roof

  • :cloud: Integration with external music providers (only TIDAL and YouTube for now), so you can import your playlists and favourite songs onto your own server

  • :money_bag: Support for payments. Are you a tech enthusiast who would like to host a small music server for their family and friends, and would like them to contribute to the costs for hosting their music collections? You can activate subscriptions with custom amounts and custom billing periods on your platform. Are you a musician tired of being ripped off by traditional centralized music streaming platforms, labels and other middlemen, while having no control over your catalog and distribution? You can upload your tracks to a #Songhive instance, or host your own (ideal if run a small music label), connect your Stripe payout account, put individual tracks or albums on sale, and generate direct download links

  • :speaking_head: Full social integration over ActivityPub. Songhive is basically a Mastodon instance with a music library around, or a Jellyfin instance with a Mastodon server around. Publish your tracks and albums, and they’ll automatically appear on your followers’ timelines. You can also share content with other Songhive or Funkwhale instances, follow Mastodon accounts and interact with them

  • :bar_chart: Listening stats and support for scrobbling to last.fm / libre.fm

  • :speaker_high_volume: #Subsonic API, so you can stream music from your local instance over any Subsonic-compatible app or speaker

  • :repeat_button: Ability to #share your private tracks, playlists or collections with others through retractable share links

  • :radio: Live radios! Create your playlists or listening queue, and stream it over Icecast, Snapcast, or native HTTP music streams. Build your radio station and share it as a simple link. It also supports live recording. Ideal for live podcasts, for streaming concerts or jams, or add some DJ-style talk between the tracks on your radio.

  • :wireless: Podcasts, with support for synchronization over any gPodder-compatible app

:hammer_and_wrench: Github mirror

:warning: Disclosure

AI tools were used for some parts of the project (namely changelog management, architecture document updates, tests and boilerplate model definitions).

2 Likes

Hi @fabio this looks cool! Very impressive feature list for having only taken a couple of months.

I’m wondering about the legal implications of just sharing your music library like this with everyone. Are you handling licensing etc or is this a :shushing_face: kind of thing?

I’m also wondering, just out of curiousity, why you opted not to contribute to funkwhale, which seems to intend to do much of the same stuff?

About the legal implications - I’m purposefully stressing that this is mostly for artists and small labels who want to publish their music and also monetize it.

And for small self-hosters who want to have their music collection on their own cloud, and perhaps create some accounts just for family and a few friends.

My own instance has only 3 accounts, and I wouldn’t expand it more than this because I’d end up spending most of my time moderating it or pulling down copyrighted content.

Of course nothing prevents someone from running a larger instance with open registrations, but IMHO the same can already be done now with an open Funkwhale/Navidrome/Jellyfin server.

About why not working on Funkwhale itself - that’s a good question.

I used to run Funkwhale on manganiello.music before switching to Songhive, and I tried for a bit to contribute to that project.

Unfortunately the gaps between what it offered and what I expected were too wide, the federation layer itself is very limited and based on an (IMHO) very brittle and under-maintained library (Songhive uses Pubby, a full-featured and general-purpose ActivityPub library I built a while ago for another federated project) and PR approvals / release cycles are generally quite slow on Funkwhale, which discouraged me from working on so many features at once.

However Songhive is fully compatible with Funkwhale, collections, albums, artists, playlists etc. can be easily browsed from both ends by just searching the URL, and Funkwhale items can also be added to Songhive accounts.

did you had a look at : --batch --follow-symlinks would print ce013625030ba8dba906f756967f9e9ca394464a blob 6 And echo. ? Your artist object do not allows multiples artist support so Songhive is not compatible with Funkwhale. But I will probably build a compatibility layer (support list of artist instead of ArtistCredits) but this is a workarround, do you plan to support artistcredits ?

You don’t link the artist Songhive and the actor Songhive. How the actor send artist activities ? I don’t see activities on the outbox https://manganiello.music/users/fabio/outbox · BrowserPub · A browser for exploring ActivityPub and the fediverse
Songhive seems to link the actor and the artist : Songhive how ? This link is not passed through AP right ? We are currently working on this on funkwhale, we will pass the artist id on the actor object, and the actor id on the artist object. Let us know if you are interested :slight_smile:

1 Like

Also the duration field do not follow https://www.w3.org/TR/activitystreams-vocabulary/#dfn-duration ? [“Duration has wrong format. Use one of these formats instead: https://www.w3.org/TR/xmlschema11-2/#dayTimeDuration.”\]}}

1 Like

EDIT: Welcome @fabio! Great to have another developer here working on an ActivityPub-based music service. Have you seen the discussion here on the Audio Objects FEP? Also, were you aware of @bandwagon? What made you decide to auto-generate new software rather than contribute to that?

Fair warning: folks here have some strong views about the use of generative models, so prepare to get challenged on that. But we’re generally a pretty friendly and respectful bunch, so I don’t expect anyone to get out their flamethrowers ; )

If this is OT let me know, and I’ll delete it and repost as a new topic, but …

This raises a federation-related issues I hadn’t considered, nor seen discussed so far. What happens if a music service is openly federating (over whatever protocol(s), and that exposes people using it to music under ARR copyright that’s hosted without the permission of the copyright holder? Off the top of my dome I guess it would be another type of abuse to add to the list that includes spam, trolling, slop, etc, to be considered in moderation and blocklist policies.

1 Like

This is currently an implementation gap indeed (but in my tests with single-artist tracks it worked, but it may also be because my Funkwhale instance was a bit old, before 2.x went stable).

Right now it uses the Funkwhale 1.4 artists field. The model on Songhive currently is one artist_id plus a JSON list of name strings (which in hindsight wasn’t a wise decision). This is probably something worth addressing on my side - IMHO it makes sense both for Funkwhale to be more tolerant when it comes to artists format, and for Songhive to strive and be compatible with existing implementations.

(Btw, would the new implementation be compatible also with < 2.x releases of Funkwhale?)

That’s right, the user actor you use for your day-to-day activities and uploads is different from the artist actor. These are intentionally separate entities - a user can also upload tracks from other artists.

Actually, right now artist actors aren’t directly supported (but it’s been on my implementation timeline for a while). You follow users (a-la-Mastodon), not directly artists (a-la-Funkwhale). But I think that having artists as their separate actors would solve a lot of implementation ambiguities.

Uploaded tracks (when the “Publish to ActivityPub” checkbox is ticked) are currently pushed as activities to followers. Users can choose whether they want to publish them as Audio objects, or Note objects with an audio attachment, and they can also be published multiple times.

All the tracks uploaded by a user are linked internally and exposed over the API, but there’s currently no “federated” link other than the Audio/Note published objects.

That sounds like a sensible implementation, but I guess it only makes sense on Songhive if artists themselves are their own ActivityPub actors?

EDIT: I forgot to mention the biggest blocker I had when thinking of how to implement the Artist/User actor duality. If users are first-class actors who can upload tracks from several artists, then who has ownership over the artist actor?

This is an easy question to address if I want to make playlists or libraries federated actors (they have a single owner_id and support optional collaborators), but it’s trickier for artists, since from Songhive’s perspective currently an artist is just a metadata field.

My first naive implementation was along the lines of “the first user who uploads a track from that artist”, but it’s not hard to see in how many ways it can be abused.

There’s also the issue of ownership over the actor’s feed (if I upload a track from artist X, and artist X is already on the instance, does the track go automatically in X’s outbox?) and of deduplication, since there’s currently no mechanism to disambiguate artists with the same name other than the MusicBrainz heuristic match.

Good catch. The Songhive implementation targeted the implementation I had on my previous Funkwhale instance (which I hadn’t upgraded in a while and used the 1.4 data model).

I completely missed that Funkwhale 2.x also changed duration from int to xsd:duration.

This sounds quite like a breaking change to me though. Is compatibility with < 2.x something that you’d seek for, or would you assume that any inter-compatibility layer targets the 2.x API and older versions can be ignored?

EDIT: A quick look at Funkwhale adoption stats shows that we’ve actually got a quite uncomfortable 50/50 split between 1.x and 2.x instances. So I guess that it’s inevitable to sacrifice back-compatibility, especially given that the content is outbound and Songhive has no way to know the expected model on the other end. What are the plans for deprecation/sunsetting of the previous model?

I read the FEP but I missed the discussion here - I’ll definitely join it :slightly_smiling_face:

Features :slightly_smiling_face:

Bandwagon has a very good implementation on the catalog management+publication side but it lacks many features I wanted (support for external libraries, radios, streaming to Icecast/Snapcast, Subsonic API compatibility, mopidy extension, scrobbling + listening stats, podcasts, deeper ActivityPub integration, so federated actors can quote, boost, post etc. as if it was a normal Mastodon account…).

I thought that the gap was wide enough to justify a new project with a wider scope, rather than either contributing dozens of PRs to it or forking it.

There’s however a feature from Bandwagon that Songhive doesn’t support yet and it’s been on top of my mind for a while - the “use external Fediverse account” button to interact with content directly on a Bandwagon instance using an account from another instance.

I have a strong view too when a project is truly vibe-coded without the user understanding what’s going on. My usage is more pragmatic (a-la-Torvalds). But of course I’m well-aware that there are folks who have a much more binary view on the topic - I hope that the discussion will focus on features and implementation rather than the tools though.

I’m no legal expert and I’d like some advice myself on this. But the Songhive’s implementation deliberately avoids caching/saving remote audio objects exactly to avoid this kind of issues.

Users on an instance may be exposed to copyrighted remote content from other instances, but that content keeps living only on the remote instance, not on the local Songhive instance.

It can be searched via URL (and also added to a user’s library), but it’s always streamed from the remote source.

IMHO this is actually a wider issue that impacts federation in general - and tbh it impacts the Mastodon implementation itself even more than Songhive’s, since Mastodon caches copies of remote Audio objects and serves them directly from its media cache, so perhaps it’s even more liable of distributing copyrighted content directly than an implementation that just renders (and streams) a remote link without contributing to its proliferation.

I think that Mastodon’s implementation of the reject media moderation policy can fit exactly this use-case.

If an instance is on reject_media then images, audio and video from that instance won’t be processed at all - but any other content gets through.

This isn’t currently implemented on Songhive (only the standard limit/suspend moderation policies are exposed), but given the focus on media content it definitely makes sense to implement.

(Out of curiosity, I’d also like to know if reject_media has been fully implemented on Songhive or Bandwagon).

I’ve pushed feat(federation): add FEP-be68 audio object interoperability · 5eb8b02b74 - blacklight/songhive - Platypush Git to solve most of the reported compatibility issues. Namely:

  • Duration goes from int to xsd:duration
  • artist_credit provided alongside artists on track+album level
  • /outbox is now properly populated

The only aspect that I haven’t yet addressed is about artist actor management - namely because from Songhive’s perspective an artist is just a metadata field on albums/tracks, and I can’t think of a good moderation/governance model for the actor that doesn’t require an admin veto. I’m open to ideas :slightly_smiling_face:

1 Like

Something is a bit odd with Funkwhale remote fetches.

Searching Funkwhale resources from Songhive works fine:

But Songhive tracks can’t be searched in Funkwhale 2.x, even if everything seems fine now on Songhive’s shapes:

curl 'https://funkwhale.it/api/v2/federation/fetches/' \
  -X POST \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFToken: *****' \
  -H 'Origin: https://funkwhale.it' \
  -H 'Cookie: csrftoken=*****; sessionid=*****' \
  --data-raw '{"object_uri":"https://manganiello.music/tracks/91c411ae-116a-40ee-92d2-3495e2f2b09c"}'

This returns:

{
  "id": 3015,
  "url": "https://manganiello.music/tracks/91c411ae-116a-40ee-92d2-3495e2f2b09c",
  "actor": {
    "fid": "https://funkwhale.it/federation/actors/fabio",
    "preferred_username": "fabio",
    "name": "fabio"
  },
  "status": "finished",
  "detail": {},
  "creation_date": "2026-10-18T10:02:58.784051Z",
  "fetch_date": "2026-10-18T10:03:00.983805Z",
  "type": null,
  "object": null
}

A quick look at Funkwhale’s code seems to point at an implementation gap here.

OBJECT_SERIALIZER_MAPPING and get_type in FetchSerializer don’t handle the Upload case. It seems that a fetched Audio → Upload mapping case always serializes as object: null and type: null.

I have to say I’m really enjoying how much thought you’ve put into the UX side of what you’re doing!

This makes me think of the Zot/Nomad branch of the fediverse (AFAIK the living species are Hubzilla, streams, and Forte), which has separate concepts of accounts and ‘channels’. So that 1 account can manage more than 1 channel, and channels can be managed by more than 1 account, with different levels of permissions (for group discussions, pages, etc). I believe the Mitra developer (Silverpill) has been working on FEPs to specify a number of Zot/Nomad protocol features, so they can be adopted in other AP apps.

Your account/ artist distinction also reminds me of the Bonfire project, which is experimenting with all sorts of news ways of managing this kind of stuff at both the protocol and UX level, so that new community-building features become possible. Things like an implementation of ‘aspects’ (similar to G+ ‘circles’ if you remember those), where people using Diaspora can group the accounts they’re connected with, according to things like geography or topic, and send posts to the relevant group(s) only.

FYI the Bonfire team worked with Ben from @bandwagon to implement the SocialCG’s MLS-based private messages over AP, and I’ve heard whispers about that work being implemented a future version of Mastodon! Is this something we might one day see in SongHive too?

(BTW Ben has been really quiet for ages. Just head down, bum up, I hope? You OK Ben?)

I’m very anti-LLM in general, for a wide range of reason both ethical and practical (see my comments on the F-Droid forum and on the fediverse.party wiki). But I’m bullish on automation where that makes sense (things humans are slow or bad at and computers are quick or good at, like maths), and I’m open to being convinced that there are valid niche uses for generative models (or blockchains, or pretty much any kind of tech).

Reading some of your comments, it occurs to me (not for the first time) that although vibe-coding is a terrible way to engineer a back-end - even if you know what you’re doing, but especially if you don’t - it’s a pretty good way to prototype interfaces. Much quicker than manually building wireframes in something like PenPot, for example.

If we could normalize the use of fairly generic, standardised client>server APIs (as the ActivityPub authors tried and so far failed to do), then the work of software development could be totally segmented. With experienced (human) programmers engineering robust back-ends (from the kernel up to the C2S API socket), and graphic design, UX people and anyone who felt like it vibe-coding client apps to our hearts content :grin:

Of course that presumes that affordable access to generative models will continue to be a thing. Which I’m far from convinced of. But whether or not they are, maybe they could be replaced with more deterministic forms of interface-assembly AI, which assemble prototypes from chunks of Free Code, with attention to license compatibility and attribution for original authors? Imagine a kind of digital equivalent of Meccano or Lego.

Howdy! Sorry to quiet. Yes, I’ve been super-heads-down on a bunch of things: a new Emissary app to launch alongside Emissary 1.0 before the end of the year.

But Bandwagon is NOT on the back burner. A number of these improvements are rolling into Bandwagon, too. It’s a great time to be on the music scene of the Social Web.

On LLMs, @strypey and I have had a brief conversation about it. And, I understand the general concern about how they’re going to fuck up so our global economy. Here’s where I fall in the spectrum: like any other tool, LLMs have the potential to amplify our power and can be used for good or for evil.

Take vulnerability scans as just one example. LLMs can find and troubleshoot obscure software defects that would take weeks of dedicated work for a human. They make possible a level of quality that would simply be out of reach for most software projects.

And, you can be certain that “the bad guys” are already using them to scan open source software for holes to exploit. We are rapidly approaching a moment where all systems will either be protected by LLMs or hacked by them.

We are going to NEED this tech in order to defend the lives we want to lead. But HOW we use LLMs is the most important issue. Humans must always be in charge. There must be many strong safeguards around these automated tools. And they must never have the keys to take dangerous actions on their own (like pushing code to production, or pulling the trigger on a gun)

So, the question for me is how to use this technology to protect and grow the open social web in a way that is ethical and environmentally sustainable. There are people working on this. Local, open weight models can already run on your own machine (not a data center). Some are being built by European governments and collectives, or running in green power sources with these goals in mind.

I’ve recently joined https://inference.coop as an experiment in all of these goals. It’s growing out of some work at the University of Colorado, Boulder and becoming a fully democratically governed co-op. Hopefully, more initiatives like this one can create a counterbalance to all of the negatives that people are legitimately concerned about.

2 Likes

2 posts were split to a new topic: Policies about vibecoding and IA in software development

absolutely :slight_smile:

yes

You can have an actor linked to and artist (actor.artist exists) and allow this actor to upload tracks from other artists. it’s not incompatible.

No sure I understood, which ambiguities ?

very nice feature idea ! thanks :slight_smile:

The artist object/metadata and artist user (the actor) are two very different things. Artist metadata is public, it’s controlled though moderation, consensus, centralized database (like musicbrainz) but in the end it’s the instance admin who choose his politic. The Actor / artist user is private. A user can choose if he wants to look a public data (the actor profile) or public data (the artist object page). An artist could redirect his actor page to the artist page if he wants or not, but the artist page shouldn’t be redirected to the actor page. Does this make sens ?

the actor outbox belong to the actor. It’ should only contain data from the actor.

About deduplication we can only rely on a centralized db like musicbrainz or on manual work (admin). On open.audio we enforce the use of MBID to avoid us to do this work.

I didn’t had time to build a compatibility layer and I expected people to upgrade their instance :s I’m very sorry about that

Good catch ! Your track endpoint return an Audio object but funkwhale only support track object on it’s UI. I will solve this an make the front redirect upload fetches to tracks, thanks for pointing this out :slight_smile:

Appart for this detail, we are now federated for basic audio objects (artist, album, track). That’s very nice :slight_smile:

@fabio I can only note that a track can have various audio files, so if you allow user upload to help remote instance to parse the instance for playable content have a track endpoint which is different from the audio endpoint would be practical.

To allow parsing of content we should also agree on a route. here is what I understood from @bandwagon Direct Mirlo-to-Mirlo federation (the consuming side) · funmusicplace/mirlo · Discussion #2273 · GitHub . I think the bandwagon approach is better than Funkwhale because a release, has it’s name indicate, is what a artist wants to send. We will probably update Funkwhale to use release Activities instead of audio ones Making sure you're not a bot! .

1 Like