Skip to content

What is IPFS? InterPlanetary File System Explained

DodaTech 2 min read

In this tutorial, you'll learn about What is IPFS? InterPlanetary File System Explained. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

What You'll Learn

Understand IPFS — a decentralized file system that replaces HTTP URLs with content hashes, making data permanent and censorship-resistant.

Why It Matters

IPFS is the backbone of decentralized storage. NFTs, DApps, and many Web3 projects use it to store data that can't be taken down or altered.

Real-World Use

Storing NFT metadata so it persists forever, hosting websites that no one can censor, and sharing files without a central server.

What is IPFS?

IPFS (InterPlanetary File System) is a peer-to-peer protocol for storing and sharing files. Instead of asking "where is this file?" (HTTP), it asks "what is this file?" (content addressing).

HTTP: https://example.com/images/cat.jpg
      └── Location-based (server can change content)

IPFS: ipfs://QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco
      └── Content-based (hash guarantees content)

Content Addressing

Files are identified by their cryptographic hash:

# Content ID (CID) is derived from the file content
echo "Hello, IPFS!" | ipfs add

# Output: added QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco

If the file changes, the hash changes. This guarantees integrity — no one can serve you different content under the same address.

How IPFS Works

You add file to IPFS
    ↓
File is split into blocks
    ↓
Each block gets a hash
    ↓
Blocks are distributed to peers
    ↓
You get a CID (Content Identifier)
    ↓
Anyone with the CID can retrieve blocks from any peer

Uploading and Retrieving

# Install IPFS
# https://ipfs.tech/#install

# Start IPFS daemon
ipfs daemon &

# Add a file
ipfs add myfile.pdf
# Output: added QmHash myfile.pdf

# Retrieve
ipfs get QmHash
# Downloads myfile.pdf

Pinning

Files on IPFS are only available as long as someone hosts them. Pinning ensures permanent availability:

# Pin a file (keep it on your node)
ipfs pin add QmHash

# List pinned files
ipfs pin ls

Pinning services: Pinata, Infura, Web3.Storage — they keep your files online 24/7.

IPFS + NFT Metadata

NFTs typically store metadata on IPFS so the data persists:

{
  "name": "Artwork #1",
  "description": "A unique digital painting",
  "image": "ipfs://QmXoypizj/artwork.png",
  "attributes": [
    { "trait_type": "Background", "value": "Blue" }
  ]
}

The metadata file itself is also on IPFS, so the entire record is immutable.

IPFS vs HTTP

Aspect HTTP IPFS
Addressing Location (URL) Content (hash)
Integrity No guarantee Cryptographic verification
Availability Single server Any peer
Censorship Easy to block Difficult
Persistence Until server stops Until no one pins it
Speed Fast (CDN) Varies (needs peers)

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro