NodeInfo Endpoint
NodeInfo provides server metadata—software, version, and statistics.
Discovery
GET /.well-known/nodeinfo
{
"links": [{
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
"href": "https://example.com/nodeinfo/2.0"
}]
}
NodeInfo Response
GET /nodeinfo/2.0
{
"version": "2.0",
"software": {
"name": "mastodon",
"version": "4.2.0"
},
"protocols": ["activitypub"],
"usage": {
"users": { "total": 1000 },
"localPosts": 50000
},
"openRegistrations": true
}
Fields
| Field | Description |
|---|---|
| software.name | Server software |
| protocols | Supported protocols |
| usage.users.total | User count |
| openRegistrations | Signups open |
Implementation
app.get('/nodeinfo/2.0', (req, res) => {
res.json({
version: '2.0',
software: { name: 'myserver', version: '1.0' },
protocols: ['activitypub'],
usage: { users: { total: 100 } },
openRegistrations: true
});
});