s3fs
Prerequisites
Before you get started, you need to have already made a Create Account, Create an Access Grant and access registeror AWS SDK and Hosted Gateway MT
Install s3fs
See https://github.com/s3fs-fuse/s3fs-fuse for installation instructions for your OS.
Configure s3fs to use Storj DCS S3 Gateway
You can use either Self-hosted S3 Compatible Gateway or Storj-hosted S3 Compatible Gateway. You only need S3 compatible credentials and endpoint.
Create the credentials file
Please substitute your own Access Key ID instead of ACCESS_KEY_ID and your own Secret Access Key instead of SECRET_ACCESS_KEY in the example below:
Create a bucket
You can Create a Bucket with uplink, with AWS CLI and Hosted Gateway MT , or withObject Browser.
Mount a bucket to the folder
Create a folder:
Mount a bucket to the folder. We will assume that you created a bucket my-bucket earlier. We will use the endpoint https://gateway.storjshare.io here, as this will Storj-hosted S3 Compatible Gatewayautomatically.
If you use the Self-hosted S3 Compatible Gateway, then the endpoint could be http://localhost:7777 (depends on your configuration and infrastructure).
Mount a bucket to the folder on boot
You should make sure that the credentials file is available for the root on boot time. You can create it in the /etc/ folder:
Then add the following to /etc/fstab:
Check that it is working - The command:
should not return any error. Next, check that your Storj DCS bucket is mounted:
Now you can use the mounted bucket almost as any folder.
See also
We recommend having a look at Rclone and its rclone mount command as well.
Please note - you can configure a native connector in rclone, (see: Rclone Native Integration) and use Design Decision: End-to-end Encryption, unlike Storj-hosted S3 Compatible Gateway which usesDesign Decision: Server-side Encryption to provide a S3-compatible protocol (the S3 protocol does not use client side encryption by design).