Skip to content

hyperpolymath/ipfs-overlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

License: PMPL-1.0 Palimpsest Idris Inside Proven ZKP

ipfs-overlay

Purpose

Deploy IPFS nodes inside Kubernetes and bind them to the ZeroTier overlay network for secure, decentralized storage.

Architecture

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Public IPFS       β”‚
                    β”‚   (optional gate)   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚ (if enabled)
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Gateway Node      β”‚
                    β”‚   (public bridge)   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚       ZeroTier Overlay (encrypted mesh)       β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                       β”‚                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚  IPFS Node  │◄───────►│  IPFS Node  │◄───────►│  IPFS Node  β”‚
β”‚  (private)  β”‚  swarm  β”‚  (private)  β”‚  swarm  β”‚  (private)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components

  • IPFS daemon configuration - Kubo node settings for private operation

  • Kubernetes manifests - StatefulSet, PVC, Services

  • Bootstrap and peer discovery - Private swarm key, bootstrap list

  • Private routing - ZeroTier-only binding, no public DHT

Directory Structure

ipfs-overlay/
β”œβ”€β”€ manifests/
β”‚   β”œβ”€β”€ statefulset.yaml    # IPFS nodes with persistent storage
β”‚   β”œβ”€β”€ service.yaml        # Internal cluster service
β”‚   β”œβ”€β”€ pvc.yaml            # Persistent volume claims
β”‚   β”œβ”€β”€ configmap.yaml      # IPFS configuration
β”‚   └── secret.yaml         # Swarm key
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ ipfs-config.ncl     # Nickel IPFS configuration
β”‚   β”œβ”€β”€ swarm.ncl           # Swarm key generation
β”‚   └── bootstrap.ncl       # Bootstrap peer list
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ init-node.sh        # Node initialization
β”‚   β”œβ”€β”€ generate-swarm-key.sh
β”‚   └── health-check.sh
β”œβ”€β”€ Justfile
β”œβ”€β”€ README.adoc
β”œβ”€β”€ STATE.scm
β”œβ”€β”€ META.scm
└── ECOSYSTEM.scm

Inputs

Input Description Source

IPFS_SWARM_KEY

Private swarm encryption key

Generated or poly-secret-mcp

Bootstrap nodes

Initial peer addresses

configs/bootstrap.ncl

ZeroTier interface

Network interface for binding

zerotier-k8s-link

Storage class

Kubernetes storage provisioner

Cluster configuration

Outputs

Output Description

Private IPFS cluster

Encrypted, ZeroTier-bound IPFS swarm

Distributed storage layer

Content-addressed storage for stack

Gateway (optional)

HTTP gateway for content retrieval

Pinning service

Persistent content pinning

Integration Points

With FlatRacoon Stack

  • zerotier-k8s-link - IPFS binds exclusively to ZT interface

  • twingate-helm-deploy - External access via Twingate gateway

  • poly-observability-mcp - Storage metrics and health

Machine-Readable Manifest

{
  "module": "ipfs-overlay",
  "version": "0.1.0",
  "layer": "storage",
  "requires": ["kubernetes", "zerotier-k8s-link"],
  "provides": ["distributed-storage", "content-addressing", "pinning"],
  "config_schema": "configs/schema.ncl",
  "health_endpoint": "/ipfs/health",
  "metrics_endpoint": "/ipfs/metrics",
  "api_endpoint": "/api/v0"
}

Quick Start

# 1. Ensure ZeroTier overlay is running
just -f ../zerotier-k8s-link/Justfile status

# 2. Generate or retrieve swarm key
just generate-swarm-key
# Or: just fetch-swarm-key  # from Vault

# 3. Deploy IPFS nodes
just deploy

# 4. Verify cluster formation
just cluster-status

# 5. Test content pinning
echo "Hello FlatRacoon" | just pin-content

Private Swarm Configuration

Swarm Key Generation

# Generate new swarm key
echo -e "/key/swarm/psk/1.0.0/\n/base16/\n$(tr -dc 'a-f0-9' < /dev/urandom | head -c 64)" > swarm.key

IPFS Config for Private Operation

{
  "Bootstrap": [],
  "Addresses": {
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001"
    ],
    "API": "/ip4/127.0.0.1/tcp/5001",
    "Gateway": "/ip4/127.0.0.1/tcp/8080"
  },
  "Swarm": {
    "AddrFilters": null,
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": true
  },
  "Discovery": {
    "MDNS": {
      "Enabled": false
    }
  },
  "Routing": {
    "Type": "none"
  }
}

Status

Phase

Production-ready

Completion

100%

Next

Helm chart alternative, automated cluster scaling

License

PMPL-1.0-or-later

Architecture

See TOPOLOGY.md for a visual architecture map and completion dashboard.

Sponsor this project

Packages

 
 
 

Contributors