The Storj Developer Hub

Welcome to the Storj developer hub. You'll find comprehensive guides and documentation to help you start working with Storj as quickly as possible, as well as support if you get stuck. Let's jump right in!

Archive

Tags

Storj Share GUI

1. Introduction

The Storj-Share GUI allows users to rent out their extra hard-drive space to the Storj network, receiving STORJ tokens (ERC20 tokens) in return for the resources utilized (storage and bandwidth) on the host machine. The users running Storj Share on their computers are called farmers. Through time, the user running a correctly configured Storj Share drive/node will download from renters that are uploading data to them. This will fill the free space the farmer has allocated. When a renter requests the data, the farmer will upload the data back to the renter. The farmer ispaid for both storing and uploading data, but not for still unused space. StorjCoin X, just like Bitcoin or Ether, has a monetary value derived from supply and demand, which can be exchanged to othercryptocurrencies or to fiat. The Storj Share software can be used on a variety of different platforms, from Windows, Linux, Ubuntu, Mac to docker and more. It can run on almost all storage containers, including internal storage devices (e.g. SSDs or, HDDs), external storage devices (e.g. HDDs, SSDs, SD cards,or USB flash drives) and Network Attached Storage (NAS). This allows the users toimultaneously dedicate a large variety of underutilized storage containers to Storj to maximize profit.Starting from version 5.0, the Storj Share GUI moved away from the old codebase and now runs on the same backend as storjshare-daemon-CLI, making both the GUI and CLI cross-compatible, which is very handy as no more complicated migration procedures are necessary to switch betweenthe two. The new codebase brings an exponential rise in performance and stability, allowing the farmer to run an almost unlimited number of drives as long as the host system and internet onnection can handle the load.

2. Storj Share download and installation

In this section we will discuss how to download and install Storj Share. If you have already done so, please skip this step.

To be able to download the correct version of Storj Share GUI, it is necessary to first check the computer’s architecture version.

Windows

To check the architecture of your computer, open the control panel and type in “system”: (Control Panel\System and Security\System). This will open up a window that show the architecture of our system (Figure 4.1). The system in this guide is 64-bit (x64), indicating that the 64-bit version of Storj Share GUI should be downloaded (Figure 2.1).

Fedora

If you're having trouble with the last (npm run release) step of the install process for storjshare-gui in Fedora: sudo dnf install dpkg , this will install dpkg-deb which npm can use to finish installing the package.

So now you have to convert this newly created package:

For this, we're going to use a tool from Debian called Alien. It eases the process of translating from Debian to Fedora. After installing alien (sudo dnf alien), traverse to the directory (cd /storjshare-gui), and then run alien on the debian package: sudo alien -r storj.deb

The last part that is important is that you don't forget to "localinstall" this. To do this you simply run:

sudo alien -i releases/storj*.rpm

We can now download Storj Share from the Storj website, however, if you are downloading through google-chrome on a windows machine it will always download the 32-bit version, even if you are running on a 64-bit machine. For this reason it is best to download the latest version of Storj Share directly from the Github repository instead at releases, as shown in Figure 2.2.

Figure 2.2. Github Storj Share GUI download page.

Now head over to the most recent release (highest number) and select the correct executable from the download page. In the case of the system used in this example, the 64-bit windows version should be downloaded: "storjshare-gui.win64.exe". Please note that the installation versionwill change through time, so always download the latest release version when it is announced. After the download is completed, open the download folder and double click on the executable. When the installation window appears, select the "Add windows Firewall Rule" and then click on “Install”, the installation should now start (Figure 2.3).

Figure 2.3. Storj Share GUI installation.

After clicking on "Close" the Storj Share app should open and displaythe following window on the screen (Figure 2.4).

Figure 2.4. Terms of service.

Please carefully read the Terms of Service and then click on “I Accept”.

Figure 2.5. Storj Share GUI Setup screen.

From this point onwards there are two options.

If you just want to migrate your Storj Share drives from an earlier version of Storj Share lower than V5.0 to a version equal or higher to V5.0, click on “I’m an experienced user, skip setup”, see Figure 2.5. Skip chapter three and move on to chapter four.

If you are new to Storj Share or just want to add a new drive, click on the green “Start Setup” button as shown in Figure 2.5. Proceed to chapter three.

3. Add your first drive to Storj Share

This chapter will be broken up into three sections, (1) Initial setup, (2) Use the standard connection mechanisms (UPnP) to connect to the network with no network configuration required; or (3) Use the advanced configuration mechanism by using TCP port forwarding to connect to the network, which requires router and computer configuration. First we will start doing the pre-setup which is commonto both configuration methods.

Each of the configuration steps we will describe below uses a differentconnection protocol, from the most unstable to most stable connection:

Basic configuration

Advanced configuration

UPnP

TCP port forwarding

Low - medium connection stability

High connection stability

No network configuration required

Router port forwarding required

Almost no computer configuration required

Computer configuration required

Table 1. There are two possible Storj Share configurations possible, standard UPnP or the more advanced port forwarding option.

3.1. Initial Setup

First we will discuss the configuration aspects that are common to both the basic and advanced setups. These steps include NTP synchronization, setting up a STORJ ERC20 address to receive your payouts and configuring the storage location and size of the disk space you want to allocate to Storj Share.

3.1.1. NTP Synchronization for Windows

Storj Share has to be time-synchronized with the rest of the nodes in the Storj network in order to correctly take part in the network. Unfortunately not all hardware devices, and especially Windows machines, do not keep their clocks synchronized correctly, which can be a serious problem for Storj Share. In this next step we will install a NTP synchronization tool for both Windows and Linux based systems.

Windows machines are notorious for keeping a poor time synchronization with net time (not local machine time). If the synchronization is off by more than 500 milliseconds, Storj Share will start to fail as it does not keep the same time as all the other nodes on the network. As most messages have a timestamp, it is essential to have a good synchronization for optimal performance. We will use a simple tool called NetTime which can be downloaded here: NetTime

We will download and install the latest stable version (Figure 3.1).

Figure 3.1. NetTime download page.

Once downloaded, open the download directory and double click on the executable to initiate the installation.

Once the installation window appears, click on “Next” on all the following installation windows (Figure 3.2).

Figure 3.2. NetTime installation.

Finally, click on “Finish”.

To open the program, open the system tray and double click on theNetTime icon (Figure 3.3). This will open the main NetTime program.

Scroll down to the country you live in and click on it. This should open up a page with various time servers (e.g. Server 3.pt.pool.ntp.org), we only need to copy the last part of the string after “Server“ (e.g. 3.pt.pool.ntp.org), as shown in Figure 3.4.

Figure 3.4. Time servers for a specific country (Portugal In this example).

Now paste the chosen server name into the first “Time servers” field in the NetTime Options (Figure 3.5).

Set the “update interval” to 15 minutes, leave all the other fields as default values, and click on “OK” (Figure 3.5).

Tip: The default setting "If time adjustment is greater than 2 min ..." is not always good enough (if 'Offset + Lag' deviates more than 500 ms), one can change that value to a few seconds-milliseconds if time sync is not successful with the steps above.

Figure 3.5. NetTime settings with new parameters.

Finally, click on “Update Now” to synchronize NetTime with your own specified time server which should lower the “Offset” and “lag” parameters (Figure 3.6).

Figure 3.6. NetTime after successful configuration, the closer to zero the offset and lag parameters are, the better.

3.1.2. NTP synchronization for Linux based systems

Open up a terminal and type in the following commands:

sudo apt-get install ntp ntpdate -y

sudo service ntp stop

sudo ntpdate -s time.nist.gov

sudo service ntp start

timedatectl status

timedatectl list-timezones

sudo timedatectl set-timezone <your timezone>

e.g. sudo timedatectl set-timezone CET

Alternatively

Edit the ntp config file: vi /etc/ntp.conf

You’ll find a lot of lines in that file, but the important ones are the server lines. You can get a list of server addresses at pool.ntp.org, find the preferred ones for your area, and then add them to the file. For example if you are in the US:

server 0.north-america.pool.ntp.org

server 1.north-america.pool.ntp.org

server 2.north-america.pool.ntp.org

server 3.north-america.pool.ntp.org

Then you’ll need to restart or start the NTPD service:

/etc/init.d/ntpd restart

(you could also use nano instead of vi for editing)

3.2. Basic GUI configuration

The following are the common steps everyone using the GUI will have to follow to set up a STORJ ERC20 compatible wallet address where to receive their payout and configure the location and size of the storage space they want to allocate to Storj Share.

Please return to the Storj Share GUI Setup Screen (Figure 2.5). Once you click on the green “Start Setup” button, Step one of the configuration should appear (Figure 3.7). In this step, you have to enter a valid STORJ ERC20 compatible payout address which your STORJ tokens will besent to at every monthly payout.

The following step will let you create a valid storj address if you do not already have one. If you already have a compatible STORJ payout address, or an address made with another ERC20 compatible wallet such as Parity or Mist, you go straight to the "storage location" step below.

Wallet address

First we will add a STORJ ERC20 payout address. STORJ is the name of the token which is used to pay the farmers for renting out their storage space. STORJ has a monetary value and divisibility which makes it suitable as a means of payment. To create a new payout address click onthe “MyEtherWallet” link in figure 3.7 above.On the MyEtherWallet, enter a password of your liking into the "Enter a password" field and then click on "Create New Wallet", figure 3.8.

Figure 3.8. Creating a payout address with MyEtherWallet.

Now Download the Keystore File and save it to a safe location (e.g. a USB flash drive) and be sure to make multiple backups of your passphrase and Keystore file in different locations toassure that you will not accidentally lose it.. Also do not forget to write down the password for the Keystore file you entered in the previous step. Next click on “I understand. Continue.".

Figure 3.9. Download the Keystore file.

Now save the private key to a safe location as you did with the password and print the paper wallet. Saving the private key and printing the paper wallet are not mandatory but highly advisable for maximum security. Be sure to keep these keys offline as much as possible. Once done click on " Next: Save your Address", figure 3.10.

Do NOT use an exchange wallet address, as Storj Share will not be able to properly display your balance in the GUI. Also, farmer reputation will eventually take into account the amount of STORJ funds stored on the payout address linked to your node to determine which node to award a shard to, which makes it important to send the STORJ tokens to a valid address recognized by Storj and of which you control the private key yourself. If an exchange address is, the farmer will never build his/her reputation on the wallet balance front.

Storage Location

The next step is very straightforward, just point Storj Share to the directory in which you want to store the data that will be downloaded by Storj Share by clicking on “Choose files” and then browsing to the storage container of your choice. It is advisable to first create a folder with the name of the node in the root of the Storage container. When the correct path is selected click on “Select Location” (Figure 3.11).

Figure 3.11. Select the location to store the files that are downloaded by Storj Share.

Storage Size

Next you have to select how much space you want to rent out to the network. In the drop-down menu, select the storage size units (e.g. GB or TB), then input the storage amount you want to allocate and click “Next” (Figure 3.12).

Figure 3.12. Enter the amount of storage space you want to rent out to the network with the respective units in the drop-down menu, when done click on “Next”.

3.3. Connection Settings

There are two possible options for configuring the connection settings of he Storj Share GUI: Default and Advanced Configurations. If you do not want to go through the hassle of (1) setting up port forwarding on your router, (2) having to install and configure some software packages on your computer, and (3) having to tinker with some computer network settings, the basic (default) setup is the way to go, and if you choose this path, please continue with section 3.3.1. If you are a power user who wants to optimize the GUI to give the best performance, please continue following instructions in section 3.3.2.

3.3.1. Default Configuration

The default setup will use UPnP (Universal Plug and Play) to connect to the Storj network. UPnP will try to find your Public IP for you and establish a connection (Figure 3.13).

For the basic configuration to work the following criteria have to be met:

