MeshKit
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 typeConfigure as
Cluster REST with MeshKit-supported routes such as add, cat, and pinsHttpIpfsClusterProvider
Kubo-compatible /api/v0 endpoint or Cluster IPFS ProxyHttpIpfsProvider
Public read gatewayGatewayRetrievalProvider

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:live

Provide MESHKIT_CLUSTER_METADATA_API when validating against an existing metadata service. Otherwise the live validator may use temporary metadata wiring for the test.

Next Steps

On this page