32 lines
No EOL
1.2 KiB
Markdown
32 lines
No EOL
1.2 KiB
Markdown
---
|
|
obj: application
|
|
website: https://ipfs.io
|
|
---
|
|
|
|
# IPFS
|
|
IPFS, or the InterPlanetary File System, is a peer-to-peer distributed file system designed to connect all computing devices with the same system of files. It works similiarly to [Torrents](../../internet/BitTorrent.md).
|
|
|
|
## Key Concepts
|
|
### 1. **Decentralization:**
|
|
IPFS is designed to be a fully decentralized system where each node in the network stores a collection of hashed files. This eliminates the need for a central server, providing greater resilience and reducing single points of failure.
|
|
### 2. **Content Addressing:**
|
|
IPFS uses content addressing, where each file and all of the blocks within it are given a unique fingerprint called a cryptographic hash. This hash becomes the file's address on the network.
|
|
### 3. **Distributed Hash Table (DHT):**
|
|
IPFS utilizes DHT for efficient peer discovery and file lookup. It enables nodes to find the closest peers with a specific file.
|
|
|
|
## Docker Compose
|
|
```yml
|
|
version: '3'
|
|
|
|
services:
|
|
ipfs-node:
|
|
image: ipfs/go-ipfs
|
|
restart: always
|
|
ports:
|
|
- "4001:4001"
|
|
- "127.0.0.1:8080:8080"
|
|
- "127.0.0.1:5001:5001"
|
|
volumes:
|
|
- ./ipfs-data:/data/ipfs
|
|
command: ["--enable-pubsub-experiment", "--gateway", "all"]
|
|
``` |