Buckets & Objects

Now that you've created an account, project and API key, you're ready to upload data to the network.

Create Buckets & Upload Objects via our CLI

To create buckets and upload objects, you will need our Uplink CLI. To upload and download data securely, we require encryption keys, which we do not expose in the browser for utmost privacy and security.

1. Download, unzip and install the binary for your OS:

2. Start the setup wizard by running the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 setup
./uplink_windows_amd64.exe setup

AMD64

./uplink_linux_amd64 setup

ARM

./uplink_linux_arm setup

3. Enter the numeric choice corresponding to the satellite you've created your account on:

Do not include the brackets in your input.

4. Enter the API key you generated in the satellite web interface:

Didn't save your API key? Simply create another one in the satellite web interface.

5. Create and confirm an encryption passphrase, which is used encrypt your files before they uploaded to the network:

This passphrase will grant you access to all of your files, so it is important that you keep it backed up in a safe place. Please note that Storj Labs does not know or store your encryption passphrase, so if you lose it, you will not be able to recover your files. Keep multiple backups of your passphrase in different places to assure you can retrieve your important data even in case of a hard drive crash or other unfortunate disaster.

6. You will see a welcome message and are ready to upload data!

Create a Bucket

To create a bucket, use the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 mb sj://bucket-name
./uplink_windows_amd64.exe mb sj://bucket-name

AMD64

./uplink_linux_amd64 mb sj://bucket-name

ARM

./uplink_linux_arm mb sj://bucket-name

Upload an Object

To upload an object, use the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 cp ~/Desktop/your-large-file.mp4 sj://bucket-name
./uplink_windows_amd64.exe cp ~/Desktop/your-large-file.mp4 sj://bucket-name

AMD64

./uplink_linux_amd64 mb cp ~/Desktop/your-large-file.mp4 sj://bucket-name

ARM

./uplink_linux_arm mb cp ~/Desktop/your-large-file.mp4 sj://bucket-name

List Objects in a Bucket

To view objects in a bucket, use the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 ls sj://bucket-name/
./uplink_windows_amd64.exe ls sj://bucket-name/

AMD64

./uplink_linux_amd64 ls sj://bucket-name/

ARM

./uplink_linux_arm mb ls sj://bucket-name/

Download an Object

To download an object from the network, use the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 cp sj://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4
./uplink_windows_amd64.exe cp sj://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4

AMD64

./uplink_linux_amd64 cp sj://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4

ARM

./uplink_linux_arm cp sj://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4

Delete an Object

To delete an object from the network, use the following command:

macOS
Windows
Linux
./uplink_darwin_amd64 rm sj://bucket-name/your-large-file.mp4
./uplink_windows_amd64.exe rm sj://bucket-name/your-large-file.mp4

AMD64

./uplink_linux_amd64 rm sj://bucket-name/your-large-file.mp4

ARM

./uplink_linux_arm rm sj://bucket-name/your-large-file.mp4

All Commands

The uplink offers all of the following command options:

cat - output a file to standard-out

cp - copy a file from outside of Storj bucket to inside or vice versa

ls - list buckets or files in Storj bucket

mb - make a new bucket

mount - mount a bucket to a location in your Linux filesystem for read-only access.

put - writes data from standard-in to a file in a Storj bucket

rb - remove a bucket

rm - remove a file from a Storj bucket.

More information for each command is provided in the commands --help

After using the Uplink CLI, learn about our libraries which provide you with a programmatical interface with network data.