Documentation menu: Object Storage
S3 · Beta Updated

Set up aws-cli and rclone

aws-cli and rclone settings for Object Storage, syncing folders and uploading large files

aws-cli and rclone read the endpoint from their config files, so you set it once instead of typing --endpoint-url every time.

The Access Key ID and Secret Access Key come from an API token with Object Storage permission, made under Account > API token in the console (steps).

aws-cli#

aws-cli version 2 reads endpoint_url from a profile. Add it to ~/.aws/config and ~/.aws/credentials:

~/.aws/config
[profile xver]
region = bkk1
endpoint_url = https://bkk1.xverstorage.com
~/.aws/credentials
[xver]
aws_access_key_id = <ACCESS_KEY_ID>
aws_secret_access_key = <SECRET_ACCESS_KEY>
Terminal
aws s3 ls --profile xver
aws s3 sync ./public s3://my-site-assets/ --profile xver
aws s3 rm s3://my-photos/old.jpg --profile xver

aws-cli uploads large files in parts (multipart) on its own.

rclone#

Add a remote called xver to rclone.conf (rclone config file prints where it is):

rclone.conf
[xver]
type = s3
provider = Other
access_key_id = <ACCESS_KEY_ID>
secret_access_key = <SECRET_ACCESS_KEY>
endpoint = https://bkk1.xverstorage.com
region = bkk1
force_path_style = true
no_check_bucket = true

no_check_bucket = true stops rclone from trying to create the bucket before it uploads (S3 keys cannot create buckets; create them in the console or through the API).

Terminal
rclone lsd xver:
rclone copy ./photos xver:my-photos/2026 --progress
rclone sync /var/backups xver:server-backups/web-01 --progress

Let xverctl write the config#

Signed in to xverctl with a token that has Object Storage permission, this prints a config with the endpoint, the region and that token's keys:

Terminal
(umask 077; xverctl storage key config --format rclone > xver-rclone.conf)
(umask 077; xverctl storage key config --format aws > xver-aws.conf)
xverctl storage key config --format env

For a key that does one job, make a new token limited to that bucket (no wider than the signed-in token). The command prints the Access Key ID and Secret Access Key once:

Terminal
xverctl token create --name backup --storage write --bucket my-bucket

Back up a server every night#

Example configuration: use the keys of a token that reads and writes only the backup bucket, and add a cron job on the server. If that server is ever compromised, revoke the one token; other buckets are untouched.

crontab -e
0 2 * * * rclone sync /var/backups xver:server-backups/web-01 --log-file /var/log/rclone-backup.log

Speed and limits#

Each account transfers at about 200 Mbit/s in total at identity level 1, and 500 Mbit/s at level 2. There are no egress or request fees.