# How to create new "crypt" remote from command line

**URL:** <https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586>\
**Category:** Help and Support\
**Created:** [May 22, 2020, 9:08pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586 "2020-05-22T21:08:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 9:08pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/1 "2020-05-22T21:08:14Z")

</div>

hi all,  
I'd like to add a new "crypt" remote based on another one of my remotes.  
I can easily do that through the interactive `rclone config` command.

I'd like to automate this, instead, and do it with a single command line with arguments.  
how should I do that?

I've seen an example for Google Drive here:  
[https://rclone.org/commands/rclone\_config\_create/](https://rclone.org/commands/rclone_config_create/)  
but I'm not sure how the `keys` are named in the case of the "crypt" remote.

any help is appreciated. thank you!

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 10:13pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/3 "2020-05-22T22:13:34Z")

</div>

thanks, @asdffdsa! I'll try it out.  
does that mean that, as a rule of thumb, apart from the `type`, all the other parameters are named exactly as in the config file?

final question: is there a way to let `rclone` pick a password and a salt, printing both out for safekeeping?

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 10:19pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/5 "2020-05-22T22:19:36Z")

</div>

fair enough. thank you for your help!

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 10:47pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/6 "2020-05-22T22:47:59Z")

</div>

for future reference: `filename_encryption` has to be either `standard`, `obfuscate`, or `off`, not `true`.

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 11:10pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/8 "2020-05-22T23:10:03Z")

</div>

> [@asdffdsa](#):
>
> works for me.

upon usage of that newly created remote rclone was complaining about that `true`, so I don't think it should be used.

anyway, I've also seen that the command in the second post stores the passwords in cleartext.  
instead, the `rclone obscure` command should be used.

thus:

```
rclone config create \
   $CRYPT crypt \
   remote $REMOTE \
   password $(rclone obscure $PASS) \
   password2 $(rclone obscure $SALT) \
   directory_name_encryption true \
   filename_encryption standard

```

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [May 22, 2020, 11:27pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/9 "2020-05-22T23:27:44Z")

</div>

perhaps rclone should check the flags better as i have shown rclone will create the crypt with `filename_encryption true`  
and it will encrypt my passwords without the need for `obscure`

@calisro ?

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 11:38pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/10 "2020-05-22T23:38:29Z")

</div>

okay, I've tried again, running the latest beta (like earlier).  
if I execute your example, rclone does obscure the passwords.  
if I execute a real life scenario with a long password, rclone does not obscure it.

I guess somewhere there is some logic that says "if I get a value which is long enough, I'll assume it's already obscured", and that's why my passwords were clearly visible in the config file!  
you can try again yourself with password `my_very_long_and_stupid_password`... it does not get obscured for me!

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 11:40pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/11 "2020-05-22T23:40:28Z")

</div>

> [@asdffdsa](#):
>
> i have shown rclone will create the crypt with `filename_encryption true`

to be precise, as I was saying, it _creates_ the remote without issues, but it was complaining about that _at the first use_:

> Failed to create file system for "thecrypt:": Unknown file name encryption mode "true"

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 11:45pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/13 "2020-05-22T23:45:13Z")

</div>

agreed. 🙂

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 22, 2020, 11:50pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/15 "2020-05-22T23:50:02Z")

</div>

I've always been using the beta, v1.51.0-360-g518d3981-beta on Linux.

my point is that `rclone` **does different things based on the length** of the `password` value (and `password2`).  
have you tried re-running your command but specifying `my_very_long_and_stupid_password` as password? does it still obscure it, in your case?

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 23, 2020, 12:00am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/17 "2020-05-23T00:00:03Z")

</div>

it is...

... I didn't even know I could set a config password! I'll investigate.

but still, different behavior based on value length is really counter-intuitive.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [May 23, 2020, 12:02am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/18 "2020-05-23T00:02:37Z")

</div>

```
rclone config
Enter configuration password:
password:

```

e) Edit existing remote  
n) New remote  
d) Delete remote  
r) Rename remote  
c) Copy remote  
**s) Set configuration password**  
q) Quit config

Your configuration is encrypted.  
c) Change Password  
u) Unencrypt configuration  
q) Quit to main menu

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 23, 2020, 12:21am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/20 "2020-05-23T00:21:58Z")

</div>

@asdffdsa ... still: 😃

> [@SimpleBobster](#):
>
> have you tried re-running your command but specifying `my_very_long_and_stupid_password` as password? does it still obscure it, in your case?

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 23, 2020, 1:20am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/22 "2020-05-23T01:20:52Z")

</div>

right, so you confirm the behavior that I was highlighting, then...

