HomeLabsIPFS PinningAPI/CLI
Using Scaleway IPFS Pinning with Kubo CLI
Jump toUpdate content

Using Scaleway IPFS Pinning from Kubo CLI

Reviewed on 25 May 2023Published on 30 May 2023

Scaleway IPFS Pinning allows you to permanently store a copy of your data from the public IPFS network on a Scaleway-owned node, thus providing you with an added layer of performance in the region of your choice. That way, your data remains available and accessible, even when your local machine is offline.

With your content now available on both your local node and our resilient and reliable external nodes, you drastically minimize the risk of disruptions thanks to redundancy. You can also enhance your data storage efficiency by pinning your content to your Scaleway node, and then remove it from your local node.

Supported by Protocol Labs, Kubo is the official implementation of IPFS. Written in Go programming language, it is available on Windows, Linux, and Mac. This page shows you how you can create and manage your volumes and pins using the Kubo CLI.

Requirements to use our service through the Kubo client

Security & Identity (IAM):

You may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Requirements:

Initializing and starting your Kubo client

  1. Enter the following CLI command to initialize your local IPFS node:

    ipfs init
  2. Enter the following CLI command to launch the IPFS background process, effectively turning your device into a functioning node in the IPFS network:

    ipfs daemon
    Tip:

    If you wish to use the same terminal for future commands, you need to run ipfs daemon &. This will run the daemon in the background and return control to the terminal.

Adding Scaleway as a remote pinning service

Enter the following command to add Scaleway as a remote service in your local Kubo via its CLI. Make sure to replace the example values with your own, using the configuration table below:

ipfs pin remote service add scaleway https://<REGION_ID>.ipfs.labs.scw.cloud/<VOLUME_ID> <SECRET_KEY>

Pinning a content using its CID

This operation shows you how you can pin a content using its CID through your own Kubo client.

Run the following CLI command to pin a content using its CID:

ipfs pin remote add --service=scaleway <CID>

You should get an output similar to the following, providing details about the content:

CID: <CID>
Name:
Status: pinned
Note:

There are four different statuses: ‘queued’, ‘pinning’, ‘pinned’ and ‘failed’.

Removing a CID using remote service

This operation shows you how you can remove a content using its CID, through your own Kubo client.

Run the following CLI command to remove a pin from your content using its CID:

ipfs pin remote rm --service=scaleway --cid=<CID>

Configuration table

ParameterDescription
REGION_IDCreate volumes and pins in this given region. Possible values are fr-par, pl-waw and nl-ams. Default value is fr-par.
VOLUME_IDID of the volume you wish to pin your content to. You can find it using either the Scaleway console or the Scaleway API/CLI
SECRET_KEYYour API secret key
CIDCID of the content you wish to pin.