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