Rclone environment variable

What is the problem you are having with rclone?

So I am trying to config the remote storage with environment variables. As you can see I am using rclone/rclone docker image and the arguments are set using --env VAR1=foo within docker run.

What am I doing wrong? I tried to retrieve the acces and secret key like that:
{ACCESS_KEY}
$ACCESS_KEY
global.access_key

Thanks in advance

that's my rclone.conf

[remote]
type = s3
provider = Other
access_key_id = ACCESS_KEY
secret_access_key = SECRET_KEY
endpoint = fsn1.your-objectstorage.com
acl = private
region = fsn1

Which cloud storage system are you using? (eg Google Drive)

Hetzner Object Storage

The command you were trying to run:

docker run --rm --volume ./rclone.conf:/config/rclone/rclone.conf --env SECRET_KEY=my_key --env ACCESS_KEY=my_access rclone/rclone ls remote:

rclone.conf doesnt do shell-style $VAR expansion in those fields. for docker you usually want RCLONE_CONFIG_REMOTE_ACCESS_KEY_ID / RCLONE_CONFIG_REMOTE_SECRET_ACCESS_KEY (remote name uppercased) or pass --s3-access-key-id / --s3-secret-access-key on the command line.

if the section is literally named [remote], env would look like RCLONE_CONFIG_REMOTE_ACCESS_KEY_ID=.... leave the conf keys empty or omit them when the env supplies them.

thank you so much! it works!