IPFS Deployment
Node.js + IPFS Deployment Examples: Docker, Kubernetes, Kubo, Helia & Elastic Setups
Running IPFS alongside Node.js applications is becoming increasingly popular for building decentralized apps (dApps), content platforms, and scalable backends. In this post we’ll look at practical deployment patterns using Docker and Kubernetes with the two main IPFS implementations: Kubo (Go) and Helia (JavaScript-native), plus guidance on building elastic, auto-scaling setups using Elastic-IPFS.
Quick Feature Comparison
┌──────────────────┬────────────────┬───────────────┬─────────────────┐
│ Feature │ Kubo (Go) │ Helia (JS) │ Elastic-IPFS │
├──────────────────┼────────────────┼───────────────┼─────────────────┤
│ Architecture │ Separate daemon│ In-process │ Hybrid (K8s) │
│ Language │ Go │ JavaScript │ Multi-language │
│ Setup Complexity │ Medium │ Low │ High │
│ Auto-scaling │ Manual/Pool │ Via HPA │ Native (K8s) │
│ Best for │ Heavy pinners │ Microservices │ Production dApps │
└──────────────────┴────────────────┴───────────────┴─────────────────┘
Implementation Deep Dive
Docker Deployment Examples
Kubo + Node.js (Separate Containers)
version: '3.8'
services:
ipfs:
image: ipfs/kubo:latest
volumes:
- ipfs-data:/data/ipfs
ports:
- "4001:4001"
- "5001:5001"
- "8080:8080"
app:
build: .
depends_on:
- ipfs
environment:
- IPFS_API_URL=http://ipfs:5001
Helia (Embedded in Node.js)
# Dockerfile
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
CMD ["node", "index.js"]
import { createHelia } from 'helia'
import { unixfs } from '@helia/unixfs'
const helia = await createHelia()
const fs = unixfs(helia)
// Add/retrieve files directly in your app
Elastic-IPFS Node
version: '3.8'
services:
elastic-ipfs:
image: elasticipfs/node:latest
environment:
- CLUSTER_MODE=auto
- REPLICATION_FACTOR=3
volumes:
- elastic-data:/data/ipfs
ports:
- "4001:4001"
- "5001:5001"
Kubernetes Deployment Examples
Kubo in Kubernetes (StatefulSet)
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ipfs-kubo
spec:
serviceName: ipfs
replicas: 3
template:
spec:
containers:
- name: ipfs
image: ipfs/kubo:latest
volumeMounts:
- name: data
mountPath: /data/ipfs
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 100Gi
Helia in Kubernetes (Deployment)
apiVersion: apps/v1
kind: Deployment
metadata:
name: ipfs-helia-app
spec:
replicas: 5
template:
spec:
containers:
- name: app
image: your-app:latest
env:
- name: HELIA_LIBP2P_LISTEN
value: "/ip4/0.0.0.0/tcp/4001"
Elastic-IPFS (Auto-Scaling)
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: elastic-ipfs
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: ipfs-cluster
minReplicas: 3
maxReplicas: 20
metrics:
- type: Resource
resource:
name: storage
target:
type: Utilization
averageUtilization: 70
Elastic-IPFS Auto-Scaling Patterns
Horizontal Scaling
Storage Scaling
Content Routing
Tiered Storage
Predictive Scaling
Recommended Architecture
Deployment Recommendations by Scale
Small / Homelab
Medium Production
Large Scale / Elastic
Official Resources & Documentation
IPFS
Kubo
Helia
Elastic-IPFS
IPFS Cluster
K8s Patterns
Questions for the Community
Are you running IPFS with Node.js in Docker or Kubernetes?
Do you prefer Kubo or Helia for your use case?
Have you implemented elastic/auto-scaling with IPFS?
Disclaimer
This content is for educational and informational purposes only. It is not technical advice. Running distributed systems at scale requires proper monitoring, security practices, and operational experience. Always test thoroughly before deploying to production.
DISCUSSION
No replies yet. Be the first to join the discussion!