github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/storj.md (about)

     1  ---
     2  title: "Storj"
     3  description: "Rclone docs for Storj"
     4  versionIntroduced: "v1.52"
     5  ---
     6  
     7  # {{< icon "fas fa-dove" >}} Storj
     8  
     9  [Storj](https://storj.io) is redefining the cloud to support the
    10  future of data—sustainably and economically. Storj leverages the vast
    11  global supply of underutilized resources to deliver better security,
    12  durability, and performance services. Experience up to 90% lower costs
    13  and carbon reduction with Storj.
    14  
    15  Storj is an encrypted, secure, and cost-effective object storage service
    16  that enables you to store, back up, and archive large amounts of data
    17  in a decentralized manner.
    18  
    19  ## Backend options
    20  
    21  Storj can be used both with this native backend and with the [s3
    22  backend using the Storj S3 compatible gateway](/s3/#storj) (shared or private).
    23  
    24  Use this backend to take advantage of client-side encryption as well
    25  as to achieve the best possible download performance. Uploads will be
    26  erasure-coded locally, thus a 1gb upload will result in 2.68gb of data
    27  being uploaded to storage nodes across the network.
    28  
    29  Use the s3 backend and one of the S3 compatible Hosted Gateways to
    30  increase upload performance and reduce the load on your systems and
    31  network. Uploads will be encrypted and erasure-coded server-side, thus
    32  a 1GB upload will result in only in 1GB of data being uploaded to
    33  storage nodes across the network.
    34  
    35  Side by side comparison with more details:
    36  
    37  * Characteristics:
    38    * *Storj backend*: Uses native RPC protocol, connects directly
    39      to the storage nodes which hosts the data. Requires more CPU
    40      resource of encoding/decoding and has network amplification
    41      (especially during the upload), uses lots of TCP connections
    42    * *S3 backend*: Uses S3 compatible HTTP Rest API via the shared
    43      gateways. There is no network amplification, but performance
    44      depends on the shared gateways and the secret encryption key is
    45      shared with the gateway.
    46  * Typical usage:
    47    * *Storj backend*: Server environments and desktops with enough
    48      resources, internet speed and connectivity - and applications
    49      where storjs client-side encryption is required.
    50    * *S3 backend*: Desktops and similar with limited resources,
    51      internet speed or connectivity.
    52  * Security:
    53    * *Storj backend*: __strong__. Private encryption key doesn't
    54      need to leave the local computer.
    55    * *S3 backend*: __weaker__. Private encryption key is [shared
    56      with](https://docs.storj.io/dcs/api-reference/s3-compatible-gateway#security-and-encryption)
    57      the authentication service of the hosted gateway, where it's
    58      stored encrypted. It can be stronger when combining with the
    59      rclone [crypt](/crypt) backend.
    60  * Bandwidth usage (upload):
    61    * *Storj backend*: __higher__. As data is erasure coded on the
    62      client side both the original data and the parities should be
    63      uploaded. About ~2.7 times more data is required to be uploaded.
    64      Client may start to upload with even higher number of nodes (~3.7
    65      times more) and abandon/stop the slow uploads.
    66    * *S3 backend*: __normal__. Only the raw data is uploaded, erasure
    67      coding happens on the gateway.
    68  * Bandwidth usage (download)
    69    * *Storj backend*: __almost normal__. Only the minimal number
    70      of data is required, but to avoid very slow data providers a few
    71      more sources are used and the slowest are ignored (max 1.2x
    72      overhead).
    73    * *S3 backend*: __normal__. Only the raw data is downloaded, erasure coding happens on the shared gateway.
    74  * CPU usage:
    75    * *Storj backend*: __higher__, but more predictable. Erasure
    76      code and encryption/decryption happens locally which requires
    77      significant CPU usage.
    78    * *S3 backend*: __less__. Erasure code and encryption/decryption
    79      happens on shared s3 gateways (and as is, it depends on the
    80      current load on the gateways)
    81  * TCP connection usage:
    82    * *Storj backend*: __high__. A direct connection is required to
    83      each of the Storj nodes resulting in 110 connections on upload and
    84      35 on download per 64 MB segment. Not all the connections are
    85      actively used (slow ones are pruned), but they are all opened.
    86      [Adjusting the max open file limit](/storj/#known-issues) may
    87      be required.
    88    * *S3 backend*: __normal__. Only one connection per download/upload
    89      thread is required to the shared gateway.
    90  * Overall performance:
    91    * *Storj backend*: with enough resources (CPU and bandwidth)
    92      *storj* backend can provide even 2x better performance. Data
    93      is directly downloaded to / uploaded from to the client instead of
    94      the gateway.
    95    * *S3 backend*: Can be faster on edge devices where CPU and network
    96      bandwidth is limited as the shared S3 compatible gateways take
    97      care about the encrypting/decryption and erasure coding and no
    98      download/upload amplification.
    99  * Decentralization:
   100    * *Storj backend*: __high__. Data is downloaded directly from
   101      the distributed cloud of storage providers.
   102    * *S3 backend*: __low__. Requires a running S3 gateway (either
   103      self-hosted or Storj-hosted).
   104  * Limitations:
   105    * *Storj backend*: `rclone checksum` is not possible without
   106      download, as checksum metadata is not calculated during upload
   107    * *S3 backend*: secret encryption key is shared with the gateway
   108  
   109  ## Configuration
   110  
   111  To make a new Storj configuration you need one of the following:
   112  * Access Grant that someone else shared with you.
   113  * [API Key](https://documentation.storj.io/getting-started/uploading-your-first-object/create-an-api-key)
   114  of a Storj project you are a member of.
   115  
   116  Here is an example of how to make a remote called `remote`.  First run:
   117  
   118       rclone config
   119  
   120  This will guide you through an interactive setup process:
   121  
   122  ### Setup with access grant
   123  
   124  ```
   125  No remotes found, make a new one?
   126  n) New remote
   127  s) Set configuration password
   128  q) Quit config
   129  n/s/q> n
   130  name> remote
   131  Type of storage to configure.
   132  Enter a string value. Press Enter for the default ("").
   133  Choose a number from below, or type in your own value
   134  [snip]
   135  XX / Storj Decentralized Cloud Storage
   136     \ "storj"
   137  [snip]
   138  Storage> storj
   139  ** See help for storj backend at: https://rclone.org/storj/ **
   140  
   141  Choose an authentication method.
   142  Enter a string value. Press Enter for the default ("existing").
   143  Choose a number from below, or type in your own value
   144   1 / Use an existing access grant.
   145     \ "existing"
   146   2 / Create a new access grant from satellite address, API key, and passphrase.
   147     \ "new"
   148  provider> existing
   149  Access Grant.
   150  Enter a string value. Press Enter for the default ("").
   151  access_grant> your-access-grant-received-by-someone-else
   152  Remote config
   153  --------------------
   154  [remote]
   155  type = storj
   156  access_grant = your-access-grant-received-by-someone-else
   157  --------------------
   158  y) Yes this is OK (default)
   159  e) Edit this remote
   160  d) Delete this remote
   161  y/e/d> y
   162  ```
   163  
   164  ### Setup with API key and passphrase
   165  
   166  ```
   167  No remotes found, make a new one?
   168  n) New remote
   169  s) Set configuration password
   170  q) Quit config
   171  n/s/q> n
   172  name> remote
   173  Type of storage to configure.
   174  Enter a string value. Press Enter for the default ("").
   175  Choose a number from below, or type in your own value
   176  [snip]
   177  XX / Storj Decentralized Cloud Storage
   178     \ "storj"
   179  [snip]
   180  Storage> storj
   181  ** See help for storj backend at: https://rclone.org/storj/ **
   182  
   183  Choose an authentication method.
   184  Enter a string value. Press Enter for the default ("existing").
   185  Choose a number from below, or type in your own value
   186   1 / Use an existing access grant.
   187     \ "existing"
   188   2 / Create a new access grant from satellite address, API key, and passphrase.
   189     \ "new"
   190  provider> new
   191  Satellite Address. Custom satellite address should match the format: `<nodeid>@<address>:<port>`.
   192  Enter a string value. Press Enter for the default ("us1.storj.io").
   193  Choose a number from below, or type in your own value
   194   1 / US1
   195     \ "us1.storj.io"
   196   2 / EU1
   197     \ "eu1.storj.io"
   198   3 / AP1
   199     \ "ap1.storj.io"
   200  satellite_address> 1
   201  API Key.
   202  Enter a string value. Press Enter for the default ("").
   203  api_key> your-api-key-for-your-storj-project
   204  Encryption Passphrase. To access existing objects enter passphrase used for uploading.
   205  Enter a string value. Press Enter for the default ("").
   206  passphrase> your-human-readable-encryption-passphrase
   207  Remote config
   208  --------------------
   209  [remote]
   210  type = storj
   211  satellite_address = 12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S@us1.storj.io:7777
   212  api_key = your-api-key-for-your-storj-project
   213  passphrase = your-human-readable-encryption-passphrase
   214  access_grant = the-access-grant-generated-from-the-api-key-and-passphrase
   215  --------------------
   216  y) Yes this is OK (default)
   217  e) Edit this remote
   218  d) Delete this remote
   219  y/e/d> y
   220  ```
   221  
   222  {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/storj/storj.go then run make backenddocs" >}}
   223  ### Standard options
   224  
   225  Here are the Standard options specific to storj (Storj Decentralized Cloud Storage).
   226  
   227  #### --storj-provider
   228  
   229  Choose an authentication method.
   230  
   231  Properties:
   232  
   233  - Config:      provider
   234  - Env Var:     RCLONE_STORJ_PROVIDER
   235  - Type:        string
   236  - Default:     "existing"
   237  - Examples:
   238      - "existing"
   239          - Use an existing access grant.
   240      - "new"
   241          - Create a new access grant from satellite address, API key, and passphrase.
   242  
   243  #### --storj-access-grant
   244  
   245  Access grant.
   246  
   247  Properties:
   248  
   249  - Config:      access_grant
   250  - Env Var:     RCLONE_STORJ_ACCESS_GRANT
   251  - Provider:    existing
   252  - Type:        string
   253  - Required:    false
   254  
   255  #### --storj-satellite-address
   256  
   257  Satellite address.
   258  
   259  Custom satellite address should match the format: `<nodeid>@<address>:<port>`.
   260  
   261  Properties:
   262  
   263  - Config:      satellite_address
   264  - Env Var:     RCLONE_STORJ_SATELLITE_ADDRESS
   265  - Provider:    new
   266  - Type:        string
   267  - Default:     "us1.storj.io"
   268  - Examples:
   269      - "us1.storj.io"
   270          - US1
   271      - "eu1.storj.io"
   272          - EU1
   273      - "ap1.storj.io"
   274          - AP1
   275  
   276  #### --storj-api-key
   277  
   278  API key.
   279  
   280  Properties:
   281  
   282  - Config:      api_key
   283  - Env Var:     RCLONE_STORJ_API_KEY
   284  - Provider:    new
   285  - Type:        string
   286  - Required:    false
   287  
   288  #### --storj-passphrase
   289  
   290  Encryption passphrase.
   291  
   292  To access existing objects enter passphrase used for uploading.
   293  
   294  Properties:
   295  
   296  - Config:      passphrase
   297  - Env Var:     RCLONE_STORJ_PASSPHRASE
   298  - Provider:    new
   299  - Type:        string
   300  - Required:    false
   301  
   302  ### Advanced options
   303  
   304  Here are the Advanced options specific to storj (Storj Decentralized Cloud Storage).
   305  
   306  #### --storj-description
   307  
   308  Description of the remote
   309  
   310  Properties:
   311  
   312  - Config:      description
   313  - Env Var:     RCLONE_STORJ_DESCRIPTION
   314  - Type:        string
   315  - Required:    false
   316  
   317  {{< rem autogenerated options stop >}}
   318  
   319  ## Usage
   320  
   321  Paths are specified as `remote:bucket` (or `remote:` for the `lsf`
   322  command.)  You may put subdirectories in too, e.g. `remote:bucket/path/to/dir`.
   323  
   324  Once configured you can then use `rclone` like this.
   325  
   326  ### Create a new bucket
   327  
   328  Use the `mkdir` command to create new bucket, e.g. `bucket`.
   329  
   330      rclone mkdir remote:bucket
   331  
   332  ### List all buckets
   333  
   334  Use the `lsf` command to list all buckets.
   335  
   336      rclone lsf remote:
   337  
   338  Note the colon (`:`) character at the end of the command line.
   339  
   340  ### Delete a bucket
   341  
   342  Use the `rmdir` command to delete an empty bucket.
   343  
   344      rclone rmdir remote:bucket
   345  
   346  Use the `purge` command to delete a non-empty bucket with all its content.
   347  
   348      rclone purge remote:bucket
   349  
   350  ### Upload objects
   351  
   352  Use the `copy` command to upload an object.
   353  
   354      rclone copy --progress /home/local/directory/file.ext remote:bucket/path/to/dir/
   355  
   356  The `--progress` flag is for displaying progress information.
   357  Remove it if you don't need this information.
   358  
   359  Use a folder in the local path to upload all its objects.
   360  
   361      rclone copy --progress /home/local/directory/ remote:bucket/path/to/dir/
   362  
   363  Only modified files will be copied.
   364  
   365  ### List objects
   366  
   367  Use the `ls` command to list recursively all objects in a bucket.
   368  
   369      rclone ls remote:bucket
   370  
   371  Add the folder to the remote path to list recursively all objects in this folder.
   372  
   373      rclone ls remote:bucket/path/to/dir/
   374  
   375  Use the `lsf` command to list non-recursively all objects in a bucket or a folder.
   376  
   377      rclone lsf remote:bucket/path/to/dir/
   378  
   379  ### Download objects
   380  
   381  Use the `copy` command to download an object.
   382  
   383      rclone copy --progress remote:bucket/path/to/dir/file.ext /home/local/directory/
   384  
   385  The `--progress` flag is for displaying progress information.
   386  Remove it if you don't need this information.
   387  
   388  Use a folder in the remote path to download all its objects.
   389  
   390      rclone copy --progress remote:bucket/path/to/dir/ /home/local/directory/
   391  
   392  ### Delete objects
   393  
   394  Use the `deletefile` command to delete a single object.
   395  
   396      rclone deletefile remote:bucket/path/to/dir/file.ext
   397  
   398  Use the `delete` command to delete all object in a folder.
   399  
   400      rclone delete remote:bucket/path/to/dir/
   401  
   402  ### Print the total size of objects
   403  
   404  Use the `size` command to print the total size of objects in a bucket or a folder.
   405  
   406      rclone size remote:bucket/path/to/dir/
   407  
   408  ### Sync two Locations
   409  
   410  Use the `sync` command to sync the source to the destination,
   411  changing the destination only, deleting any excess files.
   412  
   413      rclone sync --interactive --progress /home/local/directory/ remote:bucket/path/to/dir/
   414  
   415  The `--progress` flag is for displaying progress information.
   416  Remove it if you don't need this information.
   417  
   418  Since this can cause data loss, test first with the `--dry-run` flag
   419  to see exactly what would be copied and deleted.
   420  
   421  The sync can be done also from Storj to the local file system.
   422  
   423      rclone sync --interactive --progress remote:bucket/path/to/dir/ /home/local/directory/
   424  
   425  Or between two Storj buckets.
   426  
   427      rclone sync --interactive --progress remote-us:bucket/path/to/dir/ remote-europe:bucket/path/to/dir/
   428  
   429  Or even between another cloud storage and Storj.
   430  
   431      rclone sync --interactive --progress s3:bucket/path/to/dir/ storj:bucket/path/to/dir/
   432  
   433  ## Limitations
   434  
   435  `rclone about` is not supported by the rclone Storj backend. Backends without
   436  this capability cannot determine free space for an rclone mount or
   437  use policy `mfs` (most free space) as a member of an rclone union
   438  remote.
   439  
   440  See [List of backends that do not support rclone about](https://rclone.org/overview/#optional-features) and [rclone about](https://rclone.org/commands/rclone_about/)
   441  
   442  ## Known issues
   443  
   444  If you get errors like `too many open files` this usually happens when the default `ulimit` for system max open files is exceeded. Native Storj protocol opens a large number of TCP connections (each of which is counted as an open file). For a single upload stream you can expect 110 TCP connections to be opened. For a single download stream you can expect 35. This batch of connections will be opened for every 64 MiB segment and you should also expect TCP connections to be reused. If you do many transfers you eventually open a connection to most storage nodes (thousands of nodes).
   445  
   446  To fix these, please raise your system limits. You can do this issuing a `ulimit -n 65536` just before you run rclone. To change the limits more permanently you can add this to your shell startup script, e.g. `$HOME/.bashrc`, or change the system-wide configuration, usually `/etc/sysctl.conf` and/or `/etc/security/limits.conf`, but please refer to your operating system manual.