AR.IO LogoAR.IO Documentation
ArDrive CLIWorking With Drives

Managing Drive Passwords

The ArDrive CLI's private drive and folder functions all require either a drive password OR a drive key. Private file functions require either the drive password or the file key. Keys and passwords are sensitive data, so manage the entry, display, storage, and transmission of them very carefully.

Drive passwords are the most portable, and fundamental, encryption facet, so a few options are available during private drive operations for supplying them:

  • Environment Variable
  • STDIN
  • Secure Prompt

Supplying Your Password: Environment Variable

read -rs TMP_ARDRIVE_PW
export ARDRIVE_DRIVE_PW=$(TMP_ARDRIVE_PW)
ardrive \<some private command\> -w /path/to/wallet.json -P

Supplying Your Password: STDIN

cat /path/to/my/drive/password.txt | ardrive \<some private command\> -w /path/to/wallet.json -P

ardrive \<some private command\> -w /path/to/wallet.json -P < /path/to/my/drive/password.txt

Supplying Your Password: Prompt

ardrive \<some private command\> -w /path/to/wallet.json -P
? Enter drive password: › ********

How is this guide?