Rclone is a program that allows you to sync your server’s files and directories with Hostwinds Object Storage. It can be mounted locally so you can write directly to remote Object Storage. Commands like
rclone sync can sync your local directories with directories in remote Object Storage.
This guide will walk through installing, configuring, syncing, and mounting Rclone remotes with a Linux VPS.
Start by installing Rclone with the script below:
Now you can configure your remote storage after the installation script ends:
You will enter the configuration wizard. To set up a new remote, enter n at the first prompt:
Next, enter the name of your Rclone remote.
After that, enter 4 for S3 compliant storage (Hostwinds Object Storage):
Enter 11 to choose
Any other S3 compatible provider:
Enter 1 to enter the credentials in the next step:
Now you need the Access key, Secret key, and API Endpoint from your Hostwinds account. Navigate here to find these credentials. Select Object API Info in the upper-right corner, and copy:
- Access Key
- Secret Key
- API Endpoint
of the location you want to use. It is recommended to use the same location as your Hostwinds VPS. You will need to use these for the
Enter 1 to opt out of selecting a region:
Endpoint for S3 API: enter the API Endpoint for the Object Storage location you want to use.
Location constraint - must be set to match the Region. Used when creating buckets only: leave blank, click ENTER.
Canned ACL used when creating buckets and/or storing objects in S3: the default choice is 1, but you can choose the access rights you wish to give.
Edit advanced config? (y/n): enter n, and verify the values for your remote storage at the next prompt.
Finally, enter q to quit the config:
First, you need to make a directory for your new remote. Syncing before making a directory will cause synced data to be in unreadable buckets. Enter the name of your remote and new bucket/directory like below:
Now navigate to your Object Storage here. Click Refresh Containers, and you should see your new bucket like below:
To sync a directory with your new bucket, use the command below with the path to your local directory, your remote name, and bucket/remote directory name. This will only modify the destination, your Rclone remote directory:
Create a mount point first:
Similar to syncing, you should work directly with a remote directory in your Rclone remote. To mount a remote directory locally, run the command below with your remote name, directory, and mount point:
Then open a new shell, and write directly to your mount point.
To end the mount, ensure you are not in the mount point, and CTRL + C from the shell where the mount is running. If there is an issue unmounting, manually unmount with the command below:
Now you have successfully configured your Rclone remote and created your first remote directory. You can find all Rclone commands by visiting their documentation for commands like cat, move, copy, serve, and more.