I don't know who to tag but this feels like a bug.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [May 23, 2020, 1:38am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/23 "2020-05-23T01:38:01Z")

</div>

It's already adjusted in the latest beta and should be in the 1.52 release..

> <https://github.com/rclone/rclone/issues/3728>
>
> Hello and thanks for your time.
> What is the problem you are having with rclone?
> rclone can't use my app password for owncloud(webdav),...

---

<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:** [May 23, 2020, 11:14am UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/24 "2020-05-23T11:14:56Z")

</div>

Just as a FYI the options for crypt (or any backend) are documented on their pages

[https://rclone.org/crypt/#standard-options](https://rclone.org/crypt/#standard-options)

Those show exactly what goes in the config file. You can also get that help on the command line with `rclone help backend crypt`.

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 23, 2020, 3:54pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/25 "2020-05-23T15:54:13Z")

</div>

> [@Animosity022](#):
>
> It's already adjusted in the latest beta and should be in the 1.52 release..

does this mean that I already had the `--obscure` and `--no-obscure` flags in my version, `v1.51.0-360-g518d3981-beta`?  
still, isn't it a bug that rclone picks either flag based on the length of the password value?  
or am I mistaken?

> [@ncw](#):
>
> Just as a FYI the options for crypt (or any backend) are documented on their pages

thanks, Nick! I did look at the docs before opening the issue, of course, but it was not entirely clear to me. is this command:

```
rclone config create \
   thecrypt crypt \
   remote remote:crypt \
   password password \
   password2 password2 \
   directory_name_encryption true \
   filename_encryption standard

```

equivalent to this one?

```
rclone config create \
    thecrypt crypt \
   --crypt-remote remote:crypt \
   --crypt-filename-encryption standard \
   --crypt-directory-name-encryption true \
   --crypt-password password \
   --crypt-password2 password2

```

also, I'm **guessing** that I have to start with `rclone config create thecrypt crypt` and then I have to append the arguments, but it's not really clear to me. 😕  
after all, the "crypt" page talks mostly about the crypt remote, and I wouldn't know how to interpret the "standard options" that I see mentioned about the "crypt command" when I'm applying those to the "create" command.  
I hope you at least understand some of my confusion. 😅

thanks!

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [May 23, 2020, 4:02pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/26 "2020-05-23T16:02:06Z")

</div>

> [@SimpleBobster](#):
>
> does this mean that I already had the `--obscure` and `--no-obscure` flags in my version, `v1.51.0-360-g518d3981-beta` ?

I'm not sure exactly what that beta is, but if you check for the flag, that is your best bet.

> [@SimpleBobster](#):
>
> still, isn't it a bug that rclone picks either flag based on the length of the password value?

It automatically tries to understand what you want. If you don't want that, you'd pick either option and go that route to force a direction based on your needs.

---

<div class="post-metadata">

**Author:** ![SimpleBobster](https://forum.rclone.org/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@SimpleBobster](https://forum.rclone.org/u/SimpleBobster)\
**Post date:** [May 23, 2020, 4:19pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/27 "2020-05-23T16:19:07Z")

</div>

> [@Animosity022](#):
>
> I'm not sure exactly what that beta is, but if you check for the flag, that is your best bet.

if I'm not interpreting the beta labels wrong, the github issue got fix and pushed to `v1.51.0-330-g98c34e41-beta`, and since I was using `v1.51.0-360-g518d3981-beta` the answer was _yes_, I had that flag.  
I guess the most up-to-date answer, which works in the current beta and **will work starting with v1.52** , is something like:

```auto
rclone config create \
   $CRYPT crypt \
   remote $REMOTE \
   --obscure \
   password $PASS \
   password2 $SALT \
   directory_name_encryption true \
   filename_encryption standard

```

> [@Animosity022](#):
>
> It automatically tries to understand what you want.

I know, but I believe that THAT's the cause of the confusion.  
explicit is better than implicit -- pick a behavior and people will adapt by using flags to accomplish their goals.  
otherwise, there will be someone (like me! lol) trying a command with password `shortpwd` and seeing that it gets obscured, only to try the real-life case of a long password and getting burnt by this behavior.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [May 23, 2020, 4:23pm UTC](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586/28 "2020-05-23T16:23:41Z")

</div>

> [@SimpleBobster](#):
>
> explicit is better than implicit -- pick a behavior and people will adapt by using flags to accomplish their goals.

It got that way because someone asked for it and it came to be. Try to remember, your use case may not be best for everyone.

It changed and is documented in the new version to make it more apparent so I think we are beating a dead horse as they say.

[Next page](https://forum.rclone.org/t/how-to-create-new-crypt-remote-from-command-line/16586.md?page=2)
