# Can rclone be run solely with command line options ? (no config, no env vars)

**URL:** <https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314>\
**Category:** Help and Support\
**Created:** [July 31, 2018, 5:16pm UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314 "2018-07-31T17:16:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsync](https://forum.rclone.org/user_avatar/forum.rclone.org/rsync/32/9673_2.png) [@rsync](https://forum.rclone.org/u/rsync)\
**Post date:** [July 31, 2018, 5:16pm UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/1 "2018-07-31T17:16:47Z")

</div>

We ([rsync.net](http://rsync.net)) would like to add rclone to our environment.

You can already use rclone with rsync dot net, of course, since we provide plain old SFTP access.

What I mean is, we are going to install rclone on the server side and allow people to run rclone inside their accounts to transfer data from (for instance) S3 to rsync, or rsync to backblaze (or whatever).

The problem is …

An rsync dot net account is a very restricted environment - you can only access a whitelist of commands, you cannot set environment variables … you _could_ create and upload a config file, but doing interactive response with the program (the Q&A to create the config) can be tricky in our environment as well …

My question:

Is it possible to run rclone as a big, long, terrible, ugly command ? No config file, no interactive Q&A, no environment variables - just a big, long command that --explicitly --specifies --exactly --what --I --want and if I want to run it again, I have to --type --it --all --out --again.

Thanks.

---

<div class="post-metadata">

**Author:** ![Kunio](https://forum.rclone.org/letter_avatar_proxy/v4/letter/k/e9bcb4/32.png) [@Kunio](https://forum.rclone.org/u/Kunio)\
**Post date:** [August 1, 2018, 2:56pm UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/2 "2018-08-01T14:56:57Z")

</div>

I believe you must have rclone.conf to define/save the remotes. It’s usually created for you with the interactive “rclone config” command, but you could write it yourself if you wanted to. The syntax is not hard at all, but I don’t believe it’s documented on the site docs.

If it helps, you can put rclone.conf wherever you like and point to it with --config=/my/file.conf.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [August 5, 2018, 10:24am UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/3 "2018-08-05T10:24:40Z")

</div>

Apologies for the delay in replying - I've been away at the go conference this week!

> [@rsync](#):
>
> We ([rsync.net](http://rsync.net)) would like to add rclone to our environment.

😃

> [@rsync](#):
>
> Is it possible to run rclone as a big, long, terrible, ugly command ? No config file, no interactive Q&A, no environment variables - just a big, long command that --explicitly --specifies --exactly --what --I --want and if I want to run it again, I have to --type --it --all --out --again.

If you use [the latest beta](https://beta.rclone.org) then you can configure everything that goes in the config file as command line arguments so that is a definite step in the right direction 🙂

If you could get the oauth tokens from the user then you can supply them on the command line.

I guess the one thing you can't do is actually make a remote though, though that would be easy to add, say `--make-remote name=type` so `--make-remote dst=b2`. You can already so this with env variables so adding a command line flag for this would be easy I think.

Would you get the config from the user directly, eg as a web form or something like that? Or would the user type in the command line parameters for rclone directly?

If the user had an existing remote you could get them to paste in the result of `rclone config show remoteName` into a web form and then translate that into command line options.

Would rclone be able to save its config file? The oauth based remotes update their tokens regularly and ideally rclone would save them in its config file. You can supply a path to a config file with the `--config` directive.

Only a subset of the remotes need oauth though, you can use `s3`, `google cloud storage`, `b2`, `mega`, `box`, `azure blob`, `opendrive`, `qingstor`, `swift`, `sftp` (and maybe others!) without.

---

<div class="post-metadata">

**Author:** ![rsync](https://forum.rclone.org/user_avatar/forum.rclone.org/rsync/32/9673_2.png) [@rsync](https://forum.rclone.org/u/rsync)\
**Post date:** [August 7, 2018, 12:00am UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/4 "2018-08-07T00:00:18Z")

</div>

Thank you very much for your reply - I will do some tests with this and let you know how it pans out.

We’re really excited to put this into place.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [August 7, 2018, 6:57pm UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/5 "2018-08-07T18:57:02Z")

</div>

> [@ncw](#):
>
> say `--make-remote name=type` so `--make-remote dst=b2` . You can already so this with env variables so adding a command line flag for this would be easy I think.

I made an issue [Allow creation of backends from command line parameters · Issue #2449 · rclone/rclone · GitHub](https://github.com/ncw/rclone/issues/2449) about the one bit missing for your plan to succeed. It should be relatively easy to implement though.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [August 8, 2018, 8:26am UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/6 "2018-08-08T08:26:07Z")

</div>

I’ve made a test here

[https://beta.rclone.org/branch/v1.42-093-gd7c9abcf-fix-2449-create-backend/](https://beta.rclone.org/branch/v1.42-093-gd7c9abcf-fix-2449-create-backend/) (uploaded in 15-30 mins)

This change allows remotes to be created on the fly without a config  
file by using the remote type prefixed with a : as the remote name, Eg  
:s3: to make an s3 remote.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [March 4, 2020, 12:46am UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/7 "2020-03-04T00:46:31Z")

</div>

Closed on March 4, 2020, 12:46am UTC



---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [January 15, 2021, 12:05pm UTC](https://forum.rclone.org/t/can-rclone-be-run-solely-with-command-line-options-no-config-no-env-vars/6314/8 "2021-01-15T12:05:19Z")

</div>

Note the docs for this [https://rclone.org/commands/rclone\_config\_create/](https://rclone.org/commands/rclone_config_create/) for creating backends programatically or use the :backend: syntax as described here: [https://rclone.org/docs/#syntax-of-remote-paths](https://rclone.org/docs/#syntax-of-remote-paths)
