Installing ipfs-copy

Introduction

ipfs-copy is a migration tool for both existing Infura IPFS users and new users currently self-hosting their data that want to migrate to the new, more reliable, performant Infura IPFS service with all the latest features.

This is an excellent step-by-step guide to it’s use:
https://blog.infura.io/post/migrate-your-files-to-infuras-new-ipfs-service-in-3-easy-steps

This note is to expand on the installation step. ipfs-copy is written in Go and there have been recent changes to how Go manages packages.

Three ways

There are 3 ways to install ipfs-copy.

#1 The no-Go approach

If you don’t have Go installed yet, you can simply download a pre-built ipfs-copy appropriate for your machine’s architecture from github:
Releases · INFURA/ipfs-copy · GitHub

Then make sure you have put it somewhere in your $PATH for easy access. I have a bin directory in my $HOME and add it to my $PATH defined in my shell startup files.

#2 Go tools

To install Go, go here and follow the instructions:
Download and install - The Go Programming Language

Then you can use Go to fetch and build ipfs-copy. NOTE that some tutorials still show the use of “go get”, this is no longer used, use “go install” instead:

$ go install github.com/INFURA/ipfs-copy/cmd/ipfs-copy@latest

This will place ipfs-copy in $HOME/go/bin/ which should already have been added to your $PATH.

#3 Build from source

You also need Go installed for this option and, IMHO, it does not have much advantage over the above methods. You can check the github repo README for the details of this method.

Verify…

Verify you have ipfs-copy available:

$ ipfs-copy version
ipfs-copy version: x.y.z

If you get something like:

zsh: command not found: ipfs-copy

Then make sure you PATH variable is set correctly and restart your terminal session.

1 Like