UPnP is enabled in your router settings, For more details on how to enter your router settings see the first few steps in the advanced configuration section below.

"Network discovery" is turned ON in the windows settings if one uses windows, for more info see Chapter 5.3.

Storj Share will automatically give you a port number, however, one can change it if desired or by for example clicking on "Random".

Do not select reachable, this only applies if one wants to follow the advanced configuration section with TCP port forwarding.

Click on “Next”.

Figure 3.13. Connection settings step, leave the port field at default value and then click “Next”. By clicking on random, Storj Share will use a random UPnP port to connect to the Storj network.

Congratulations! Storj Share is now successfully configured and you should see the success message in Figure 3.14. Once you click on “Finish”, the Storj Share dashboard will open automatically and your configured node will initiate.

You can check if your node is running by checking the following parameters:

“Status” field: If your node is running, the status should be “ON” (Figure 3.15). If for some reason your node does not start automatically, this might be attributed to an error or connection issue.

"Port" field: Storj Share will automatically check if the connection to the network through UPnP was successful. If it managed to successfully connect to the Storj network through the UPnP port , the field below port will show the port number and UPnP flag text with a green color. If the color is black it means that the port check failed. however, that does not mean that the port is closed, it just indicated that Storj failed to check if the port is open or not. If this happens be sure to check if the port is open manually.

"ALLOCs" field: This parameters is one of the most useful parameters to check if Storj Share is working correctly or not. If Storj is able to communicate with the Storj network this ALLOCs count will start to rise one integer at a time.

Note: The ALLOCs counter resets when one restarts Storj Share. The contracts will not be lost.

"Peers" field: When Storj Share is successfully connected to the network, the number of peers generally fluctuates at around 100 peers, if for example one has only a single peer it indicates that there is a connection issue.

If Storj Share fails to connect through UPnP, please try the advanced setup in the next chapter, follow the troubleshooting section in chapter five or join our community at Storj community where we will help you to overcome this issue.

Figure 3.15. After clicking on “Finish” Storj Share will automatically open up the dashboard and your configured drive will initiate automatically, thestatus indicator should be “ON” and below "port" the port number text should be green, indicating that a connection was successfully established. If the color is black it means that the port check failed. however, that does not mean that the port is closed, it just indicated that Storj failed to check if the port is open or not. If this happens be sure to check if the port is open manually.

Note: Please backup the configuration file for each node (user -> .config -> storjshare -> configs). You can find the path to the configuration files in Table 4. You could also copy the entire directory called "configs" instead, since all the configuration files are contained within that directory. Backup the files to a safe location so in case your system crashes, you still will be able to recover the shards stored on each Storj drive.

Alternatively if one wants to backup the entire storage database of each node just copy over the storage folder one selected during initial setup.

In Mac the folder in user -> .config is hidden by default, to make them visible please do the following:

Open the Finder.

Go to your Mac HD folder (access this from Devices in the left column).

Hold down CMD-Shift-. (dot).

All the hidden files will become visible.

Go to your home folder and locate .config folder.

Enter the Storj Share folder.

Enter the configs folder.

Hold down CMD-Shift-. (dot) a second time to hide the files again.

3.3.2. Advanced Configuration

In this section we will explain how to set up the connection settings for the advanced user. The advanced configuration mechanism uses TCP port forwarding to connect to the network, and to accomplish this, additional router and computer configuration steps are required. Although the basic configuration described in the last section works in most cases, users that seek maximum stability and performance, power users if you will, can configure their Storj Share to meet these high performance and stability levels. In this chapter we will download, configure and install all the necessary components to achieve these performance expectations.

Before we can continue with the Storj Share setup it is necessary to follow the steps explained in the following sections.

3.3.2.1. Public IP/hostname configuration

Please compare WAN IP on the status page of your router with an IP address that you can see on the website http://whatsmyip.com/If they do not match, your ISP blocks port forwarding and an advanced setting will not help.You should call your ISP and ask about port forwarding and publishing them from the network to the Internet.

To be able to use TCP port forwarding in Storj Share, it is necessary that the port you will forward is linked to a public IP or hostname. Although one can use his or her public IP address, most internetproviders (ISPs) do not assign static public IPs, meaning that at some point in time your public IP address will change. The consequence of this is that the port that you forwarded ceases to match the IP address specified in the Storj Share configuration file and thus the port will be inaccessible/closed.

You can protect yourself against public IP address changes by assigning a hostname to your own local network. If you are not sure if your public IP is static or not it is still a good idea to configure a hostname just in case. Below we will walk through using both methods. If you plan to use a hostname, please skip section 3.3.2.1.1 below and continue with section 3.3.2.1.2.

Note:You should only use a single hostname for your entire local network, even if you plan to configure multiple drives/nodes or run Storj Share on multiple machines. This is true as long as all machines are connected to the same network and can thus be identified with the same public IP address. If you want to run one of the nodes behind a proxy or VPN on the same network, you would have to add another hostname. You also need a new hostname if you want to run Storj Share on another network.

3.3.2.1.1 Public IP Address

If you are certain your public IP address is static this is the way to go.

Open a browser and head over to google, once I google type in “what’s my IP”, google will now return your public IP address. Keep this IP address at hand as we will need it later.

Figure 3.16. Finding your public IP address.

3.3.2.1.2. Hostname configuration

If your public IP address in not static, setting up a hostname is the way to go.

We will add a free hostname using NoIP (noip.com) which needs to be renewed for free every 30 days on a free account. On the NoIP website scroll down to where it says “Create Your Free Hostname now”, then do the following (Figure 3.17):

In the hostname input field select a hostname of your liking (e.g. myhomestorjfarm), it can contain letters and numbers.

Next select a hostname provider of your liking (e.g. “.ddns.net”) in the box to the right.

Click on “Sign Up”

Figure 3.17. Adding our own hostname.

On the sign-up page, enter your email, username and password. Make sure to write these details down, we will need them later (Figure 3.18).

Figure 3.18. NoIP registration page.

