Services
IPFS Pinning

Pinning

What is IPFS?

The Interplanetary File System (IPFS (opens in a new tab)) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network.

Pinning a File

What is Pinning?

Pinning is the mechanism that allows you to tell IPFS to store and keep a given object somewhere — the default being your local node, though in this case you will be pinning the object to the Fleek's IPFS Node.

How to pin a file?

There are many different ways that you could use Fleek interfaces to pin a file on IPFS:

To pin a file using the CLI you need to be authenticated, with a project selected, and use the add command.

Pinning a file
    > fleek ipfs add hello.txt
    > Success! QmNTCRYiZbtzDGEYtsTKwwtDVQF1XgvebudpRzcXVf5dYM
 
    > You can visit through the gateway:
    https://ipfs.io/ipfs/QmNTCRYiZbtzDGEYtsTKwwtDVQF1XgvebudpRzcXVf5dYM

When the file has been uploaded, you will get the Content Hash corresponding to the file or directories uploaded. You can user a public IPFS gateway (opens in a new tab) to check the uploaded file, like this. Gateways take a little time to replicate the file, so you might experience a delay before the file is visible in public gateways.

How to view/resolve a file?

With the files' IPFS hash at hand (e.g. Qmanou5uhcGhyW7noyB7LNFJBZkKcuUZnmpHeQSaidJ367), you can view or resolve your file by using any public or private IPFS gateway.

For example, using IPFS' public gateway by appending the hash in the appropiate section: https://ipfs.io/ipfs/Qmanou5uhcGhyW7noyB7LNFJBZkKcuUZnmpHeQSaidJ367 (opens in a new tab). Important: public IPFS gateways (list here) (opens in a new tab) take a little time to replicate new content, so there could be a minor delay in your file being fetchable by these gateways.

Last updated on March 23, 2023