* ci: parallelize gotest by separating test/cli into own job
split the Go Test workflow into two parallel jobs:
- `unit-tests`: runs unit tests (excluding test/cli)
- `cli-tests`: runs test/cli end-to-end tests
test/cli takes ~3 minutes (~50% of total gotest time), so running
it in parallel should reduce wall-clock CI time by ~1.5-2.5 minutes.
both jobs produce JUnit XML and HTML reports for consistent debugging.
* ci(gotest): reduce noise on test timeout panics
add GOTRACEBACK=single to show only one goroutine stack instead of all
when a test timeout panic occurs. this makes CI output much cleaner
when tests hang.
* fix(ci): prevent stderr from corrupting test JSON output
- remove 2>&1 which mixed "go: downloading" stderr messages into JSON
- add JSON validation before parsing
- print failed test names for easier debugging
* ci(gotest): use gotestsum for human-readable test output
- replace per-package coverage loop with single gotestsum invocation
- both unit-tests and cli-tests now show human-readable output
- simplified coverage collection (single -coverprofile, no gocovmerge)
- clarified step names to indicate they run tests
* ci: fix codecov uploads by adding token
- add CODECOV_TOKEN to gotest.yml and sharness.yml
- update codecov-action to v5.5.2
- add fail_ci_if_error: false for robustness
codecov stopped receiving coverage data ~1 year ago when they
started requiring tokens for public repos
* refactor(make): add test_unit and test_cli targets
- add `make test_unit` for unit tests with coverage (used by CI)
- add `make test_cli` for CLI integration tests (used by CI)
- only disable colors when CI env var is set (local dev gets colors)
- remove legacy targets: test_go_test, test_go_short, test_go_race, test_go_expensive
- update gotest.yml to use make targets instead of inline commands
- add test artifacts to .gitignore
* fix(ci): move client/rpc tests to cli-tests job
client/rpc tests use test/cli/harness which requires the ipfs binary.
Move them from test_unit to test_cli where the binary is built.
also:
- update gotestsum to v1.13.0
- simplify workflow step names
* fix(ci): use build tags when listing test packages
go list needs build tags to properly exclude packages like fuse/mfs
when running with TEST_FUSE=0 (nofuse tag).
* fix(ci): move test/integration to cli-tests job
test/integration tests need the ipfs binary, move them from test_unit
to test_cli.
* fix(test): fix flaky kubo-as-a-library and GetClosestPeers tests
kubo-as-a-library: use `Bootstrap()` instead of raw `Swarm().Connect()`
to fix race condition between swarm connection and bitswap peer
discovery. `Bootstrap()` properly integrates peers into the routing
system, ensuring bitswap learns about connected peers synchronously.
GetClosestPeers: simplify retry logic using `EventuallyWithT` with
10-minute timeout. tests all 4 routing types (`auto`, `autoclient`,
`dht`, `dhtclient`) against real bootstrap peers with patient polling.
* fix(example): use bidirectional Swarm().Connect() for reliable bitswap
- connect nodes bidirectionally (A→B and B→A) to simulate mutual peering
- mutual peering protects connection from resource manager culling
- use port 0 for random available ports (avoids CI conflicts)
- enable LoopbackAddressesOnLanDHT for local testing
- move retry logic to test file using require.Eventually
* fix(ci): add test_examples target and parallel example-tests job
- add `make test_examples` target to mk/golang.mk for consistency with test_unit/test_cli
- move example tests to separate parallel CI job (example-tests)
- example: use Bootstrap() with autoconf.FallbackBootstrapPeers for reliable bitswap
- example: increase context timeout to 10 minutes
- test: add 60s per-request timeout to GetClosestPeers (server has 30s routing timeout)
- test: reduce EventuallyWithT to 3 minutes (locally passes in under 1 minute)
* fix(ci): improve test targets, exclusion patterns, and artifact naming
- define COVERPKG_EXCLUDE and UNIT_EXCLUDE as documented variables
- use grep -vE with single regex instead of multiple grep -v calls
- add mkdir -p before rm to ensure directories exist
- add DEPS_GO dependency to test_cli target
- make CLI test timeout configurable via TEST_CLI_TIMEOUT (default 10m)
- fix test_examples cleanup on failure using subshell
- reduce GetClosestPeers test wait time from 3m to 2m
- rename artifacts to match job names: unit-tests-{junit,html}, cli-tests-{junit,html}
- update cli-tests upload-artifact from v5 to v6
* fix(ci): fix unit test exclusion and speed up example test
- fix UNIT_EXCLUDE regex to match client/rpc at end of path
- remove public bootstrap peers from example (only connect to nodeA)
- example test now runs in ~3s instead of timing out
* fix(test): fix flaky TestAddMultipleGCLive race condition
added time.Sleep after spawning GC goroutines to ensure they reach
GCLock() before the test proceeds. without this, the adder's
maybePauseForGC() might check GCRequested() before GC has even
requested the lock, causing the lock to not be released and GC to
block indefinitely.
this matches the existing pattern in TestAddGCLive which already
had this sleep.
also replaced context.Background() with t.Context() in both
TestAddMultipleGCLive and TestAddGCLive for proper test lifecycle
management.
* fix(example): use test harness settings for reliable CI
the kubo-as-a-library example was flaky on CI. applied test-harness-like
settings that match what transports_test.go uses:
- TCP-only on 127.0.0.1 with random port (no QUIC/UDP)
- explicitly disable non-TCP transports (QUIC, Relay, WebTransport, etc)
- use NilRouterOption (no routing) since we connect peers directly
- bitswap works with directly connected peers without DHT lookups
- 2-minute context timeout
- streaming output in test for debugging
|
||
|---|---|---|
| .github | ||
| assets | ||
| bin | ||
| blocks/blockstoreutil | ||
| client/rpc | ||
| cmd | ||
| commands | ||
| config | ||
| core | ||
| coverage | ||
| docs | ||
| fuse | ||
| gc | ||
| misc | ||
| mk | ||
| p2p | ||
| plugin | ||
| profile | ||
| repo | ||
| routing | ||
| test | ||
| thirdparty | ||
| tracing | ||
| .codeclimate.yml | ||
| .cspell.yml | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| .hadolint.yaml | ||
| .mailmap | ||
| CHANGELOG.md | ||
| codecov.yml | ||
| CONTRIBUTING.md | ||
| doc.go | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| FUNDING.json | ||
| GNUmakefile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| Makefile | ||
| README.md | ||
| Rules.mk | ||
| SECURITY.md | ||
| version.go | ||
Kubo: IPFS Implementation in Go
The first implementation of IPFS.
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:
- Runs an IPFS node as a network service (LAN mDNS and WAN Amino DHT)
- Command-line interface (
ipfs --help) - WebUI for node management
- HTTP Gateway for trusted and trustless content retrieval
- HTTP RPC API to control the daemon
- HTTP Routing V1 client and server for delegated routing
- Content blocking for public node operators
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/:
🟢 Release Images
Use these for production deployments.
latestandreleasealways point at the latest stable releasevN.N.Npoints at a specific release tag
$ 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.
master-latestpoints atHEADofmastermaster-YYYY-DD-MM-GITSHApoints at a specific commit
🔴 Internal Staging Images
For testing arbitrary commits and experimental patches (force push to staging branch).
staging-latestpoints atHEADofstagingstaging-YYYY-DD-MM-GITSHApoints at a specific commit
Build from Source
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:
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
| Distribution | Install | Version |
|---|---|---|
| Ubuntu | PPA: sudo apt install ipfs-kubo |
|
| Arch | pacman -S kubo |
|
| Fedora | COPR: dnf install kubo |
|
| Nix | nix-env -i kubo |
|
| Gentoo | emerge -a net-p2p/kubo |
|
| openSUSE | zypper install kubo |
|
| Solus | sudo eopkg install kubo |
|
| Guix | guix install kubo |
|
| other | See Repology for the full list |
Snap no longer supported (#8688)
macOS
| Manager | Install | Version |
|---|---|---|
| Homebrew | brew install ipfs |
|
| MacPorts | sudo port install ipfs |
|
| Nix | nix-env -i kubo |
|
| other | See Repology for the full list |
Windows
| Manager | Install | Version |
|---|---|---|
| Scoop | scoop install kubo |
|
| other | See Repology for the full list |
Chocolatey no longer supported (#9341)
Documentation
| Topic | Description |
|---|---|
| Configuration | All config options reference |
| Environment variables | Runtime settings via env vars |
| Experimental features | Opt-in features in development |
| HTTP Gateway | Path, subdomain, and trustless gateway setup |
| HTTP RPC clients | Client libraries for Go, JS |
| Delegated routing | Multi-router and HTTP routing |
| Metrics & monitoring | Prometheus metrics |
| Content blocking | Denylist for public nodes |
| Customizing | Unsure if use Plugins, Boxo, or fork? |
| Debug guide | CPU profiles, memory analysis, tracing |
| Changelogs | Release notes for each version |
| All documentation | Full list of docs |
Development
See the Developer Guide for build instructions, testing, and contribution workflow.
Getting Help
- IPFS Forum - community support, questions, and discussion
- Community - chat, events, and working groups
- GitHub Issues - bug reports for Kubo specifically
- IPFS Docs Issues - documentation issues
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.
License
Dual-licensed under Apache 2.0 and MIT:
