Use rclone with CoreWeave Object Storage
Rclone is a command-line program that syncs files and directories with various Object Storage providers, including CoreWeave.
This guide describes how to configure rclone for CoreWeave Object Storage and use basic commands. It also explains common command-line options, and introduces advanced features like mounting volumes and the Web-based GUI. Finally, it outlines a realistic scenario of migrating data from AWS to CoreWeave.
Install rclone
Rclone is a single Go binary that can be installed on Linux, macOS, and Windows. It can be installed through a variety of methods, including scripted downloads, package managers like Brew and Chocolatey, or downloaded manually.
To install rclone, follow the installation instructions on the rclone website for your preferred method.
To verify if rclone is installed correctly, open your command-line interface and run:
$ rclone version
You should see the version information for rclone, such as:
rclone v1.63.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 6.2.0-26-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: dynamic
- go/tags: none
Configuration
To configure rclone for CoreWeave Object Storage, you need a CoreWeave Object Storage token with the Access Key and Secret Key. You also need to choose a desired Endpoint URL.
Region | Endpoint |
---|---|
New York - LGA1 | https://object.lga1.coreweave.com/ |
Chicago - ORD1 | https://object.ord1.coreweave.com/ |
Las Vegas - LAS1 | https://object.las1.coreweave.com/ |
Using the configuration wizard
To begin, start the configuration wizard at the command line.
$ rclone config
Most of the rclone options below are selected by entering an option number. However, these option numbers vary depending on the rclone version. Find the option number that corresponds to the text shown in your version.
- Enter n ("New remote") to create a new remote connection.
- Enter a descriptive name for your remote (e.g., mycoreweave). This is used to identify the remote in future rclone commands.
Storage
: Choose "Amazon S3 Compliant Storage Providers including..."provider
: Choose "Ceph Object Storage"env_auth
: Choose "Enter AWS credentials in the next step."- Enter the
access_key_id
. - Enter the
secret_access_key
. region
: Choose "Will use v4 signatures and an empty region."- Enter the desired Object Storage Endpoint URL from the table above.
location_constraint
: Press enter to leave empty.acl
: Choose the ACL option that best suits your needs. If unsure, choose the default option, "Owner gets FULL_CONTROL. No one else has access rights."server_side_encryption
andsse_kms_key_id
: For both of these, chose "None" unless you have specific encryption requirements.- Choose no when asked to edit advanced config.
- Select yes to confirm the configuration.
Manual configuration
The rclone configuration file is stored in:
- Linux & macOS:
~/.config/rclone/rclone.conf
- Windows:
C:\Users\<username>\.config\rclone\rclone.conf
To manually configure rclone, edit rclone.conf
in one the location for your platform. Here is a sample CoreWeave configuration.
[mycoreweave]
type = s3
provider = Ceph
access_key_id = REDACTED
secret_access_key = REDACTED
endpoint = https://object.lga1.coreweave.com/
acl = private
CoreWeave Object Storage is fully-compatible with rclone's Ceph configuration. Please refer to the rclone Ceph configuration documentation for advanced options.
Multiple configurations
Rclone can use multiple configurations to manage multiple endpoints. To create a second configuration, initiate the Configuration Wizard again.
$ rclone config
Choose n) New remote
when the configuration wizard starts. Name it differently (e.g., mycoreweave2
), and follow the same steps as before to add your new storage credentials.
The complete rclone configuration file with multiple CoreWeave endpoints looks similar to this:
[mycoreweave]
type = s3
provider = Ceph
access_key_id = REDACTED
secret_access_key = REDACTED
endpoint = https://object.lga1.coreweave.com/
[mycoreweave2]
type = s3
provider = Ceph
access_key_id = REDACTED
secret_access_key = REDACTED
endpoint = https://object.ord1.coreweave.com/
When using rclone, specify the desired endpoint.
# List buckets for mycoreweave
$ rclone lsd mycoreweave:
# List buckets for mycoreweave2
$ rclone lsd mycoreweave2:
Encrypted configuration
When running rclone config
, it's possible to encrypt the configuration file by choosing Set configuration password. This protects sensitive information like the secret key.
If the rclone configuration file is encrypted, the password must be provided to rclone through the RCLONE_CONFIG_PASS
environment variable or on the command line.
To set the environment variable:
$ export RCLONE_CONFIG_PASS=mysecretpassword
$ rclone ls mycoreweave:bucket-name
If the environment variable isn't provided, rclone will prompt for the password at the command line.
$ rclone ls mycoreweave:bucket-name
Enter configuration password:
password:
Avoid exposing the configuration password in scripts or environment variables. Make sure that only authorized users have access to the information. Don't commit scripts containing sensitive passwords to public repositories.
Basic commands
Rclone has a rich command syntax, and these descriptions are not intended to be comprehensive. For complete documentation, refer the rclone website or generate the documentation locally:
$ rclone gendocs [output_directory]
List available buckets
$ rclone lsd mycoreweave:
List files in a bucket
$ rclone ls mycoreweave:bucket-name
Sync files
Copies files from the source to the destination, and removes any extra files from the destination that are not present in the source.
After sync
, the destination will mirror the source exactly.
Sync from a remote bucket to local:
$ rclone sync mycoreweave:bucket-name /local/directory
Sync from local to a remote bucket:
$ rclone sync /local/directory mycoreweave:bucket-name