When done, click on “Create My Free Account”. NoIP will now send us a confirmation email with an activation link to our email address. Once we click on the activation link it should take us to the NoIP website and confirm that our account is now active.

Now scroll down to where it says “How to remote access your device” and click on “get started with dynamic DNS” (Figure 3.19).

Figure 3.19. The activation page: click on the large blue box to go to the hostname setup page.

Clicking on the link should take us to our NoIP dashboard.

Now scroll down to “Dynamic Update Client for Windows” (DUC) and click on “Download” (Figure 3.20). This should take us to the download page where we can download the DUC tool. On the download page click on “Download Now”.

Figure 3.20. Dynamic Update Client download.

After the file downloaded successfully, head over to the download folder and double click on the “DUCSetup” executable.

The Dynamic Update Client should now open. Enter the sign-in details username and password) from step (4) above and click on “Sign in” (Figure 3.22).

Figure 3.22. Dynamic Update Client (DUC).

Once logged in successfully, the “Edit groups/Hosts” menu should be displayed (Figure 3.23). If not already selected, choose the hostname box and click on “Save”.

Figure 3.23. From the Edit groups/Hosts menu, select the hostname and click on save.

The DUC tool will now come to life (Figure 3.24). Next go to “File” -> “Preferences” and select “Start this application automatically when the user logs on”. In case your computer reboots, DUC will automatically start in the background. This is very handy because if Storj Share starts automatically, it will not run into a closed port as DUC is also already running.

Figure 3.24. DUC once configured correctly.

Note: Some routers can also act as a DUC, in that case you can use the router directly instead of having to install the No-IP DUC. Search the router menus for "hostname" or "DDNS".

You now have a hostname and a dynamic update tool that automatically tracks and assigns the IP address to your hostname. So if your public IP changes, Storj Share will not lose access to the TCP port. Please keep your hostname at hand as we will need it later.

3.3.2.2. Static private IP address setup

Most consumer routers use DHCP which gives your computers on the local network a new private IP address after a certain amount of time (normally 24 hours). If our computer is given a new private IP address, suddenly the specified Storj Share TCP port does not match the private IP address of our system anymore. When this happens our computer will not be able to access the port anymore and the port will thus be closed. To prevent this from happening you have to set up a static private IPaddress. There are plenty of tutorials on this topic on the internet, including:

When done, make sure to restart your computer and check if the private IP address is still static, If the IP address changes after a reboot it means that the IP is not static.

3.3.3. Port forwarding setup

Now that we have our public IP address or hostname (rpcAddress), it is necessary to link the rpcAddress to a specific TCP port (rpcPort) by forwarding that port in your router. All communication to and from your node will pass through this port.

Note: Each drive/node should have its own TCP port, so in case you want to add multiple drives it would look like this:

Node 1: port 4000

Node 2: port 4001

First, before we can start our port forwarding journey, we need to know the gateway (router) private IP address so that we can gain access to the router. This can be done in the following way:

3.3.3.1. Windows

Finding the router IP address can be accomplished by typing in ipconfig into a CMD window (Figure 3.25). We then scroll down to “Default gateway” and copy-paste the router’s private IP address into a browser window (Figure 3.26).

Figure 3.25. Network settings.

Figure 3.26. Router Login page.

We can now log into our router and configure the TCP ports. The router manufacturer and model will vary from user to user and thus the port-forwarding appearance and menu location within the router GUI will also differ.

Doing a quick Google or YouTube search for:

Port forwarding with <Your router brand and model>

Should bring up enough information to successfully configure port forwarding for your router, alternatively the following website contains guides on how to port forward on most routers: https://portforward.com/

Note: The port forwarding menu in most routers is under the “Security” menu called “Virtual server”.

Now copy the IPv4 address from the command prompt (CMD) window in which we executed the ipconfig command. This IPv4 address is the private internal IP address of our computer and is required to set the port forwarding rule (Figure 3.25).

In the example below the ports for 3 nodes/drives were added to the router:

Node 1: 4000 (rpcPort)

Node 2: 4001 (rpcPort)

Node 3: 4002 (rpcPort)

Figure 3.27. Port forwarding parameters for three nodes. Each row represents the forwarding parameters for a single node.

3.3.3.2. Linux

The first thing we have to do is find our default gateway (router private IP address), this can be accomplished by typing in the following command into a terminal (Figure 3.28):

route -n

or

ip route show

Figure 3.28. Find your router gateway IP address.

Now copy your “Gateway” address as shown in red in the figure above (Figure 3.28) and paste it into a browser window (Figure 3.29), this should bring up the router login page.

Figure 3.29. Router Login page.

We can now log into our router and configure the TCP ports. The router manufacturer and model will vary from user to user and thus the port-forwarding menu location within the router GUI will also differ.

Doing a quick google or YouTube search for:

Port forwarding with <Your router brand and model>

Should bring up enough information to open a port., alternatively the following website contains guides on how to port forward on most routers: https://portforward.com/

The port forwarding menu in most routers is under the “Security” menu called “Virtual server”.

You now have to find the private IP address of the machine on which you want to run Storj Share, this can be done by executing the following command:

hostname -I

This should return your current static private IP address.

Now copy the IP address from the terminal window in which you executed the hostname -I command and use it to set the port forwarding rule (Figure 3.30).

The example below shows how ports for configuring 3 nodes were added to the router:

Node 1: 4000 (rpcPort)

Node 2: 4001 (rpcPort)

Node 3: 4002 (rpcPort)

Figure 3.30. Port forwarding parameters for 3 nodes. Each row represents the forwarding parameters for a single node.

Note: The exact port numbers you want to forward are your own choice, the ports in this guides are just suggestions.

After following all these steps you should have the following:

A configured hostname or know your static Public IP address

A static private IP address

Configured port forwarding for every node/drive you want to add to Storj Share.

These are all the network tools and settings that have to be configured to successfully run Storj Share drives/nodes via TCP. Next we need to configure one more tool before we can proceed and configure Storj Share.

3.3.4. Storj Share GUI configuration with advanced settings

