Providers
IPFS Cluster
Private cluster REST behavior for MeshKit.
HttpIpfsClusterProvider is for operator-run IPFS Cluster infrastructure. It targets the private Cluster REST contract used by MeshKit and pairs it with a MeshKit metadata service.
Do not point clusterApiUrl at Kubo /api/v0 or at an IPFS Cluster IPFS Proxy. If the endpoint is Kubo-compatible, use IPFS HTTP and Kubo.
Config
{
"version": 1,
"provider": {
"type": "ipfs-cluster",
"clusterApiUrl": "https://cluster.internal.example",
"metadataApiUrl": "https://meshkit-metadata.internal.example",
"tokenEnv": "MESHKIT_CLUSTER_TOKEN",
"timeoutMs": 15000
}
}Direct construction:
import { createMeshkit, HttpIpfsClusterProvider } from "@meshkit/core";
const mesh = await createMeshkit({
provider: new HttpIpfsClusterProvider({
clusterApiUrl: process.env.MESHKIT_CLUSTER_API!,
metadataApiUrl: process.env.MESHKIT_METADATA_API!,
token: process.env.MESHKIT_CLUSTER_TOKEN,
}),
});
console.log((await mesh.doctor.run()).ok);Cluster REST Versus IPFS Proxy
| Endpoint type | Configure as |
|---|---|
| Cluster REST with MeshKit-supported routes such as add, cat, and pins | HttpIpfsClusterProvider |
Kubo-compatible /api/v0 endpoint or Cluster IPFS Proxy | HttpIpfsProvider |
| Public read gateway | GatewayRetrievalProvider |
Production Caveats
- Cluster pin orchestration does not replace MeshKit metadata.
- Cluster auth should be scoped separately from metadata and gateway tokens.
- Validate cleanup/unpin behavior before using it in tests or tenant workflows.
- Keep cluster topology, replication, peer policy, and garbage collection under operator control.
Validation
MESHKIT_LIVE_CLUSTER=1 MESHKIT_CLUSTER_API=https://cluster.example MESHKIT_CLUSTER_TOKEN=... npm run providers:cluster:liveProvide MESHKIT_CLUSTER_METADATA_API when validating against an existing metadata service. Otherwise the live validator may use temporary metadata wiring for the test.