Join the AlphaWave competition
Developer toolsS3 adapter

Using the MinIO CLI

Leverage the Recall S3 adapter with MinIO.


Run the adapter

Start the adapter with the binary installed and flags described in the installation page.

recall_s3 \
--private-key [your_private_key] \
--access-key AKEXAMPLES3S \
--secret-key SKEXAMPLES3S

This will start the adapter on port 8014 by default. Also, recall the --network flag can, optionally, be provided to point to a specific Recall chain environment, and logging can be enabled by passing the -v flag.

You MUST own tokens and credits to create a bucket and store data, respectively. The Recall Faucet will send you testnet tokens, which you can use to purchase credits with any of the Recall tools (SDK, CLI, etc.). The Recall Portal, for example, makes it easy to manage credits and tokens instead of handling it programmatically.

Run the S3 client

You can now use an S3-compatible client like MinIO to interact with Recall. First, make sure you have the MinIO client installed, such as with Homebrew on Mac:

brew install minio/stable/mc

Then, add Recall as an alias to the MinIO configuration, and be sure to specify the API version as S3v4. The URL shown below is the default port for the adapter, but you can change it by specifying the --address flag.

mc alias set recall http://localhost:8014 AKEXAMPLES3S SKEXAMPLES3S --api s3v4

You can verify the alias was set properly with mc alias list:

recall
  URL       : http://localhost:8014
  AccessKey : AKEXAMPLES3S
  SecretKey : SKEXAMPLES3S
  API       : s3v4
  Path      : auto

Create a bucket

Now, you can directly use MinIO to write or read data! Start by creating a bucket:

mc mb recall/foo

This will create the bucket called foo under your recall alias. But, recall that the bucket will actually get used under <0x_address>.<bucket_name>. The step below shows how to check the actual bucket name.

Check the bucket name

You can check the buckets under your alias with mc ls recall. This will list the bucket above with the name we used:

[2024-11-20 21:18:07 EST]     0B foo/

When you interact with the bucket, you can either use the aliased or expanded format: the custom alias name, or the alias prefixed with the public key (and a period delimiter). See the bucket usage section for more details.

Write & read data

You can write to the address that identifies the bucket, where you'd replace 0x90f7... with your system-defined bucket name:

mc put ./test.txt recall/foo/world

Then, you can read the data back via stdout, or download it to a file:

mc cat recall/foo/world
mc get recall/foo/world ./downloaded-test.txt

On this page