Jump toSuggest an edit

Using Scaleway IPFS Pinning from Kubo CLI

Reviewed on 27 November 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

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • A valid API key
  • Downloaded and installed the IPFS Desktop or Kubo client
  • Created a volume

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

    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><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:

Status: pinned

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

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.
Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway