Introduction
NodeInfo is a small protocol by which a server in a federated network (Mastodon, Lemmy, Pixelfed, Diaspora and many others) publishes metadata about itself: its software, the protocols it speaks, its usage counts. The
protocol page (“NodeInfo protocol 2.1”) says: “Servers must provide the well-known path /.well-known/nodeinfo and provide a JRD document referencing the supported documents via Link elements.” This page is about that
discovery document. The NodeInfo document it points to (a JSON file following one of the NodeInfo schemas) is a different file, not described here.
Structure
{
"links": [
{
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.1",
"href": "https://example.org/nodeinfo/2.1"
}
]
}
A JRD (JSON Resource Descriptor, as RFC 7033 defines it: see WebFinger) whose links use these relation types: http://nodeinfo.diaspora.software/ns/schema/1.0,
/1.1, /2.0 and /2.1, each “referencing a JSON document following the NodeInfo schema” of that version. “A client should follow the link matching the highest schema version it supports”; it should try
HTTPS first and fall back to HTTP, follow redirects, abandon on 404 or 400 and retry on 500. The referenced document is served as application/json, preferably with the profile of the schema version.
In the explorer
A file named nodeinfo or nodeinfo.json opens here when it is a JSON object with a links array that has at least one link whose rel is one of the four schema relations and that has an href. The tree
labels the JRD members; the Links tab lists each link; the Overview lists the schema versions and quotes the rule for choosing. A problem is a link with no rel, a rel that is not one of the four relations, an href that is not an
absolute address, or the same version linked twice. Other files with these names open as before (a bare nodeinfo as an unknown file, nodeinfo.json as JSON). Of the public instances tried, 14 served a discovery
document; one answered an HTML page.
Not described
Known, not yet covered
- Reference: the NodeInfo documents themselves (the schemas 1.0 to 2.1: software, protocols, services, open registrations, usage, metadata) are not described; only the discovery page of the protocol was read.
- Viewer: the other JRD members (
subject,aliases,properties) are read by the shared JRD reader of RFC 7033 though the NodeInfo page does not use them.
Unknown
- Reference: whether newer NodeInfo versions than 2.1 add schema relations: only the page for 2.1 was read.
Links
Reference
- NodeInfo protocol 2.1 – the discovery protocol
- RFC 7033 – WebFinger, which defines the JRD the discovery document uses
- WebFinger response – the same JRD syntax