An IPFS implementation in Go
  • Go 85.2%
  • Shell 14.1%
  • Makefile 0.6%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
questfever 842d9aa50e
fix(key): restrict overwritten key exports to owner-only permissions (#11428)
* fix(key): restrict overwritten key exports to owner-only permissions

Signed-off-by: questfever <questfever@outlook.com>

* fix(atomicfile): temp file leak and name limit

Both problems surface through `ipfs key export`, which now writes
through this helper, but they affect every caller: config writes, repo
migrations and `ipfs update`.

- remove the temporary file when the rename fails, so one holding
  private key material is not left next to the target
- keep the ".tmp-" prefix and the random suffix within the 255 byte
  file name limit, so a target with a long name can still be written

* fix(key): route key export by target type

Choosing the write path with os.Lstat treated /dev/stdout, /dev/stderr
and /dev/fd/N as plain paths, because they are symlinks into
/proc/self/fd, so the atomic write failed on targets that worked
before. Decide by what the path resolves to, and state the whole
contract in the command help.

- regular file or nothing yet: written to a temporary file and renamed
  over the target, following symlinks, including one whose target does
  not exist yet
- character device or pipe: streamed in place, confirmed on the open
  descriptor and without O_TRUNC, so a path swapped for a regular file
  can neither receive the key nor be emptied
- anything else: refused, naming the path
- errors name the file the user asked for, and the temporary file is
  flushed before the rename

* fix(key): stop export landing on the wrong file

An export could replace a file the target symlink does not point at.

resolveSymlink joined a relative link target onto the path as typed,
so ".." collapsed lexically. Where a parent component was itself a
symlink, the join named a file outside the directory the link
resolves to: the key was renamed over that file, and the intended
target was never written. The link's parent is now resolved with
filepath.EvalSymlinks before the join.

* test(key): drop umask dependency in export test

os.WriteFile applies the umask, so under umask 077 the fixture was
created 0600 and the check that a failed export leaves the file at
0644 failed for reasons unrelated to the code under test. The CLI
test already chmods for the same reason.

---------

Signed-off-by: questfever <questfever@outlook.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2026-08-14 18:05:40 +02:00
.github chore(ci): remove self-hosted runners [skip changelog] (#11426) 2026-08-13 21:53:14 +02:00
assets docs: drop expired pgp key from security notes (#11422) 2026-08-07 13:45:43 +02:00
bin chore(mkreleaselog): exclude bot accounts 2026-06-08 09:19:34 +02:00
blocks/blockstoreutil refactor: apply go fix modernizers from Go 1.26 (#11190) 2026-02-11 01:01:32 +01:00
client/rpc fix(rpc): validate UnixFS in object patch (#11248) 2026-03-27 20:22:22 +01:00
cmd chore: bump go-libp2p-kad-dht to v0.42 (#11398) 2026-07-22 00:55:10 +02:00
commands refactor: apply go fix modernizers from Go 1.26 (#11190) 2026-02-11 01:01:32 +01:00
config chore(deps): bump go-libp2p and go-libp2p-pubsub (#11389) 2026-07-09 21:20:35 +02:00
core fix(key): restrict overwritten key exports to owner-only permissions (#11428) 2026-08-14 18:05:40 +02:00
coverage fix(fuse): switch to hanwen/go-fuse (#11272) 2026-04-10 01:21:03 +02:00
docs docs: guide for running on low-memory devices (#11427) 2026-08-13 18:01:40 +02:00
fuse fix: update go-test module (#11390) 2026-07-16 23:21:05 -10:00
gc fix(mfs): stop repo gc from freezing files ops (#11386) 2026-07-07 17:20:26 +02:00
internal/fusemount fix(fuse): IPNS writes actually publish (#11271) 2026-04-03 02:08:58 +02:00
misc docs: guide for running on low-memory devices (#11427) 2026-08-13 18:01:40 +02:00
mk feat: derive AgentSuffix from build origin (#11341) 2026-06-05 20:27:14 +02:00
p2p feat(p2p): add --foreground flag to listen and forward commands (#11099) 2026-01-09 19:22:43 +01:00
plugin chore: restore default telemetry for now (#11415) 2026-07-29 19:13:08 +02:00
profile chore: use go-log/v2 (#10801) 2025-05-19 13:04:05 -07:00
repo fix(key): restrict overwritten key exports to owner-only permissions (#11428) 2026-08-14 18:05:40 +02:00
routing chore: bump go-libp2p-kad-dht to v0.42 (#11398) 2026-07-22 00:55:10 +02:00
test fix(key): restrict overwritten key exports to owner-only permissions (#11428) 2026-08-14 18:05:40 +02:00
thirdparty remove unneeded thirdparty packages (#10871) 2025-07-16 01:53:42 -07:00
tracing chore: fix broken url in comment (#10606) 2024-11-29 20:23:13 +01:00
.codeclimate.yml disable codeclimate 'maintainability' checks 2017-12-31 15:21:16 -08:00
.cspell.yml feat: telemetry plugin (#10866) 2025-08-18 20:46:05 +02:00
.dockerignore feat: re-enable docker sharness tests (#8808) 2022-03-30 11:07:26 -04:00
.gitattributes feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
.gitignore fix(fuse): switch to hanwen/go-fuse (#11272) 2026-04-10 01:21:03 +02:00
.golangci.yml client/rpc: migrate go-ipfs-http-client 2023-05-30 21:28:07 +02:00
.hadolint.yaml feat(ci): docker linting (#10927) 2025-08-26 17:01:06 +02:00
.mailmap chore(mailcap): document rational 2020-05-27 10:22:44 -07:00
AGENTS.md docs: specs and boxo guardrails 2026-08-13 18:44:04 +02:00
CHANGELOG.md chore: start v0.44.0 dev cycle 2026-07-22 22:04:39 +02:00
codecov.yml chore: clean up after circleci removal 2023-03-21 14:57:14 +01:00
CONTRIBUTING.md docs: add contribution and stability guardrails 2026-07-22 20:16:02 +02:00
doc.go doc: remove out of date documentation 2019-05-16 16:25:01 -07:00
docker-compose.yaml fix: listen on loopback for API and gateway ports in docker-compose.yaml (#8773) 2022-03-09 10:31:07 -05:00
Dockerfile chore: go 1.26.5 and deps (#11400) 2026-07-22 21:42:57 +02:00
FUNDING.json Create FUNDING.json (#10734) 2025-02-25 16:47:01 -05:00
GNUmakefile fix: require gmake 2019-08-01 12:18:56 -07:00
go.mod chore: update p2p-forge to v0.10.1 (#11414) 2026-07-29 19:12:59 +02:00
go.sum chore: update p2p-forge to v0.10.1 (#11414) 2026-07-29 19:12:59 +02:00
LICENSE chore(license): fix broken link to apache-2.0 2022-07-20 12:31:34 -07:00
LICENSE-APACHE Create LICENSE-APACHE 2019-05-06 11:01:16 -07:00
LICENSE-MIT License update to dual MIT and Apache 2 2019-05-06 10:56:15 -07:00
Makefile feat: add default makefile to call gnumake 2019-08-01 12:53:00 -07:00
README.md docs: guide for running on low-memory devices (#11427) 2026-08-13 18:01:40 +02:00
Rules.mk fix(mfs): fix fsync deadlock, set attrs, disable default caching (#11255) 2026-04-02 17:52:53 +02:00
SECURITY.md chore: refresh issue templates and docs links 2026-08-06 16:13:18 +02:00
version.go chore: release v0.43.0 2026-08-03 13:58:01 +02:00
version_test.go feat: derive AgentSuffix from build origin (#11341) 2026-06-05 20:27:14 +02:00


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.

For running Kubo on constrained hardware such as a Raspberry Pi, see Kubo on low-memory devices.

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

Distribution Install Version
Ubuntu PPA: sudo apt install ipfs-kubo PPA: twdragon
Arch pacman -S kubo Arch package
Fedora COPR: dnf install kubo COPR: taw
Nix nix-env -i kubo nixpkgs unstable
Gentoo emerge -a net-p2p/kubo Gentoo package
openSUSE zypper install kubo openSUSE Tumbleweed
Solus sudo eopkg install kubo Solus package
Guix guix install kubo Guix package
other See Repology for the full list

Snap no longer supported (#8688)

macOS

Manager Install Version
Homebrew brew install ipfs Homebrew
MacPorts sudo port install ipfs MacPorts
Nix nix-env -i kubo nixpkgs unstable
other See Repology for the full list

Windows

Manager Install Version
Scoop scoop install kubo Scoop
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
FUSE mounts Mount /ipfs, /ipns, /mfs as local filesystems
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. AI coding agents should follow AGENTS.md.

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: