• Stars
    star
    15,905
  • Rank 1,807 (Top 0.04 %)
  • Language
    Go
  • License
    Other
  • Created over 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An IPFS implementation in Go

Kubo logo
Kubo: IPFS Implementation in GO

The first implementation of IPFS.


GoDoc

What is Kubo?

Kubo was the first IPFS implementation and is the most widely used one today. Implementing the Interplanetary Filesystem - the Web3 standard for content-addressing, interoperable with HTTP. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go.

Featureset

Other implementations

See List

What is IPFS?

IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas from previous systems such as Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single BitTorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built-in. You can also mount the world at /ipfs.

For more info see: https://docs.ipfs.tech/concepts/what-is-ipfs/

Before opening an issue, consider using one of the following locations to ensure you are opening your thread in the right place:

YouTube Channel Subscribers Follow @IPFS on Twitter

Next milestones

Milestones on GitHub

Table of Contents

Security Issues

Please follow SECURITY.md.

Minimal System Requirements

IPFS can run on most Linux, macOS, and Windows systems. We recommend running it on a machine with at least 4 GB of RAM and 2 CPU cores (kubo is highly parallel). On systems with less memory, it may not be completely stable, and you run on your own risk.

Install

The canonical download instructions for IPFS are over at: https://docs.ipfs.tech/install/. It is highly recommended you follow those instructions if you are not interested in working on IPFS development.

Docker

Official images are published at https://hub.docker.com/r/ipfs/kubo/:

Docker Image Version (latest semver)

More info on how to run Kubo (go-ipfs) inside Docker can be found here.

Official prebuilt binaries

The official binaries are published at https://dist.ipfs.tech#kubo:

dist.ipfs.tech Downloads

From there:

  • Click the blue "Download Kubo" on the right side of the page.
  • Open/extract the archive.
  • Move kubo (ipfs) to your path (install.sh can do it for you).

If you are unable to access dist.ipfs.tech, you can also download kubo (go-ipfs) from:

Updating

Using ipfs-update

IPFS has an updating tool that can be accessed through ipfs update. The tool is not installed alongside IPFS in order to keep that logic independent of the main codebase. To install ipfs-update tool, download it here.

Downloading builds using IPFS

List the available versions of Kubo (go-ipfs) implementation:

$ ipfs cat /ipns/dist.ipfs.tech/kubo/versions

Then, to view available builds for a version from the previous command ($VERSION):

$ ipfs ls /ipns/dist.ipfs.tech/kubo/$VERSION

To download a given build of a version:

$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_darwin-386.tar.gz    # darwin 32-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_darwin-amd64.tar.gz  # darwin 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_freebsd-amd64.tar.gz # freebsd 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-386.tar.gz     # linux 32-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-amd64.tar.gz   # linux 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-arm.tar.gz     # linux arm build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_windows-amd64.zip    # windows 64-bit build

Unofficial Linux packages

Packaging status

Arch Linux

kubo via Community Repo

# pacman -S kubo

kubo-git via AUR

Nix

With the purely functional package manager Nix you can install kubo (go-ipfs) like this:

$ nix-env -i kubo

You can also install the Package by using its attribute name, which is also kubo.

Solus

Package for Solus

$ sudo eopkg install kubo

You can also install it through the Solus software center.

openSUSE

Community Package for go-ipfs

Guix

Community Package for go-ipfs is no out-of-date.

Snap

No longer supported, see rationale in kubo#8688.

Unofficial Windows packages

Chocolatey

No longer supported, see rationale in kubo#9341.

Scoop

Scoop provides kubo as kubo in its 'extras' bucket.

PS> scoop bucket add extras
PS> scoop install kubo

Unofficial macOS packages

MacPorts

The package ipfs currently points to kubo (go-ipfs) and is being maintained.

$ sudo port install ipfs

Nix

In macOS you can use the purely functional package manager Nix:

$ nix-env -i kubo

You can also install the Package by using its attribute name, which is also kubo.

Homebrew

A Homebrew formula ipfs is maintained too.

$ brew install --formula ipfs

Build from Source

GitHub go.mod Go version

kubo's build system requires Go and some standard POSIX build tools:

  • GNU make
  • Git
  • GCC (or some other go compatible C Compiler) (optional)

To build without GCC, build with CGO_ENABLED=0 (e.g., make build CGO_ENABLED=0).

Install Go

GitHub go.mod Go version

