Storj is an open-source protocol and network for decentralized cloud object storage with client-side encryption
This article originally appeared in the Storj wiki
Storj Test Network
storj-sim tool enables you to run all the components of the Storj network (Satellite, Storage Nodes, Console and Gateway) and test them on your local machine.
In every day Storj usage, the Satellite, Storage Node, and Uplink are run on separate servers and computers, but for the purposes of the test network, all of the components are run locally.
Installation and configuration
First, you'll need at least Go 1.11. Once Go is installed run:
git clone https://github.com/storj/storj.git storj cd storj make install-sim
storj folder is outside of
GOPATH, otherwise you may see errors.
This will install the storj-sim satellite storage node gateway and uplink binaries to wherever Go is configured to output binaries on your system. By default, this is
Next, run setup:
storj-sim network setup
You now have a configured Storj test network with default configuration options.
You might also want to take a look at the config by navigating to the root
--config-dir where all the configs are specified.
You can tweak the configuration settings there as needed.
For insight into what is happening under the hood you can use
--print-commands to see how the processes are started.
The next step is to run it!
Running the test network
Now that the configuration has been completed, we can fire up the test network with:
storj-sim network run
Your test network is now running. You should see output containing your Amazon S3 gateway access and secret keys, which you will need to connect Amazon S3 compatible clients.
At the moment it's assinging ports in the following way:
- Gateways start from port
- Bootstrap server is at port
- Satellites start from port
- Satellite Console starts on port
- Storage Nodes public ports start from port
- Storage Nodes private ports start from port
To get access to a gateway and test your keys, you open http://127.0.0.1:9000 in a web browser.
You can access a storage node dashboard using the storage command. For example for accessing storage node 4 dashboard using the default configuration:
storagenode dashboard --config-dir ~/.local/share/storj/local-network/storagenode/4/ --identity-dir ~/.local/share/storj/local-network/storagenode/4 --address :13004 --color
storj-sim network test <command> can be used to run tests.
storj-sim will start up the network and once it's up and running it will execute the specified
The information about the network is exposed via environment flags. All the flags start with a prefix and an index.
You can obtain the list of environment flags by running:
storj-sim network env
Wiping the Testnet
storj-sim network destroy can be used to wipe the network easily.
While developing it's often nice to be able to delete the network and set it up from scratch.
For convenience, you may run the command in a single line, like so:
storj-sim network destroy && storj-sim network setup && storj-sim network test bash my-test-script.sh
Let's 'be the cloud' and decentralize all the things together!