Network Configuration¶
Configure IPFS networking and peer connections.
IPFS Ports¶
| Port | Protocol | Purpose |
|---|---|---|
| 4001 | TCP/UDP | Swarm - peer connections |
| 5001 | TCP | API - local operations |
| 8080 | TCP | Gateway - content access |
Firewall Configuration¶
# Allow IPFS swarm connections
sudo ufw allow 4001/tcp
sudo ufw allow 4001/udp
# For cluster (if external)
sudo ufw allow 9096/tcp
Private Networks¶
Generate Swarm Key¶
# Install tool
go install github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen@latest
# Generate key
ipfs-swarm-key-gen > swarm.key
Deploy Swarm Key¶
Copy swarm.key to all nodes in the same location as the IPFS config.
Remove Bootstrap Peers¶
Peer Connection¶
View Connected Peers¶
Add Peer Manually¶
Bandwidth Management¶
Configure in IPFS config: