1. Download, unzip, and install the binary for your OS:
curl https://github.com/storj/gateway/releases/latest/download/gateway_windows_amd64.exe.zip -o gateway_windows_amd64.exe.zip; Expand-Archive gateway_windows_amd64.exe.zip -Destination .
curl -L https://github.com/storj/gateway/releases/latest/download/gateway_linux_amd64.zip -O && unzip gateway_linux_amd64.zipchmod 755 gatewaysudo mv gateway /usr/local/bin/gateway
curl -L https://github.com/storj/gateway/releases/latest/download/gateway_linux_arm.zip -O && unzip gateway_linux_arm.zipchmod 755 gatewaysudo mv gateway /usr/local/bin/gateway
curl -L https://github.com/storj/gateway/releases/latest/download/gateway_darwin_amd64.zip -O && unzip gateway_darwin_amd64.zipchmod 755 gatewaysudo mv gateway /usr/local/bin/gateway
2. Setup your S3 gateway by running the following command and following the instructions provided by the wizard:
3. Enter the numeric choice or satellite address corresponding to the satellite you've created your account on.
The satellite address should be entered as <nodeid>@<address>:<port> for example: 12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs@europe-west-1.tardigrade.io
4. Choose an access name (this step may not yet be implemented in the version of S3 Gateway you are using - if you don't see this prompt, skip to step 5 below):
5. Enter the API key you generated:
6. Create and confirm an encryption passphrase, which is used to encrypt your files before they are uploaded:
7. Your S3 Gateway is configured and ready to use!
The gateway functions as a daemon. Start it and leave it running.
The gateway should output your S3-compatible endpoint, access key, and secret key.
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: [Enter your Gateway's Access Key]AWS Secret Access Key: [Enter your Gateway's Secret Key]Default region name: [null]Default output format: [null]
Then, test out some AWS S3 CLI commands!
aws s3 --endpoint=http://localhost:7777/ mb s3://bucket-name
aws s3 --endpoint=http://localhost:7777/ cp ~/Desktop/your-large-file.mp4 s3://bucket-name
aws s3 --endpoint=http://localhost:7777/ ls s3://bucket-name/
aws s3 --endpoint=http://localhost:7777/ cp s3://bucket-name/your-large-file.mp4 ~/Desktop/your-large-file.mp4
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)
aws s3 --endpoint=http://localhost:7777/ rm s3://bucket-name/your-large-file.mp4
cp - Copies a local file or S3 object to another location locally or in S3
ls - List S3 objects and common prefixes under a prefix or all S3 buckets
mb - Creates an S3 bucket
mv - Moves a local file or S3 object to another location locally or in S3.
presign - Generate a pre-signed URL for an S3 object. This allows anyone who receives the pre-signed URL to retrieve the S3 object with an HTTP GET request.
rb - Deletes an empty S3 bucket
rm - Deletes an S3 object
sync - Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files
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 the Uplink, going forward.