Now that we are done setting everything up to run Storj Share in the advanced mode, we can continue with Step 4 of the Storj Share GUI configuration.

Note: Storj Share will attempt to test if the TCP port is open, however, some systems do not allow Storj Share to contact itself from within the same network.

TCP port text color is black: Unable to test if the port is open, please check manually if the port is open or not.

TCP port text color is green: Storj Share was able to test the port, port is open.

In the case the port text is black and thus Storj Share was unable to test if the port is open, there are a few things one can do to check if the port is open, namely use a external port checking website like YougetSignal or monitor if the number of 'Allocs' goes up.

Note: Please backup the configuration file for each node. You can find the path to the configuration files in Table 4. You could also copy the entire directory called "configs" instead, since all the configuration files are contained within that directory. Backup the files to a safe location so in case your system crashes, you still will be able to recover the shards stored on each Storj drive.

Alternatively if one wants to backup the entire storage database of each node just copy over the storage folder one selected during initial setup.

Note: If you see any of the following issues, a node configuration or port forwarding issue might be present:

The number of peers stays at zero or does not increase.

The node is constantly restarting or the node refuses to start.

These issues normally occur due to incorrect configuration or if the rpcPort is not open. If you have any of these issues please join our community at Storj communitywhere we will help you to solve the problem or see the troubleshooting section in chapter five.

3.3.5. Manually edit configuration parameters

This step is for those that want to edit the node configuration parameters manually or later down the line.

First stop the node by clicking on the gear next to the specific drive and click on “Stop”.

Next click on the gear again and select “Edit” (Figure 3.34).

Figure 3.34. Click on the Gear next to the drive and select 'Edit' to enter the config file.

A text editor should now open the configuration file, which saves all the settings and parameters for one particular node (data represented in the code snippets below).

Note: The file name represents the node-ID of that specific node.

For windows users it is advisable to download and install notepad ++, which formats the config file JSON text in a neat way, you have to configure windows to always open a text/JSON file with Notepad++. Only then when you click on “Edit” will it open the config file with Notepad++.

Default configuration file containing the settings for one specific node;

{
// Set the STORJ/ERC20 address for receiving contract payments"paymentAddress": "0x4646fBd7323521929DC06b3Aff9DEb338a966ade",
// Subscribes to the given contract topics// See https://storj.github.io/core/tutorial-contract-topics.html"opcodeSubscriptions": [
"0f01020202",
"0f02020202",
"0f03020202"
],
// An array of bridges to connect and accept contracts,// send exchange reports and discover network seeds."bridges": [
{
"url": "https://api.storj.io",
"extendedKey": "xpub6AHweYHAxk1EhJSBctQD1nLWPog6Sy2eTpKQLExR1hfzTyyZQWvU4EYNXv1NJN7GpLYXnDLt4PzN874g6zSjAQdFCHZN7U7nbYKYVDUzD42"
}
],
// Known preferred seeds in form of a storj URI// Example: "storj://[ip.or.hostname]:[port]/[nodeid]""seedList": [],
// Interface to bind RPC server, use 0.0.0.0 for all interfaces or if you// have a public address, use that, else leave 127.0.0.1 and Storj Share// will try to determine your address"rpcAddress": "89.180.103.39",
// Port to bind for RPC server, make sure this is forwarded if behind a// NAT or firewall - otherwise Storj Share will try to punch out"rpcPort": 4001,
// Enables NAT traversal strategies, first UPnP, then reverse HTTP tunnel// if that fails. Disable if you are public or using dynamic DNS"doNotTraverseNat": false,
// Maximum number of tunnels to provide to the network// Tunnels help nodes with restrictive network configurations participate"maxTunnels": 0,
// Maximum number of concurrent connections to allow"maxConnections": 150,
// If providing tunnels, the starting and ending port range to open for// them"tunnelGatewayRange": {
"min": 0,
"max": 0
},
// Number of times to retry joining the network and the wait time between"joinRetry": {
"times": 3,
"interval": 5000
},
// Temporarily stop sending OFFER messages if more than this number of shard// transfers are active"offerBackoffLimit": 4,
// ECDSA private key for your network identity, your Node ID is derived from// this and it is used to sign and verify messages"networkPrivateKey": "b9cd6834fc097ef00c3a3ddf46928cf10f60f7de8c4365d737041b03b932f532",
// Determines how much detail is shown in the log:// 4 - DEBUG | 3 - INFO | 2 - WARN | 1 - ERROR | 0 - SILENT"loggerVerbosity": 3,
// Path to write the log file to disk, leave empty to default to:// $HOME/.config/storjshare/logs/[nodeid].log"loggerOutputFile": "C:\\Users\\USER\\.config\\storjshare\\logs",
// Directory path to store contracts and shards"storagePath": "C:\\Users\\Storj\\",
// Amount of space to lease to the network, as human readable string// Valid units are B, KB, MB, GB, TB"storageAllocation": "7TB"
}

Next, save the configuration file and start the node by clicking on the gear next to the drive and then “Start”.

That's it! The node should now start and connect to the Storj network via TCP.

3.3.6. Add more drives to Storj Share

If you want to add more nodes, just click on “Add Drive” (Figure 3.35) and repeat the process from the beginning of this chapter. You can skip the wallet creation step as you already created a wallet address which should be used across all nodes. Be sure though to not forget to configure a different port for each node.

3.3.7. Confirm Port forwarding is working

Yougetsignal should automatically detect your public IP address. You can also enter your hostname into the “Remote access” box, although even with a hostname configured the port should still be open if you test with your public IP address. *Just to be certain, test with both your public IP address and hostname if you configured it. The rpcPort for each node should be open with both the IP and hostname .

Now enter the ports (<rpcPort>) one by one into the “Port Number” box on the webpage and click on “Check”.

We now should see a green flag for each of the nodes, indicating that the ports are open:

Figure 3.36. All nodes can successfully communicate to the outside world.

Tip: To check the status of your node, you can enter the nodeID (from the config file name) into the Storj API in a web-browser as follows:

Note: If you saved the configuration file at setup of Storj ShareDaemon-CLI to a different directory, make sure to point to thatdirectory.

Storj Share GUI v5+

Config file location

Windows

%userprofile%\.config\storjshare\configs\nodeID.json

OSX

~/.config/storjshare/configs/nodeID.json

Linux

~/.config/storjshare/configs/nodeID.json

Table 4. Default configuration file location for Storj Share GUI v5+.

Once you found the correct configuration file location click on the config file and select "Open", Figure 4.2.

Figure 4.2. Click on “Import config”

If you are importing a "settings.json" config file from Storj Share GUI v4, a window will appear that says "Configuration is in legacy format. Would you like to migrate it?", Click on "OK" (Figure 4.3).

Note: When importing a config file from a non-default directory (e.g. the folder containing the Storj Share GUI v4 "settings.json"), the new converted config file will be save to the location of theoriginal config file.

Note: The configuration files created by default by both storjshare-Daemon CLI and the new Storj Share GUI v5+ are named as followed:

nodeID.json

e.g. "e24deba65d74263cd73a9a480d5c44d87139dd00.json"

Tip: You can enter the nodeID (config file name) in the Storj API in a web-browser to check the status of your node as follows:

Common migration errors

"Invalid Storage size": Reduce the allocated space in the config/settings file and try the import again.

"I reduced the size and closed the notepad++, why do I get the same error?" - please, click the "Save" button in Notepad++ after changing config file.

"Not enough system resources available": Since Storj Share v5.0.0 you can only run a single node per logical CPU core. If you have a lot of nodes that need to be imported you have a few options, namely: (1) Run the remaining nodes on a new computer, (2) Remove the nodes with the least amount of storage, (3) move the nodes over to the CLI, reduce the allocation space to it and add the “--unsafe” command at node startup.

"Invalid payout address": Please check the config file if there are no spaces in the payout address field. If not try adding a new payout address.

"I added a node but it doesn't appear": It can take a few minutes for the node(s) to appear (especially if you are importing a lot of nodes). If the nodes don’t appear one by one please check the config file if the path to the data directory is correct (storage directory you specified on Storj Share v4.x).

4.1. Changing config file location after migration

If you want to change the config file location after the migration process or want to add a V5+ GUI drive without using the built-in migration option, you can easily do this by editing the GUI snapshotfile in the following way:

Place the drive/node config file into the desired directory.

Open the "gui.snapshot" file with a text editor (location of snapshot is shown in Table 5):

GUI snapshot

Snapshot location

Windows

%userprofile%\.config\storjshare\gui.snapshot

OSX

~/.config/storjshare/gui.snapshot

Linux

~/.config/storjshare/gui.snapshot

Table 5. Storj Share GUI v5+ snapshot location.

Now edit “path” to reflect the new path you moved the config file to (Fig. 4.4). Please note that windows uses double backslash in the path (\\), while GNU+Linux and Mac uses a single front-slash (/). Also please be consistent with the naming of the config file, it is advisable to use the same naming for both the drive and the config file.

If you want to add a completely new drive, you can add a new block entry as shown in Fig. 4.5 below:

Figure 4.5. Add a new drive/node by adding the path to the config file and nodeID to the Storj Share GUI snapshot.

Note: if you want to rename the config file for a specific node to a name of your linking, you can edit the GUI snapshot entry to show the name of the new config file.

4.2. Confirm successful migration.

After a successful node migration from Storj Share GUI v4.x, it is advisable to always check if the settings were correctly preserved. This check can be done by opening the old and the new configuration files side by side.

Note: If you migrate from Storj Share daemon CLI on the same machine the migration will use the exact same original config file. If you migrate a config file between different platforms make sure to follow the next few steps and change the paths within the config file. Windows uses double backslash (\\) in the paths, while GNU + Linux and mac use a single front-slash (/). So if you migrate from say windows to linux make sure to substitute the backslashes to a single front-slash.

5. Storj Share Troubleshooting

There are two ways we can check if the node is working correctly, we can upload our log to a website that checks the log or we can do a manual check if we want the highest amount of details.

Once you click on “Process” it will check the logs for connectivity and other parameters.With very little effort one can check if the configured drives areworking correctly by combining the following sources of information:

We can see that in the example above, the delta value is 82ms which falls within the '-500ms < delta < 500ms' acceptable range. This indicates that our node is correctly synchronized. If the delta value falls outside of the range above, please synchronized your clock again (see chapters above for more details).

Eventually if your node is working correctly you should start to see “ALLOC” messages in your log.

Sometimes a fatal error can occur such as database corruption, searching the logs for the following parameters allows you to check if any of these issues have occurred:

Windows -> CTRL + F -> "UsedSpace".

GNU+Linux -> grep "UsedSpace" /path\_to\_your\_log.log | tail

Windows -> CTRL + F -> "kfs".

GNU+Linux -> grep "kfs" /path\_to\_your\_log.log | tail

Windows -> CTRL + F -> "exception"

GNU+Linux -> grep "exception" /path\_to\_your\_log.log | tail

If you encounter any of these issues please join our community at Storj community where we will help to resolve this issue.

5.1. Windows Firewall

If you are having a hard-time to get storj Share to connect through mainly the forwarded TCP ports on a windows machine chances are that Storj Share is being blocked by the firewall.

To solve this do the following:

Enter the "Control Panel".

Search for "Windows Firewall with Advanced Security".

Once in the Windows firewall with Advanced Security click on "Inbound Rules".

The in the "Actions" list on the right-hand side click on "New Rule…".

Once in the "New Inbound Rule Wizard" select the "Port" option and click on "Next".

Next Select "TCP" and "All Local Ports" or just the Storj Share port range (e.g. 4000-4005) in "Specific Local ports" and click "Next".

Select "Allow the connection" and hit "Next" again.

Select all three rules (Domain, Private and Public) and click "Next".

Now enter a description (e.g. "Storj Ports") and click finish.

Now the firewall inbound rules has been set, we now have to do the same thing for the outbound rule. Click on "Outbound Rule" and repeat the steps one through nine above.

5.2. Network Location Awareness

Windows Vista® and later versions of Windows support network location awareness, which enables network-interacting programs to change their behavior based on how the computer is connected to the network. In the case of Windows Firewall with Advanced Security, you can create rules that apply only when the profile associated with a specific network location type is active on your computer, see.

Storj Share GUI recommends to run your network connection as Private.

Note: If you switch to a Public network connection, you may have the potential to block important connections into Storj Share.

5.2.1. Checking your current Network Profile

To check what your network connection is currently set, follow the steps below.

Note: If this is a device that changes network connections (is mobile) your network profile could switch depending on the network one connects to.

Open Network and Sharing Center.

See the network type under the name of your Network Adapter.

Figure 5.1. Windows network and sharing center in the control panel.

To change the type from Public to Private perform the following:

Windows 10:

Open "Settings".

Click "Network & Internet".

For an ethernet adapter, click "Ethernet" and click the adapter name.

For a Wi-Fi Network click "Wi-Fi" and click the name of the active wireless connection

Under "Make this PC discoverable" click "ON"

Figure 5.2. Make your computer discoverable on the network.

5.3. Windows - Managing UPNP

This section applies to Windows 7 and higher and Windows Server 2012 R2 and higher.

Over time, installing, configuring and troubleshooting networks have arguably become easier. This is a necessary outcome required to support networking in the absence of a dedicated information technology group, as is more often the case as smaller networks are being deployed in small businesses and home environments.

Also over the last several years, there has been an increase in the number of devices supporting digital information exchange such as the cell phone, PDA and Tablet devices, and even the television. Devices that are not traditionally computing devices are adding computer technology for various reasons, including to process the digital data formats becoming more popular.Non-traditional devices that now include computing technology vary widely, from the thermostat to the stereo system. A decrease in the cost of implementing computing and networking technology has perpetuated itself and allowed the addition of intelligence, and in some cases reliable networking, into many devices in use today.

The next step in this evolution (which has already begun) is to transparently connect these devices together. This enables new capabilities such as remote control and monitoring, sharing of digital data, and converging data from multiple devices and locations. Doing this requires a common set of standards and protocols for communicating. This is part of what UPnP offers.

While Windows might not be required, a system running Windows with UPnP support can serve several purposes in this new network of devices, including that of central controller and gateway.

In the left pane, click the link for "Change advanced sharing settings".

In the Network Discovery section, select the option to "Turn on network discovery" and click the Save changes button.

Figure 5.3. Enabling network discovery.

Disabling UPNP in Windows:

Open the "Control Panel".

Click "Network and Internet".

Click "Network and Sharing Center".

In the left pane, click the link for "Change advanced sharing settings".

In the Network Discovery section, select the option to "Turn OFF network discovery" and click the Save changes button.

Figure 5.4. Disabling network discovery.

5.4. Logger verbosity

You can instruct each node how detailed you want the logs to be, this can be done by clicking on the gear next to the specific node, selecting "Edit" and then in the config file change the "loggerVerbosity" value. The default value is three which shows "All information", you can set it to for example four which is the "Debug mode". If you just want to view warnings you can set it to two. Setting it to one only shows errors. If you don’t want Storj Share to dump any information into the logs set the logger verbosity to zero.

Logger verbosity

Log information

0

No logs

1

Only show Errors

2

Only show warnings

3

Show all information (Info + warnings)

4

Debug mode

Table 6. Logger verbosity levels.

6. Some additional useful Storj Share monitoring tools

There are a number of tools which people have been using through the Storj ages to monitor Storj Share data usage. As Storj Share not only downloads data from renters but also uploads data back to them, there can be intensive network usage. If one wants to quantify the amount of bandwidth Storj uses, this can be easily achieved by installing a few third-party tools.

7. Understanding data-flow on the Storj network

One of the most common questions farmers ask is why they get lots of data very quickly one day, while the next day they get almost no data. This question mostly arises because users think that they are doing cryptographic mining with Storj, which normally would give them a steady income as hardware performance stays relatively constant over time. Storj Share is not a miner, it is a tool that farmers use to interact with the Storj distributed cloud storage network. As with any cloud storage system the throughput isn’t constant over time, because Storj is used by real people which will not upload or download at constant rates. Somebody uploading a file to Storj will most likely not upload aconstant stream of equally sized files so there will be momentary upload peaks. The same thing goes for downloading, somebody can stream a video from Storj today, but that does not mean he or she will stream the same file tomorrow. All of these unknowns make it impossible to predict howmuch data a farmer will receive on a certain day.

The number and size of shards will depend on the size of the file. When you first start your node, it will do a small proof-of-work to be added to the Bridge. The Bridge is a master-node, that will relay all of the shard input/output requests to your node.Once the proof of work is completed, the Bridge is made aware of your node being online and it is added to the network. At this point, your node can be contacted by the Bridge to see if it wants some data.Example of the upload process: Let's say a user (We'll call them a renter) wants to upload a file. The file is split into pieces that we call shards. The shards get uploaded to different nodes.

To do this, the renter first contacts the Bridge, and basically says, "Hey, I have a shard that I need to put somewhere. Where can I put it?" and the Bridge responds with "Hang on, let me ask the nodes to see who is available and wants some data."At this point, the Bridge looks at the shard's hash (The shard's identity) which is a mix of letters and numbers (Much like a common cryptocoin address in appearance) Once the Bridge has this, it then sends a message to some nodes that have node identities (Another hash) that are numerically close to the shard's hash. (Ex: 10 is closer to 9 than 2)This is important to understand, because when we talk about a node's location and closest neighbors, we're talking about how close they are together numerically. Not geographically. Your closest neighbors are those nodes that are close to your node's ID numerically.Alright so, the Bridge will find the nodes that are closest numerically to the shard's hash. It will then look at the node's response time. (Response time is a metric of how long it takes your node to respond to Bridge requests over an average of 1,000 such requests) The Bridge will send a request to 36 nodes that have a response time below 9,000ms. It will then also send a request to 9 nodes with a response time above 9,000ms.

