Convert Figma logo to code with AI

ipfs logokubo

An IPFS implementation in Go

16,875
3,144
16,875
1,021

Top Related Projects

16,874

An IPFS implementation in Go

libp2p implementation in Go

7,421

IPFS implementation in JavaScript

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.

Pinset orchestration for IPFS

3,195

Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.

Quick Overview

Kubo (formerly go-ipfs) is the main implementation of the InterPlanetary File System (IPFS) protocol, written in Go. It provides a decentralized, peer-to-peer network for storing and sharing files, websites, and other data across the internet without relying on centralized servers.

Pros

  • Decentralized and distributed, enhancing data availability and resilience
  • Content-addressed storage, ensuring data integrity and deduplication
  • Supports various use cases, from file sharing to decentralized websites
  • Active development and community support

Cons

  • Learning curve for users unfamiliar with decentralized systems
  • Performance can be slower compared to traditional centralized systems
  • Requires running a node, which may be resource-intensive for some users
  • Limited adoption compared to traditional file-sharing methods

Code Examples

  1. Adding a file to IPFS:
import "github.com/ipfs/kubo/core/coreapi"

ipfs, _ := coreapi.NewIPFS(ctx)
path, _ := ipfs.Unixfs().Add(ctx, strings.NewReader("Hello, IPFS!"))
fmt.Println(path.String()) // Outputs: /ipfs/QmXXX...
  1. Retrieving a file from IPFS:
import "github.com/ipfs/kubo/core/coreapi"

ipfs, _ := coreapi.NewIPFS(ctx)
node, _ := ipfs.Unixfs().Get(ctx, path.New("/ipfs/QmXXX..."))
content, _ := io.ReadAll(node.(files.File))
fmt.Println(string(content)) // Outputs: Hello, IPFS!
  1. Pinning content:
import "github.com/ipfs/kubo/core/coreapi"

ipfs, _ := coreapi.NewIPFS(ctx)
path := path.New("/ipfs/QmXXX...")
err := ipfs.Pin().Add(ctx, path)
if err != nil {
    fmt.Println("Failed to pin:", err)
}

Getting Started

To get started with Kubo:

  1. Install Go (version 1.16 or later)
  2. Clone the repository:
    git clone https://github.com/ipfs/kubo.git
    
  3. Build and install:
    cd kubo
    make install
    
  4. Run IPFS daemon:
    ipfs daemon
    

For more detailed instructions and usage examples, refer to the project's documentation and README.

Competitor Comparisons

16,874

An IPFS implementation in Go

Pros of kubo

  • More established and mature project with a larger community
  • Extensive documentation and resources available
  • Wider range of features and functionality

Cons of kubo

  • Potentially more complex and resource-intensive
  • May have a steeper learning curve for newcomers
  • Could be slower to implement new experimental features

Code Comparison

kubo:

type Config struct {
    Identity  identity.Identity
    Datastore repo.Datastore
    Addresses config.Addresses
    Mounts    Mounts
    Discovery Discovery
    Routing   Routing
    // ... (additional fields)
}

There is no meaningful code comparison available for this scenario, as both repositories refer to the same project. The kubo repository is the main implementation of the IPFS protocol, and there isn't a separate "kubo>" repository to compare it against.

Summary

The comparison between kubo and kubo> is not applicable, as they refer to the same project. kubo (previously known as go-ipfs) is the main implementation of the InterPlanetary File System (IPFS) protocol. It's a mature, feature-rich project with a large community and extensive documentation. While it offers a wide range of functionality, it may be more complex and resource-intensive compared to alternative IPFS implementations. The project continues to evolve and improve, balancing stability with the introduction of new features.

libp2p implementation in Go

Pros of go-libp2p

  • More focused and modular, specifically for networking and peer-to-peer communication
  • Easier to integrate into other projects due to its standalone nature
  • More flexible and customizable for specific use cases

Cons of go-libp2p

  • Less feature-rich compared to Kubo's full IPFS implementation
  • Requires more setup and configuration for full IPFS functionality
  • May have a steeper learning curve for developers new to p2p networking

Code Comparison

go-libp2p:

host, err := libp2p.New(
    libp2p.ListenAddrStrings("/ip4/0.0.0.0/tcp/0"),
    libp2p.Identity(priv),
)

Kubo:

node, err := core.NewNode(ctx, &core.BuildCfg{
    Online: true,
    Repo:   repo,
})

go-libp2p focuses on creating a p2p host, while Kubo initializes a full IPFS node. go-libp2p provides more granular control over network configuration, whereas Kubo offers a higher-level abstraction for IPFS functionality.

7,421

IPFS implementation in JavaScript

Pros of js-ipfs

  • JavaScript-based, allowing easy integration with web applications and Node.js projects
  • Lightweight and suitable for browser environments
  • Supports running IPFS nodes directly in web browsers

Cons of js-ipfs

  • Generally slower performance compared to Kubo
  • Less feature-complete than Kubo
  • May have limitations in handling large-scale data or high-throughput scenarios

Code Comparison

Kubo (Go):

node, err := core.NewNode(ctx, &core.BuildCfg{
    Online: true,
    Repo:   repo,
})

js-ipfs (JavaScript):

const node = await IPFS.create({
  repo: 'ok' + Math.random(),
  config: { Addresses: { Swarm: [] } }
})

Both examples demonstrate node creation, but Kubo uses Go's error handling pattern, while js-ipfs uses JavaScript's Promise-based async/await syntax. Kubo's implementation tends to offer more low-level control, while js-ipfs provides a more JavaScript-friendly API.

js-ipfs is ideal for web-based projects and quick prototyping, offering easier integration with JavaScript ecosystems. However, for high-performance, feature-rich applications, Kubo remains the more robust choice, benefiting from Go's performance advantages and a more extensive feature set.

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.

Pros of IPFS Desktop

  • User-friendly graphical interface for managing IPFS nodes
  • Easy installation and setup for non-technical users
  • Integrates IPFS functionality into the desktop environment

Cons of IPFS Desktop

  • Limited customization options compared to Kubo
  • May have higher resource usage due to GUI overhead
  • Fewer advanced features for power users

Code Comparison

IPFS Desktop (JavaScript):

const { start } = require('ipfs-desktop')

start({
  // Configuration options
})

Kubo (Go):

package main

import (
    "fmt"
    "github.com/ipfs/kubo/core"
)

func main() {
    node, err := core.NewNode(ctx, &core.BuildCfg{})
    // Error handling and node operations
}

Summary

IPFS Desktop provides a more accessible entry point for users new to IPFS, offering a graphical interface and simplified setup. However, it sacrifices some of the flexibility and advanced features found in Kubo. Kubo, being the reference implementation of IPFS, offers more control and customization options but requires more technical knowledge to set up and use effectively. The choice between the two depends on the user's needs and technical expertise.

Pinset orchestration for IPFS

Pros of ipfs-cluster

  • Designed for collaborative pinning and data orchestration across multiple IPFS nodes
  • Provides advanced features like replication factor control and pinset management
  • Offers a more scalable solution for large-scale IPFS deployments

Cons of ipfs-cluster

  • Adds complexity to the IPFS setup, requiring additional configuration and maintenance
  • May introduce overhead in terms of resource usage compared to a single Kubo node
  • Has a smaller community and ecosystem compared to Kubo

Code Comparison

Kubo (Go):

node, err := core.NewNode(ctx, &core.BuildCfg{
    Online: true,
    Routing: libp2p.DHTOption,
})

ipfs-cluster (Go):

cluster, err := ipfscluster.NewCluster(
    ctx,
    host,
    cfg,
    consensus,
    api,
    ipfs,
    tracker,
    monitor,
    allocator,
    informer,
    tracer,
)

Both projects are written in Go, but ipfs-cluster's initialization involves more components, reflecting its focus on cluster management and coordination.

3,195

Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.

Pros of Storj

  • Offers a decentralized cloud storage solution with encryption and sharding
  • Implements a token-based economy for incentivizing storage providers
  • Focuses on enterprise-grade reliability and performance

Cons of Storj

  • Less widespread adoption compared to IPFS ecosystem
  • More complex setup and management for individual users
  • Limited content addressing capabilities

Code Comparison

Storj (Go):

func (db *DB) Get(ctx context.Context, bucket []byte, key []byte) (_ []byte, err error) {
    defer mon.Task()(&ctx)(&err)
    return db.db.Get(bucket, key)
}

IPFS/Kubo (Go):

func (n *IpfsNode) Get(ctx context.Context, p path.Path) (ipld.Node, error) {
    return n.Resolver.ResolveOnce(ctx, p)
}

Both projects use Go and implement similar get functions, but Storj focuses on bucket/key storage, while IPFS uses content-addressed paths.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Kubo logo
Kubo: IPFS Implementation in Go

The first implementation of IPFS.

Official Part of IPFS Project Discourse Forum Matrix GitHub release


What is Kubo? | Quick Taste | Install | Documentation | Development | Getting Help

What is Kubo?

Kubo was the first IPFS implementation and is the most widely used one today. It takes an opinionated approach to content-addressing (CIDs, DAGs) that maximizes interoperability: UnixFS for files and directories, HTTP Gateways for web browsers, Bitswap and HTTP for verifiable data transfer.

Features:

Other IPFS implementations: Helia (JavaScript), more...

Quick Taste

After installing Kubo, verify it works:

