Objects

Upload file

Copy a file to your bucket.

$
rclone copy ~/Downloads/storj-tree.png storj:my-bucket/
$
rclone copy ~/Downloads/storj-tree.png storj:my-bucket/

Download file

Copy a file from your bucket.

$
rclone copy storj:my-bucket/ ~/Downloads/storj-tree-2.png
$
rclone copy storj:my-bucket/ ~/Downloads/storj-tree-2.png

Locking an Object

Locking a New Object Upon Upload

aws s3api put-object \
--bucket my-object-lock-bucket \
--key my-file.txt \
--body my-file.txt \
--object-lock-mode COMPLIANCE \
--object-lock-retain-until-date 2025-01-01T00:00:00Z \
--endpoint-url https://gateway.storjshare.io
aws s3api put-object \
--bucket my-object-lock-bucket \
--key my-file.txt \
--body my-file.txt \
--object-lock-mode COMPLIANCE \
--object-lock-retain-until-date 2025-01-01T00:00:00Z \
--endpoint-url https://gateway.storjshare.io

Locking an Existing Object

aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "Mode=COMPLIANCE,RetainUntilDate=2025-06-01T00:00:00Z" \
--endpoint-url https://gateway.storjshare.io
aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "Mode=COMPLIANCE,RetainUntilDate=2025-06-01T00:00:00Z" \
--endpoint-url https://gateway.storjshare.io

Extending Retention Period

Retention periods can only be extended, not reduced. The Storj Console currently doesn't allow removal of retention periods in Governance Mode - see below for S3 usage to perform this action.

aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "Mode=COMPLIANCE,RetainUntilDate=2025-07-01T00:00:00Z" \
--endpoint-url https://gateway.storjshare.io
aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "Mode=COMPLIANCE,RetainUntilDate=2025-07-01T00:00:00Z" \
--endpoint-url https://gateway.storjshare.io

Bypassing Governance Mode

A user with the BypassGovernanceRetention permission may remove the retention period for an object locked with Governance Mode using the AWS CLI or other AWS SDK.

The Storj Console currently doesn't support this feature.

Governance Mode Override Permissions

By default, the account owner and any user with default project access have Governance Mode override permissions due to Storj's macaroon-based access system, which restricts capabilities rather than explicitly granting permissions.

To avoid unintentionally granting Governance Mode override permissions, use S3 credentials that explicitly restrict this capability for any operations involving Object Lock.

Note: Storj does not currently support role-based access controls (RBAC) for default restrictions by roles. This functionality may be added in the future.

aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "{}" \
--bypass-governance-retention \
--endpoint-url https://gateway.storjshare.io
aws s3api put-object-retention \
--bucket my-object-lock-bucket \
--key my-file.txt \
--version-id <version-id> \
--retention "{}" \
--bypass-governance-retention \
--endpoint-url https://gateway.storjshare.io
Previous
Preferred storage region