Again, these 36+9 nodes are chosen based on how close they are to the shard's hash. Each shard's hash is effectively random, so each node on the network has an equal chance to get some data whenever a new shard is made and requests are sent.

At this point, your node should send the Bridge a response in the way of an ALLOC statement. The ALLOC tells the Bridge the amount of space you have available, and some other bits of information that the Bridge can use to determine if your node can receive this shard or not.

The Bridge currently chooses randomly 1 node out of the 45 total nodes it selected to receive the shard. (As of this writing. there are some performance issues that will cause some high response time nodes to never get data. The developers are working to make adjustments to alleviate this)

Currently, the rest of the nodes get sorted on their Timeout Rate. (Will be switched in the near future to Reputation) Five nodes with 0 (Or the smallest timeout) will receive a mirror copy of the first shard. The other nodes that responded will receive nothing.

You might have some thoughts about Reputation. Reputation is a new point system that Storj Labs has implemented for every node.

As of October 16th 2017, Reputation is not implemented as a factor in a node receiving shards. It is only being calculated right now. It does not impact anything else.

So, if you're wondering why you aren't receiving very much data. Find out...

Is your Response Time above 9,000ms? If so, you will be chosen to send an ALLOC less often. Your response time will go down over time, assuming network conditions and node speed are adequate.

Is your Timeout Rate above 0? If so, you likely will not receive a mirror shard. Nothing you can do to fix this until the developers put a fix in place. But you still have a 1 in 45 chance of getting first shard.

Beyond that, it's basically luck right now and how busy the network is.

8. Payments

Farmers are paid for the following resources:

Storage ("gbHours" in the payout formula).

Upload bandwidth ("downloadedBytes" in the payout formula).

Base payout

Farmers are paid for storing data over time. Just like is the case with electricity where you pay for kW/h, with Storj the unit is GB-hours. Every hour that you store one gigabyte is considered 1 GBh, meaning that if you store 1GB during one month the calculation would go as follows:

GBh = 1 GB x 24 hours/day x average number of days per month = 730GBh for storing 1GB during the entire month.

The calculation above is actually the minimum requirement to be eligible for a payment.

Although you are not paid for downloading a shard, you are paid for uploading a shard back to the renter, thus you are paid for providing upload bandwidth.

If you accumulated the minimum GBh requirement for the month, you should receive a base payout. This is an incentive for small farmers. However, if your nodegoes offline for more than a week before the end of the current month, you will not qualify for payouts.

If you are tech savvy and interested in calculating how many GBh you have accumulated, you can run this script made by Jens Heimbürge:

Note: Payouts are currently done once a month at the beginning of every month, a payout sheet is published in the #announcements channel of the Storj Share community chat for farmer review and discussion at the beginning of each month and payouts proceed when all reported problems have been attended.

9. Payout Formula

Below is the payout formula used to calculate Storj farmer payouts. The payout formula can be found here. This payout formula is subjected to changes through time.

### Payout Formula
```
paymentModelFunction = function(gbHours, downloadedBytes) {
## 730 is the average number of hours in a month.
HOURS_IN_MONTH = (24 * 365) / 12
## This is determined by value reported on https://coinmarketcap.com/ at time
## of first preliminary payout calculation.
STORJ_USD_RATE = 0.620275
## Both gbHoursScaled and downloadedBytesScaled can not be less than 0 to
## ensure everyone gets at least the base payout amount.
gbHoursScaled = sapply((gbHours - median(gbHours)) / sd(gbHours),
function(x) ifelse(x < 0, 0, x))
downloadedBytesScaled = sapply((downloadedBytes - median(downloadedBytes)) / sd(downloadedBytes),
function(x) ifelse(x < 0, 0, x))
## At least one of the below criteria must be met to qualify for a payment.)
downloadedBytesFlag = as.numeric(downloadedBytes > 0)
gbHoursFlag = as.numeric(gbHours >= 730)
isQualifiedFlag = sapply(gbHoursFlag + downloadedBytesFlag,
function(x) ifelse(x > 0, 1, 0))
## The current base payout is set to $1.50 USD.
basePayout = (1.50 / STORJ_USD_RATE) * isQualifiedFlag
ghHourPayout = 17.1094 * gbHoursScaled * isQualifiedFlag
downloadedBytesPayout = 12.6849 * downloadedBytesScaled * isQualifiedFlag
payoutAmountSTORJ = ghHourPayout + downloadedBytesPayout + basePayout
payoutAmountUsd = payoutAmountSTORJ * STORJ_USD_RATE
cbind(payoutAmountSTORJ, payoutAmountUsd)
}
```
### Details
- Nodes that have not been seen in the past week (from the time first preliminary payouts are calculated) are not included in the metric totals
- Each component (gbHours and downloaded bytes) is scaled so that each metric ends up being a measurement of how far away you are from the median
- Those values are multiplied by certain weights and summed to arrive at a final value

9.1. Payout formula details

Nodes that have not been seen in the past week (from the time first preliminary payouts are calculated) are not included in the metric totals.

Each component (gbHours and downloaded bytes) is scaled so that each metric ends up being a measurement of how far away you are from the median.

Those values are multiplied by certain weights and summed to arrive at a final value

There are no rewards for storing less than 1 GB for the month.

10. Conclusion

In this guide we discussed the ins-and-outs of Storj Share GUI which will help you to successfully become a Storj farmer and obtain a revenue stream for your unused storage space and internet resources. We looked at how to configure a node with the basic and with the advanced settings, howto migrate nodes and how to troubleshoot each of the nodes.

We are constantly improving Storj and all of the tools to make sure that both the renters and farmers can interact harmoniously in the Storj ecosystem. We would love to hear from you, either it beuggestions,comments, questions or criticism. The Storj network only exists thanks to people like you and we are very grateful for that.