$ ipfs init
generating ED25519 keypair...done
peer identity: 12D3KooWGcSLQdLDBi2BvoP8WnpdHvhWPbxpGcqkf93rL2XMZK7R

$ ipfs daemon &
Daemon is ready

$ echo "hello IPFS" | ipfs add -q --cid-version 1
bafkreicouv3sksjuzxb3rbb6rziy6duakk2aikegsmtqtz5rsuppjorxsa

$ ipfs cat bafkreicouv3sksjuzxb3rbb6rziy6duakk2aikegsmtqtz5rsuppjorxsa
hello IPFS

Verify this CID is provided by your node to the IPFS network: https://check.ipfs.network/?cid=bafkreicouv3sksjuzxb3rbb6rziy6duakk2aikegsmtqtz5rsuppjorxsa

See ipfs add --help for all import options. Ready for more? Follow the command-line quick start.

Install

Follow the official installation guide, or choose: prebuilt binary | Docker | package manager | from source.

Prefer a GUI? Try IPFS Desktop and/or IPFS Companion.

Minimal System Requirements

Kubo runs on most Linux, macOS, and Windows systems. For optimal performance, we recommend at least 6 GB of RAM and 2 CPU cores (more is ideal, as Kubo is highly parallel).

[!IMPORTANT] Larger pinsets require additional memory, with an estimated ~1 GiB of RAM per 20 million items for reproviding to the Amino DHT.

[!CAUTION] Systems with less than the recommended memory may experience instability, frequent OOM errors or restarts, and missing data announcement (reprovider window), which can make data fully or partially inaccessible to other peers. Running Kubo on underprovisioned hardware is at your own risk.

Official Prebuilt Binaries

Download from https://dist.ipfs.tech#kubo or GitHub Releases.

Docker

Official images are published at https://hub.docker.com/r/ipfs/kubo/: Docker Image Version (latest semver)

🟢 Release Images

Use these for production deployments.

$ docker pull ipfs/kubo:latest
$ docker run --rm -it --net=host ipfs/kubo:latest

To customize your node, pass config via -e or mount scripts in /container-init.d.

🟠 Developer Preview Images

For internal testing, not intended for production.

🔴 Internal Staging Images

For testing arbitrary commits and experimental patches (force push to staging branch).

Build from Source

GitHub go.mod Go version

git clone https://github.com/ipfs/kubo.git
cd kubo
make build    # creates cmd/ipfs/ipfs
make install  # installs to $GOPATH/bin/ipfs

See the Developer Guide for details, Windows instructions, and troubleshooting.

Package Managers

Kubo is available in community-maintained packages across many operating systems, Linux distributions, and package managers. See Repology for the full list: Packaging status

[!WARNING] These packages are maintained by third-party volunteers. The IPFS Project and Kubo maintainers are not responsible for their contents or supply chain security. For increased security, build from source.

Linux

DistributionInstallVersion
UbuntuPPA: sudo apt install ipfs-kuboPPA: twdragon
Archpacman -S kuboArch package
FedoraCOPR: dnf install kuboCOPR: taw
Nixnix-env -i kubonixpkgs unstable
Gentooemerge -a net-p2p/kuboGentoo package
openSUSEzypper install kuboopenSUSE Tumbleweed
Solussudo eopkg install kuboSolus package
Guixguix install kuboGuix package
otherSee Repology for the full list

Snap no longer supported (#8688)

macOS

ManagerInstallVersion
Homebrewbrew install ipfsHomebrew
MacPortssudo port install ipfsMacPorts
Nixnix-env -i kubonixpkgs unstable
otherSee Repology for the full list

Windows

ManagerInstallVersion
Scoopscoop install kuboScoop
otherSee Repology for the full list

Chocolatey no longer supported (#9341)

Documentation

TopicDescription
ConfigurationAll config options reference
Environment variablesRuntime settings via env vars
Experimental featuresOpt-in features in development
HTTP GatewayPath, subdomain, and trustless gateway setup
HTTP RPC clientsClient libraries for Go, JS
Delegated routingMulti-router and HTTP routing
Metrics & monitoringPrometheus metrics
Content blockingDenylist for public nodes
CustomizingUnsure if use Plugins, Boxo, or fork?
Debug guideCPU profiles, memory analysis, tracing
ChangelogsRelease notes for each version
All documentationFull list of docs

Development

See the Developer Guide for build instructions, testing, and contribution workflow.

Getting Help

Security Issues

See SECURITY.md.

Contributing

We welcome contributions. See CONTRIBUTING.md and the Developer Guide.

This repository follows the IPFS Code of Conduct.

Maintainer Info

[!NOTE] Kubo is maintained by the Shipyard team.

Release Process

License

Dual-licensed under Apache 2.0 and MIT: