Skip to content
Branch: master
Find file Copy path
Find file Copy path
5 contributors

Users who have contributed to this file

@jtolds @iglesiasbrandon @VinozzZ @ykoitzsch @stefanbenten
108 lines (72 sloc) 3.96 KB

S3 gateway tutorial

The Storj S3 gateway is our service that mimics the Amazon S3 API using the Storj network. This tutorial assumes you have an account on a running Satellite and use a test network Satellite by default.

One gateway is already included in the test network, so you need to go through this tutorial only if you want to add another gateway.

Installation and configuration

First, if you haven't already followed the preparation steps in, please do so.

Next, Download the correct binary for your operating system:

Setup your gateway by running the following command and following the wizzard:

./gateway_darwin_amd64 setup

You will be prompted for:

  • Satellite: The satellite you want to connect your uplink to. You can choose one from the list of type one eg. or if you are using the test network.
  • API key: The API key that you generate for a project on the Satellite console. If you are using the test network, you can use the API key provided when you run it.
  • Encryption passphrase: The passphrase you choose in order to encrypt your files. Keep this secret and safe. This passphrase will grant you access to all of your files, and if you lose it, you will not be able to recover your files.


The gateway functions as a daemon. You'll want to start it and leave it running. If you're using the test network, and a gateway is already running, and you'll want to select a different port for this new one.

./gateway_darwin_amd64 run

The gateway should output your S3-compatible endpoint, access key, and secret key.

Using the AWS S3 commandline interface

To show that this gateway is working, first make sure you have the AWS S3 CLI installed.

Once you do, in a new terminal session, configure it with your Gateway's credentials:

$ aws configure
AWS Access Key ID [None]: eUXZt66VWTTpcwgBazQnPsuSYri
AWS Secret Access Key [None]: xDkJKUqJVhAj69CGH1VPqDPi47Q
Default region name [None]: us-east-1
Default output format [None]:

Then, test out some AWS S3 CLI commands!

Create a bucket

aws s3 --endpoint=http://localhost:7777/ mb s3://bucket-name

Upload an object

aws s3 --endpoint=http://localhost:7777/ cp ~/Desktop/your-large-file.mp4 s3://bucket-name

List objects in a bucket

aws s3 --endpoint=http://localhost:7777/ ls s3://bucket-name/

Download an object

aws s3 --endpoint=http://localhost:7777/ cp s3://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4

Generate a URL for an object

aws s3 --endpoint=http://localhost:7777/ presign s3://bucket-name/your-large-file.mp4

(This URL will allow live video streaming through your browser or VLC)

Delete an object

aws s3 --endpoint=http://localhost:7777/ rm s3://bucket-name/your-large-file.mp4


And that's it! You've learned how to use our S3-compatible Gateway. Ideally, you'll see how easy it is to swap out AWS for Storj, going forward. Feel that this could be easier, or maybe just that this tutorial could be improved? Open an issue or file a PR!

You could also check out the tutorial on Uplink.

Now go and decentralize all the things!

You can’t perform that action at this time.