Getting started with Scaleway IPFS using CLI
Created by Protocol Labs, InterPlanetary File System (IPFS) is a decentralized protocol used to store and share content.
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.
- Data is public: our IPFS nodes are bootstrapped with public IPFS nodes. This implies that any pinned content will be available on the public IPFS network.
- Data is shared: public IPFS nodes can fetch and host your pinned content. This means your data could be hosted anywhere from America, Asia, and everything in between. Once the content is delivered to external peers, Scaleway cannot delete it.
- Data is not encrypted: we do not apply any encryption algorithm to your data.
The Scaleway Command Line Interface (CLI) allows you to pilot your Scaleway infrastructure directly from your terminal, providing a faster way to administer and monitor your resources. Scaleway CLI is an essential tool for operating efficiently in your cloud environment. It provides many functionalities, including the ability to create and manage volumes and pins.
You may need certain IAM permissions to carry out some actions described on this page. This means:
A volume serves as a storage area for a set of pins. Think of it as Object Storage buckets.
Export the following environment variable to enable the IPFS command in the Scaleway CLI:export SCW_ENABLE_LABS=true
Enter the following command to create your volume using the CLI. Make sure to replace the example values with your own, using the configuration table below:SCW_ENABLE_LABS=true scw ipfs volume create project-id=00000000-0000-0000-0000-000000000000 region=fr-par name=my-volume
You should get a response like the following, providing details about your newly created volume.ID 11111111-1111-1111-1111-111111111111ProjectID 00000000-0000-0000-0000-000000000000Region fr-parCountPin 0CreatedAt nowUpdatedAt nowName my-volume
ID of the Project you want to create your volume in. Your Project name can only contain alphanumeric characters, spaces, dots, and dashes. To find your Project ID, you can consult the Scaleway console
Create a volume in this given region. Possible values are
nl-ams. Default value is
Create a volume with this given name.
Now that we have a volume, we can pin content from CIDs to it. Pinning a file essentially allows you to specify which particular content should always be stored and readily accessible on the IPFS network.
Enter the following command to pin your content on your volume. Make sure to replace the example values with your own, using the configuration table below:scw ipfs pin create-by-cid volume-id=11111111-1111-1111-1111-111111111111 cid=Qmdi7ERksspfxWXfU8ATRUt7iCjZJbEbDrUoMDtjnbdTwo name=MyNewPinByCID
ID of the volume you want to pin your content to. To find your volume ID, you can consult the Scaleway console
Retrieve the Content Identifier (CID) of the content you added to your own local node using IPFS Desktop. You can find out more through our dedicated documentation
Create a pin with this given name.
Enter the following command to check the status of your pin and see if the content was effectively pinned on a Scaleway-owned node:scw ipfs pin get pin-id=22222222-2222-2222-2222-222222222222 volume-id=11111111-1111-1111-1111-111111111111
You should get a response like the following, providing details about your newly pinned content.PinID 0691fe5c-e8ba-40b3-b5cd-bfa69936aac5Status pinnedCreatedAt 14 minutes agoCid.Cid QmQ6znATkFZdgniHofhFUSm3imBWN5yf5yiU5sLp56VRCuCid.Name MyPinByCIDCid.Meta.ID 2672dr5c-z9cd-80s3-c6de-bfa70039bbc6Delegates.0 /dnsaddr/delivery.ipfs.labs.scw.cloud/p2p/QmQ6znATkFZdgniHofhFUSm3imBWN5yf5yiU5sLp56VRCuInfo.ID 0691fe5c-e8ba-40b3-b5cd-bfa69936aac5Info.URL -Info.Size 40733Info.Progress 100Info.StatusDetails pinned_ok
Once your content is pinned on our service, you can fetch it via any compatible IPFS client connected to the public IPFS network. This can be Kubo, or IPFS desktop.
For the sake of this example, we are going to use Kubo. You can find out more about the Kubo CLI on our dedicated documentation
Run the following command to retrieve your content via Kubo CLI. Make sure to replace the example CID value with your own.ipfs get QmQ6znATkFZdgniHofhFUSm3imBWN5yf5yiU5sLp56VRCu
You should get a response like the following, indicating that the content has properly been saved on your local machine.Saving file(s) to QmQ6znATkFZdgniHofhFUSm3imBWN5yf5yiU5sLp56VRCu39.78 KiB / 39.78 KiB [============================================] 100.00% 0s
Navigate your files to retrieve the content. The content is saved under a name that matches its CID.
If you no longer wish to store a content on your Scaleway-owned node, you can delete it.
Run the following command to delete your content:
scw ipfs pin delete pin-id=0691fe5c-e8ba-40b3-b5cd-bfa69936aac5 volume-id=11111111-1111-1111-1111-111111111111
You should get the following output, confirming your pin has been successfully deleted on Scaleway’s end.
✅ Pin has been successfully deleted.
You can delete an entire volume. This will remove all attached pins.
Run the following command to delete your volume:
scw ipfs volume delete volume-id=11111111-1111-1111-1111-111111111111
You should get the following output, confirming your volume has been deleted.
✅ Volume has been successfully deleted.