If you need to update: Download latest version of Go.

You'll need to add Go's bin directories to your $PATH environment variable e.g., by adding these lines to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin

(If you run into trouble, see the Go install instructions).

Download and Compile IPFS

$ git clone https://github.com/ipfs/kubo.git

$ cd kubo
$ make install

Alternatively, you can run make build to build the go-ipfs binary (storing it in cmd/ipfs/ipfs) without installing it.

NOTE: If you get an error along the lines of "fatal error: stdlib.h: No such file or directory", you're missing a C compiler. Either re-run make with CGO_ENABLED=0 or install GCC.

Cross Compiling

Compiling for a different platform is as simple as running:

make build GOOS=myTargetOS GOARCH=myTargetArchitecture
OpenSSL

To build go-ipfs with OpenSSL support, append GOTAGS=openssl to your make invocation. Building with OpenSSL should significantly reduce the background CPU usage on nodes that frequently make or receive new connections.

Note: OpenSSL requires CGO support and, by default, CGO is disabled when cross-compiling. To cross-compile with OpenSSL support, you must:

  1. Install a compiler toolchain for the target platform.
  2. Set the CGO_ENABLED=1 environment variable.

Troubleshooting

  • Separate instructions are available for building on Windows.
  • git is required in order for go get to fetch all dependencies.
  • Package managers often contain out-of-date golang packages. Ensure that go version reports at least 1.10. See above for how to install go.
  • If you are interested in development, please install the development dependencies as well.
  • Shell command completions can be generated with one of the ipfs commands completion subcommands. Read docs/command-completion.md to learn more.
  • See the misc folder for how to connect IPFS to systemd or whatever init system your distro uses.

Getting Started

Usage

docs: Command-line quick start docs: Command-line reference

To start using IPFS, you must first initialize IPFS's config files on your system, this is done with ipfs init. See ipfs init --help for information on the optional arguments it takes. After initialization is complete, you can use ipfs mount, ipfs add and any of the other commands to explore!

Some things to try

Basic proof of 'ipfs working' locally:

echo "hello world" > hello
ipfs add hello
# This should output a hash string that looks something like:
# QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
ipfs cat <that hash>

HTTP/RPC clients

For programmatic interaction with Kubo, see our list of HTTP/RPC clients.

Troubleshooting

If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning ipfs init. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries.

Please direct general questions and help requests to our forums.

If you believe you've found a bug, check the issues list and, if you don't see your problem there, either come talk to us on Matrix chat, or file an issue of your own!

Packages

See IPFS in GO documentation.

Development

Some places to get you started on the codebase:

Map of Implemented Subsystems

WIP: This is a high-level architecture diagram of the various sub-systems of this specific implementation. To be updated with how they interact. Anyone who has suggestions is welcome to comment here on how we can improve this!

CLI, HTTP-API, Architecture Diagram

Origin

Description: Dotted means "likely going away". The "Legacy" parts are thin wrappers around some commands to translate between the new system and the old system. The grayed-out parts on the "daemon" diagram are there to show that the code is all the same, it's just that we turn some pieces on and some pieces off depending on whether we're running on the client or the server.

Testing

make test

Development Dependencies

If you make changes to the protocol buffers, you will need to install the protoc compiler.

Developer Notes

Find more documentation for developers on docs

Maintainer Info

Contributing

We ❤️ all our contributors; this project wouldn’t be what it is without you! If you want to help out, please see CONTRIBUTING.md.

This repository falls under the IPFS Code of Conduct.

Please reach out to us in one chat rooms.

License

This project is dual-licensed under Apache 2.0 and MIT terms:

More Repositories

1

ipfs

Peer-to-peer hypermedia protocol
22,646
star
2

js-ipfs

IPFS implementation in JavaScript
JavaScript
7,438
star
3

ipfs-desktop

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
JavaScript
5,842
star
4

awesome-ipfs

Community list of awesome projects, apps, tools, pinning services and more related to IPFS.
JavaScript
4,307
star
5

ipfs-companion

Browser extension that simplifies access to IPFS resources on the web
JavaScript
2,010
star
6

public-gateway-checker

Checks which public gateways are online or not
TypeScript
1,697
star
7

ipfs-webui

A frontend for an IPFS node.
JavaScript
1,470
star
8

specs

Technical specifications for the IPFS protocol stack
HTML
1,107
star
9

distributed-wikipedia-mirror

Putting Wikipedia Snapshots on IPFS
TypeScript
621
star
10

helia

An implementation of IPFS in JavaScript
TypeScript
568
star
11

go-ipfs-api

The go interface to ipfs's HTTP API
Go
452
star
12

community

Discussion and documentation on community practices
Shell
416
star
13

notes

IPFS Collaborative Notebook for Research
402
star
14

go-ds-crdt

A distributed go-datastore implementation using Merkle-CRDTs.
Go
378
star
15

ipget

Retrieve files over IPFS and save them locally.
Shell
353
star
16

in-web-browsers

Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing
345
star
17

camp

🏕 IPFS Camp is a 3 day hacker retreat designed for the builders of the Distributed Web.
JavaScript
313
star
18

ipfs-docs

📚IPFS documentation platform
Go
299
star
19

roadmap

IPFS Project && Working Group Roadmaps Repo
296
star
20

team-mgmt

IPFS Team Planning, Management & Coordination threads
JavaScript
267
star
21

go-ds-s3

An s3 datastore implementation
Go
236
star
22

go-datastore

key-value datastore interfaces
Go
219
star
23

go-bitswap

The golang implementation of the bitswap protocol
Go
214
star
24

devgrants

The IPFS Grant platform connects funding organizations with builders and researchers in the IPFS community.
165
star
25

iptb

InterPlanetary TestBed 🌌🛌
Go
161
star
26

go-cid

Content ID v1 implemented in go
Go
156
star
27

js-ipfsd-ctl

Control an IPFS daemon (go-ipfs or js-ipfs) using JavaScript!
TypeScript
149
star
28

boxo

A set of reference libraries for building IPFS applications and implementations in Go.
Go
148
star
29

papers

IPFS Papers (not specs)
TeX
145
star
30

ipfs-update

An updater tool for Kubo IPFS binary
Go
136
star
31

infra

Tools and systems for the IPFS community
Shell
129
star
32

go-ipfs-http-client

[archived] Legacy Kubo RPC client, use kubo/client/rpc instead.
Go
108
star
33

go-unixfs

Implementation of a unix-like filesystem on top of an ipld merkledag
Go
107
star
34

ipfs-gui

Creating standards and patterns for IPFS that are simple, accessible, reusable, and beautiful
104
star
35

go-graphsync

Initial Implementation Of GraphSync Wire Protocol
Go
100
star
36

pinning-services-api-spec

Standalone, vendor-agnostic Pinning Service API for IPFS ecosystem
Makefile
99
star
37

aegir

AEgir - Automated JavaScript project building
JavaScript
93
star
38

js-dag-service

Library for storing and replicating hash-linked data over the IPFS network.
TypeScript
93
star
39

js-ipfs-unixfs

JavaScript implementation of IPFS' unixfs (a Unix FileSystem representation on top of a MerkleDAG)
TypeScript
85
star
40

go-merkledag

The go-ipfs merkledag 'service' implementation
Go
81
star
41

js-ipfs-repo

Implementation of the IPFS Repo spec in JavaScript
JavaScript
79
star
42

js-ipns

Utilities for creating, parsing, and validating IPNS records
TypeScript
74
star
43

js-datastore-s3

Datastore implementation with S3 backend
TypeScript
72
star
44

js-ipfs-bitswap

JavaScript implementation of Bitswap 'data exchange' protocol used by IPFS
TypeScript
65
star
45

go-ipld-format

IPLD Node and Resolver interfaces in Go
Go
61
star
46

apps

Coordinating writing apps on top of ipfs, and their concerns.
59
star
47

go-log

A logging library used by go-ipfs
Go
56
star
48

go-ipld-git

ipld handlers for git objects
Go
54
star
49

fs-repo-migrations

Migrations for the filesystem repository of ipfs clients
Go
54
star
50

go-dnslink

dnslink resolution in go-ipfs
Go
53
star
51

go-ds-badger

Datastore implementation using badger as backend.
Go
53
star
52

go-ipfs-blockstore

[ARCHIVED] This module provides a thin wrapper over a datastore and provides caching strategies.
Go
49
star
53

ipfs-blog

IPFS Blog & News
Vue
48
star
54

distributions

Legacy dist.ipfs.tech website and artifact build tools. Currently only used for notarizing builds of Kubo and IPFS Cluster.
Less
48
star
55

go-ipfs-cmds

IPFS commands package
Go
47
star
56

go-mfs

An in memory model of a mutable IPFS filesystem
Go
46
star
57

local-offline-collab

Local Offline Collaboration Special Interest Group
46
star
58

newsletter

Prepare and store the IPFS Newsletter
44
star
59

go-ds-flatfs

A datastore implementation using sharded directories and flat files to store data
Go
44
star
60

go-ipld-eth

Plugin of the Go IPFS Client for Ethereum Blockchain IPLD objects
Go
43
star
61

dht-node

[ARCHIVED] Run just an ipfs dht node (Or many nodes at once!)
Go
41
star
62

npm-kubo

Install Kubo (go-ipfs) from NPM
JavaScript
40
star
63

go-ipns

Utilities for creating, parsing, and validating IPNS records
Go
39
star
64

interface-go-ipfs-core

[ARCHIVED] this interface is now part of boxo and kubo/client/rpc
Go
38
star
65

dir-index-html

Directory listing HTML for go-ipfs gateways
HTML
38
star
66

rainbow

A specialized IPFS HTTP gateway
Go
37
star
67

go-ds-leveldb

An implementation of go-datastore using leveldb
Go
35
star
68

go-ipfs-files

An old files library, please migrate to `github.com/ipfs/go-libipfs/files` instead.
Go
33
star
69

interop

Interoperability tests for IPFS Implementations (on-the-wire interop)
JavaScript
32
star
70

ipfs-website

Official IPFS Project website
Vue
32
star
71

protons

Protocol Buffers for Node.js and the browser without eval
TypeScript
32
star
72

go-ipld-cbor

A cbor implementation of the go-ipld-format
Go
31
star
73

go-ds-sql

An implementation of ipfs/go-datastore that can be backed by any SQL database.
Go
31
star
74

go-ipfs-chunker

go-ipfs-chunkers provides Splitter implementations for data before being ingested to IPFS
Go
31
star
75

go-blockservice

The go 'blockservice' implementation, combines local and remote storage seamlessly
Go
27
star
76

service-worker-gateway

[WIP EXPERIMENT] IPFS Gateway implemented in Service Worker
TypeScript
25
star
77

go-ipld-eth-import

🌐 Bring Ethereum to IPFS 🌐
Go
25
star
78

ipld-explorer-components

React components for https://explore.ipld.io and ipfs-webui
TypeScript
24
star
79

interface-datastore

datastore interface
JavaScript
22
star
80

js-ipfs-utils

IPFS utils
JavaScript
22
star
81

metrics

Regularly collect and publish metrics about the IPFS ecosystem
JavaScript
21
star
82

js-ipfs-merkle-dag

[DEPRECATED]
JavaScript
20
star
83

js-datastore-level

Datastore implementation with level(up/down) backend
TypeScript
19
star
84

go-ipfs-example-plugin

Demo plugin for Kubo IPFS daemon
Go
19
star
85

benchmarks

Benchmarking for IPFS
JavaScript
19
star
86

ipfs-ds-convert

Command-line tool for converting datastores (e.g. from FlatFS to Badger)
Go
18
star
87

go-ipfs-provider

Go
17
star
88

js-kubo-rpc-client

A client library for the Kubo RPC API
JavaScript
17
star
89

go-pinning-service-http-client

An IPFS Pinning Service HTTP Client
Go
17
star
90

go-ipfs-gateway

Go implementation of the HTTP-to-IPFS gateway -- currently lives in go-ipfs
16
star
91

go-ipld-zcash

An implementation of the zcash block and transaction datastructures for ipld
Go
16
star
92

ipfs-camp-2022

Conference content and other resources for IPFS Camp 2022 in Lisbon, Portugal
16
star
93

go-ipfs-config

[ARCHIVED] config is now part of go-ipfs repo
Go
16
star
94

mobile-design-guidelines

Making IPFS work for mobile
15
star
95

js-datastore-core

Contains various implementations of the API contract described in interface-datastore
TypeScript
15
star
96

ecosystem-directory

Interactive showcase of projects and products built using IPFS, the InterPlanetary File System.
HTML
15
star
97

js-datastore-fs

Datastore implementation with file system backend
TypeScript
14
star
98

go-namesys

go-namesys provides publish and resolution support for the /ipns/ namespace in go-ipfs
Go
14
star
99

helia-unixfs

UnixFS commands for helia
TypeScript
14
star
100

js-stores

TypeScript interfaces used by IPFS internals
TypeScript
14
star