Understanding IPFS

February 17, 2025

IPFS is a peer-to-peer, distributed file storage protocol designed to make the web faster, safer, and more open.

Unlike traditional web systems that retrieve files from centralized servers using URLs, IPFS retrieves content based on what it is rather than where it is.

Core Concepts of IPFS

  1. Content Addressing (CID - Content Identifier)
    • IPFS identifies files by their content hash instead of URLs, ensuring immutability and data integrity.
    • Example CID: QmXnnyufdzAWLrqzK5jY1jtHKnAybzG1xQumvpmqf7Koab
  2. Distributed Hash Table (DHT)
    • The DHT is a key-value store that helps nodes locate files efficiently in the network.
  3. Merkle DAG (Directed Acyclic Graph)
    • IPFS organizes data using a Merkle DAG, where each node stores data and links to its children via CIDs.
  4. Pinning
    • Since IPFS is distributed, data may be lost unless pinned for persistence. Tools like Pinata, Web3.Storage, and Filebase offer reliable pinning services.
  5. IPFS Gateway
    • An IPFS gateway allows HTTP-based access to IPFS content without installing an IPFS node.
    • Example Gateway URL: https://ipfs.io/ipfs/QmXnnyufdzAWLrqzK5jY1jtHKnAybzG1xQumvpmqf7Koab
  6. IPNS (InterPlanetary Name System)
    • IPNS references mutable content, acting like a domain name that always points to the latest version of the file.
    • Example IPNS Address: /ipns/k51qzi5uqu5dlk3x5v0zmbakmz0

Problems it solves