diff --git a/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-freenas-freebsd/page.md b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-freenas-freebsd/page.md new file mode 100644 index 000000000..99a6d768f --- /dev/null +++ b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-freenas-freebsd/page.md @@ -0,0 +1,259 @@ +--- +author: + name: "@Odmin" +title: Getting started with Storj Testnet on FreeNAS (freeBSD) +docId: c1df00c3-9e22-43fe-9590-6157c88d2f20 +metadata: + title: Getting started with Storj Testnet on FreeNAS (freeBSD) + description: Would you like to build an app with the Storj network as backend? Let's create a local test network with Storj-Sim on your freeBSD powered FreeNAS! +redirects: + - /hc/en-us/articles/360028417332-Getting-started-with-Storj-Testnet-on-FreeNAS-freeBSD + - /hc/en-us/articles/360028417332 +--- +If you want to try it on Linux, you can read the article [https://github.com/storj/storj/wiki/Test-network](https://github.com/storj/storj/wiki/Test-network) + +In addition, you can try it on Windows: [Getting started with Storj Testnet on Windows](docId:a1b98770-bb79-4a9d-b0e0-8d3d57106a4d). + +Author: Our fellow Community member @Odmin + + +FreeNAS® is an embedded open-source network-attached storage (NAS) operating system based on FreeBSD and released under a [2-clause BSD license](https://opensource.org/licenses/BSD-2-Clause). A NAS has an operating system optimized for file storage and sharing. + +FreeNAS® provides a browser-based, graphical configuration interface. The built-in networking protocols provide storage access to multiple operating systems. A plugin system is provided for extending the built-in features by installing additional software. + +FreeNAS has independent [hardware recommendations](https://ixsystems.com/documentation/freenas/11.2/intro.html#hardware-recommendations) for newly built system, so before you begin, please make sure that you meet **at least the minimum hardware requirements**. + +Once your hardware is ready you can [move forward with installation](https://ixsystems.com/documentation/freenas/11.2/install.html). + +# Install Storj inside a FreeNAS Jail +We will create a ZFS dataset and create a new FreeNAS Jail to run a local Storj test network (Storj-Sim), following the steps outlined below. + + +## Create a new ZFS dataset for store Storj data: + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip0.png) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip1.png) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip2.png) + +***Figure 1.** Creating a new dataset for storage* + +### Specify options for a new dataset - see **Figure 2**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip3.png) + +***Figure 2.** Options of the new dataset* + +Please make sure you have the following settings configured: + +* **Name** - `Stojv3_data` +* **Compression** - `lz4` +* **Share Type** - `Unix` +* **Enable atime** - `OFF` +* **ZFS Deduplication** - `OFF` + +Then click on **Advanced Mode**. + +Depend on your HDD pool configuration, you can see the default value for Record Size (in our case 32K) - see **Figure 3**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip4.png) + +***Figure 3.** Record Size for the Pool* + +## Create a new FreeNAS Jail +To activate Pool for Jail Manager, just click **CONFIG**. See **Figure 4**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip5.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip6.png) + +***Figure 4.** Creation of a new Jail* + +Then click **ADD**. Fill in a new Jail name and select the latest FreeBSD release (**Figure 5**) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip7.png) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip8.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip9.png) + +***Figure 5.** Adding a new Jail with parameters* + +Select both options - **DHCP Autoconfiguration IPv4** and **VNET** (**Figure 6**) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip10.png) + +***Figure 6.** DHCP Autoconfiguration IPv4 and VNET* + +Check configuration and click **SUBMIT** (**Figure 7**) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip11.png) + +***Figure 7.** Submit configuration of a new Jail* + +Wait until the new Jail has been created, then click the three dots on the right side and specify the mount point inside a Jail to store data (**Figure 8**) + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip12.png) +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip13.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip14.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip15.png) + +***Figure 8.** Mount point* + +Select our dataset (we created it earlier with name `Storjv3_data`) as a source and mount point inside a Jail (which will be `storj_data`) as a destination - see **Figure 9**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip16.png) + +***Figure 9.** Options of mountpoint* + +Here is an example - see **Figure 10**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip17.png) + +***Figure 10.** Example of options for the mountpoint* + +Now you can start a Jail - see **Figure 11**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip18.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip19.png) + +***Figure 11.** Starting a Jail* + +## Configure the FreeNAS Jail +Select the three dots on the right side and select **Shell** to access the Jail console - see **Figure 12**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip20.png) + +***Figure 12.** Starting a Jail shell* + +Let’s enable SSH access and allow connections to the Jail for your favorite SSH client. See example on **Figure 13**. + +```shell +sysrc sshd_enable="YES" +``` + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip21.png) + +***Figure 13.** Example of the command execution* + +## Install useful packages + +```shell +pkg install nano git bash +``` + +Set `PermitRootLogin` to `yes` in the `/etc/ssh/sshd_config`: + +```shell +nano /etc/ssh/sshd_config +``` + +Uncomment `PermitRootLogin` and set to `yes` (see **Figure 14**), then save the file (Press **Ctrl+X** for exit and **Y** for save changes). + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip22.png) + +***Figure 14.** Changing PermitRootLogin option in the text editor* + +Start the SSH service: + +```shell +service sshd start +``` + +Set a new password for root user: + +```shell +passwd +``` + +Now you can log in via SSH using login: `root` and **your password** (check the Jail section for the IP address) - see **Figure 15**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip23.png) ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip24.png) + +***Figure 15.** IP address for connections to the Jail* + +## Install the latest Go package + +```shell +pkg install go +``` + +Check Go version (**Figure 16**) + +```shell +go version +``` + +***Figure 16.** Check Go version* + +```shell +go env +``` + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip25.png) + +***Figure 17.** Example of environment variables for Go* + +Add a new user for Storj with Username `storj` and set shell: `bash` - see **Figure 18**. + +```shell +adduser storj +``` + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip26.png) + +***Figure 18.** Adding a new storj user* + +Become a storj user: + +```shell +sudo su storj +``` + +### Setup Go Environment +Open your `.profile` file and add a global variables as follows at the end of the file. See **Figure 19**. + +```shell +nano /home/storj/.profile +``` + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip27.png) + +***Figure 19.** Adding a global variables to the `.profile`* + +Press **Ctrl+X** for exit and **Y** for save changes + +### Update the current shell session + +```shell +source ~/.profile +``` + +# Compile Storj from Source +Connect to the Jail shell and execute: + +```shell +git clone https://github.com/storj/storj.git storj +cd storj +go install -race -v storj.io/storj/cmd/storj-sim storj.io/storj/cmd/bootstrap storj.io/storj/cmd/satellite storj.io/storj/cmd/storagenode storj.io/storj/cmd/uplink storj.io/storj/cmd/gateway storj.io/storj/cmd/identity storj.io/storj/cmd/certificates +``` + +check the binary folder + +```shell +ls /home/storj/go/bin/ +``` + +Let´s create a local test network, containing the Satellite, Uplink, S3 gateway and 10 storage nodes and run it. + +```shell +storj-sim network setup +storj-sim network run +``` + +Now the test network is ready and you can see the output like this - see **Figure 20**. + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/storj-sim/freeBSD/mceclip28.png) + +***Figure 20.** Example of the output of a local test network* + +More information - [Test network](https://github.com/storj/storj/wiki/Test-network) + +# See also +* [S3 Gateway](docId:EGM8O-1xt2Az03eBWT8Rf) +* [Uplink CLI](docId:TbMdOGCAXNWyPpQmH6EOq) +* [Libuplink Walkthrough](https://github.com/storj/storj/wiki/Libuplink-Walkthrough) diff --git a/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-linux/page.md b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-linux/page.md new file mode 100644 index 000000000..877a119bc --- /dev/null +++ b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-linux/page.md @@ -0,0 +1,11 @@ +--- +title: Getting started with Storj Testnet on Linux +docId: +metadata: + title: Getting started with Storj Testnet on Linux + description: Would you like to build an app with the Storj network as backend? Let's create a local test network with Storj-Sim on Linux! +redirects: + - /hc/en-us/articles/360031331031-Getting-started-with-Storj-Testnet-on-Linux + - /hc/en-us/articles/360031331031 +--- +See [https://github.com/storj/storj/wiki/Test-network](https://github.com/storj/storj/wiki/Test-network) diff --git a/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-windows/page.md b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-windows/page.md new file mode 100644 index 000000000..a134126e5 --- /dev/null +++ b/app/(docs)/learn/tutorials/getting-started-with-storj-testnet-on-windows/page.md @@ -0,0 +1,350 @@ +--- +title: Getting started with Storj Testnet on Windows +docId: a1b98770-bb79-4a9d-b0e0-8d3d57106a4d +metadata: + title: Getting started with Storj Testnet on Windows + description: Would you like to build an app with the Storj network as backend? Let's create a local test network with Storj-Sim on Windows! +redirects: + - /hc/en-us/articles/360028417532-Getting-started-with-Storj-Testnet-on-Windows + - /hc/en-us/articles/360028417532 +--- +If you want to try it on Linux, you can read this article: [https://github.com/storj/storj/wiki/Test-network](https://github.com/storj/storj/wiki/Test-network) + +In addition, we have an article for freeBSD: [Getting started with Storj Testnet on FreeNAS (freeBSD)](docId:c1df00c3-9e22-43fe-9590-6157c88d2f20) + +See also our docker-compose based setup: [https://github.com/storj/up](https://github.com/storj/up) + +# Install the necessary dependencies +It is recommended to install **Notepad++** for easy config file editing. + +1. Install the latest Go (version 1.22.x or later), the executable can be found [here](https://golang.org/dl/). Documentation for the installation can be found [here](https://golang.org/doc/install#install). +2. Install `Msys2`, which can be found [here](http://www.msys2.org/). Please, select the `x86_64` package. + +Run the **MSYS2 MinGW 64-bit** program from the Start menu and execute: +```shell +pacman -S git make mingw-w64-x86_64-gcc +``` + +Now close the MinGW terminal. + +## Install NodeJS LTS (Optional) +You can do this in several different ways: + +* [https://nodejs.org/en/download/](https://nodejs.org/en/download/) +* using [Chocolatey](https://chocolatey.org/) + +```powershell +choco install nodejs-lts +``` + +Check the installation +```powershell +node --version +``` + +## Install VisualStudio 2017 build tools for C++ +Install using a Chocolatey: + +```powershell +choco install visualstudio2017-workload-vctools -y +``` + +## Install Python +Install using a Chocolatey: + +```powershell +choco install python -y +``` + +Disable the [app execution alias for python installer](https://stackoverflow.com/a/66409838), because otherwise you will get this error: + +```powershell +python --version +Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. +``` + +Finish setup by restarting the terminal. + +Now check the installation: + +```powershell +python --version +``` + +## Confirm dependencies were installed correctly +Start a PowerShell or cmd terminal and execute: + +```shell +setx path "C:\msys64\mingw64\bin;C:\msys64\usr\bin" +``` + +Please restart your terminal to apply the changes. + +You should now be able to execute the following commands, please note that **for each command a version number should be returned**: + +```shell +go version +git version +gcc --version +``` + +# Storj installation and setup instructions +## Compile Storj from Source +To compile Storj from main, please execute the following commands: + +```shell +git clone https://github.com/storj/storj -b main +cd storj +go install ./... +``` + +If you want to have access to the storagenodes' web dashboards and to the satellite's web dashboard, you need NodeJS LTS, VisualStudio BuildTools C++ and Python installed (see optional steps above) and compile the web UIs (PowerShell): + +```powershell +cd .\web\satellite\ +$env:GOOS="js"; $env:GOARCH="wasm"; go build -o ./static/wasm/access.wasm storj.io/storj/satellite/console/wasm +cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./static/wasm +get-item .\static\wasm\* | %{brotli -k $_.FullName} +npm install +npm run build + +cd ..\storagenode +npm install +npm run build + +cd ..\multinode +npm install +npm run build + +cd ..\..\satellite\admin\ui +npm install +npm run build + +cd ..\..\.. +And to finish compilation: +go install -race -v storj.io/gateway@latest +go install ./... +``` + +# Install the REDIS binaries +We should have the redis server set up locally. + +Download the pre-build redis binary with libraries or build your own: [https://github.com/meiry/redis5_compiled_for_windows10](https://github.com/meiry/redis5_compiled_for_windows10) or [https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip](https://github.com/ServiceStack/redis-windows/raw/master/downloads/redis-latest.zip) + +Unpack the archive and copy the binary and needed libraries to `%USERPROFILE%\go\bin` + + + +# Run PostgreSQL +We can install PostgreSQL either locally, in the WSL, or in a Docker container. In this example, we will create a `teststorj` DB and will use the database user `postgres`. + + +## Run PostgreSQL in a Docker container +The easiest way is to run it in a Docker container, but it requires Docker installed. + +```powershell +docker pull postgres + +docker run --rm -p 5432:5432 --name postgres postgres +``` + +In a new terminal, create the teststorj database: + +```powershell +docker exec -it postgres createdb -U postgres teststorj +``` + +To run your own queries in the PostgreSQL, you can use the following command to open an interactive terminal: + +```powershell +docker exec -it postgres psql -h localhost -U postgres teststorj +``` + +## Install PostgreSQL in the WSL +If you have a WSL enabled, then you can install PostgreSQL in the Ubuntu shell. + +```shell +sudo apt update +sudo apt install postgresql -y +sudo service postgresql start +``` + +To create the `teststorj` database for the satellite: + +```shell +sudo -u postgres psql +``` + +You should get a prompt `postgres=#`, execute this SQL command: +```sql +create database teststorj; +``` + +Then exit from the postgres shell by executing the command `\q`. + +To run your own queries in PostgreSQL you can use these command to open an interactive terminal: + +```shell +sudo -u postgres psql teststorj +``` + +### Enable access for postgres user by host +Edit `/etc/postgresql/12/main/pg_hba.conf`: + +```shell +sudo nano /etc/postgresql/12/main/pg_hba.conf +``` + +Add this line above all lines that start with host: + +``` +host teststorj postgres 0.0.0.0/0 trust +``` + +Save the configuration file and restart the PostgreSQL: + +```shell +sudo service postgresql restart +``` + +## Install the native PostgreSQL locally +[https://www.postgresql.org/download/](https://www.postgresql.org/download/) + +[https://www.postgresql.org/docs/current/tutorial-install.html](https://www.postgresql.org/docs/current/tutorial-install.html) + +# Setup a local Storj Network +First we have to make sure we are able to call the compiled Storj binaries. To do so, please execute the following on the command line in `cmd.exe`: + +```shell +setx path "C:\msys64\mingw64\bin;C:\msys64\usr\bin;%USERPROFILE%\go\bin" +``` + +Now restart the terminal and execute the following: + +```powershell +# This will create a local test network containing the Satellite, Uplink, S3 gateway and 10 storage nodes +storj-sim network setup --postgres=postgres://postgres@localhost/teststorj?sslmode=disable + +# This will run the created network +storj-sim network run +``` + +At the moment it's assigning ports as follows: + +* Gateways start from port `11000` +* Version control is at port `12000` +* Bootstrap server is at port `13000` +* Satellites start from port `10000` +* Satellite Console starts on port `10002` +* Storage Nodes public ports start from port `14000` +* Storage Nodes private ports start from port `14001` +* Storage Nodes web dashboard start from port `13002`, `13012`, `13022`, ..., `13092` + +# Getting environment variables for the Local test network +```shell +storj-sim network env +``` + +# Setup the uplink +In Powershell: + +```powershell +uplink import $(storj-sim network env GATEWAY_0_ACCESS) +``` + +If the command throws an error such as + +```powershell +PS > uplink import $(storj-sim network env GATEWAY_0_ACCESS) +Error: accepts between 1 and 2 arg(s), received 0 +Usage: + C:\Users\USER\go\bin\uplink.exe import [NAME] (ACCESS | FILE) [flags] + +Flags: + -h, --help help for import + +Global Flags: + --advanced if used in with -h, print advanced flags help + --config-dir string main directory for uplink configuration (default "C:\\Users\\USER\\AppData\\Roaming\\Storj\\Uplink") +``` + +Then stop storj-sim (**Ctrl-C**) and run it back (`storj-sim network run`). After that, the configuration of uplink should work. + +More info you can read at [https://github.com/storj/storj/wiki/Test-network](https://github.com/storj/storj/wiki/Test-network) + +# Up- and Download Files + +```powershell +# This will list all buckets in your network. If the network is new, nothing should be returned. +uplink ls + +# This is where we create bucket(mb = make bucket), e.g. uplink mb sj://Myfiles +uplink mb sj://test + +# Now the bucket should appear in the list. +uplink ls + +# This command is used to upload a file (cp = copy file) to your bucket. +uplink cp bigfile.avi sj://test/ + +# This will list all files in a specific bucket. +uplink ls sj://test/ + +# This is the command to download a file from your bucket to your machine. +uplink cp sj://test/bigfile.avi bigfile.avi + +# This command will delete a file from a specific bucket. +uplink rm sj://test/bigfile.avi +``` + +You can read more about [Uplink CLI](docId:TC-N6QQVQg8w2cRqvEqEf). + +# S3 Gateway +The S3 gateway, which also is being run by `storj-sim`, allows users to quickly and easily upload files to the Storj network through a S3 gateway (Minio). Furthermore, this gateway is accessible via localhost in the browser. + +Copy your S3 keys from the [Getting environment variables for the Local test network](#getting-environment-variables-for-the-local-test-network) of `storj-sim` and configure the AWS CLI: + +```powershell +aws configure set default.aws_access_key_id eUXZt66VWTTpcwgBazQnPsuSYri +aws configure set default.aws_secret_access_key xDkJKUqJVhAj69CGH1VPqDPi47Q +aws configure set default.s3.multipart_threshold 1TB +``` + +Here are the commands to make a bucket, upload the file, make an external link for sharing: + +```powershell +aws s3 --endpoint http://localhost:11000 mb s3://test3 +aws s3 --endpoint http://localhost:11000 cp C:\bigvideo.avi s3://bigvideo.avi +aws s3 --endpoint http://localhost:11000 ls +aws s3 --endpoint http://localhost:11000 ls s3://test3 +aws s3 --endpoint http://localhost:11000 presign s3://test3/bigvideo.avi +``` + +You can configure your AWS CLI to include an endpoint URL to the config: [Define an endpoint with AWS CLI](docId:20zlQyfMD9gmHJOUPx3jh). + +## S3 gateway video streaming +Video streaming is possible with the S3 endpoint by executing the following command: + +```powershell +aws s3 --endpoint http://127.0.0.1:11000 mb S3://Bucket +aws s3 --endpoint http://127.0.0.1:11000 cp c:\StorjIntro.mp4 S3://Bucket/StorjIntro.mp4 +aws s3 --endpoint http://127.0.0.1:11000 presign s3://Bucket/StorjIntro.mp4 +``` + +After the last command you will get an URL to your video file, which you can open in your browser or VLC player. + +You can read more about [S3 Gateway](docId:EGM8O-1xt2Az03eBWT8Rf). + +# Relevant directories on Windows +```powershell +#This is where the Storj code from github is stored: +C:\Users\USER\storj + +#Stores the config files. +C:\Users\USER\AppData\Roaming\Storj + +#Stores compiled binaries. +C:\Users\USER\go\bin +``` + +To revert the entire installation, deleting the directories above will do the trick. \ No newline at end of file diff --git a/app/(docs)/node/faq/can-storj-use-other-blockchain/page.md b/app/(docs)/node/faq/can-storj-use-other-blockchain/page.md new file mode 100644 index 000000000..436776886 --- /dev/null +++ b/app/(docs)/node/faq/can-storj-use-other-blockchain/page.md @@ -0,0 +1,17 @@ +--- +title: Can Storj use a different blockchain for payments? +docId: 3a5981b3-588a-49ca-98d0-3eb7a2421af7 +redirects: + - /hc/en-us/articles/360060646012-Can-Storj-use-a-different-blockchain-for-payments +--- +Currently, none of the blockchains really solve the issue of high transaction costs. While there is a small user base, transaction fees on any blockchain may be low, but once they become more popular, they will face the same issue of scaling. There is a lot of discussion about how to address high fees for Layer 1 transactions on the Ethereum blockchain, which is currently one used by many popular projects. And for good reason. No other developer community can match ETH, which comes with a lot of upsides. Storj is committed to the Ethereum platform to take advantage of its many opportunities and great developer community. + +Switching blockchains would either mean you end up on a less popular blockchain which makes it less secure, and harder for customers and node operators to use as it would most likely be relying on a less active developer community. Or you may get lucky and pick the blockchain of the future, which will then be overloaded and most likely, eventually run into the exact same scaling issues. + +The Ethereum roadmap actually has a lot of promising developments to alleviate the scaling issues it’s facing now, zk-rollups being one of them. Right now the best approach is to use a Layer 2 solution like zkSync instead of taking a gamble on a less proven blockchain. + + +Our project already experienced moving blockchains in the past, where we migrated the Counterparty based SJCX token (running on the Bitcoin blockchain) to the STORJ ERC-20 token on the Ethereum blockchain at the time when Bitcoin had run into scaling issues making Counterparty token transactions very expensive to send. While initially the move alleviated the issue with transaction fees, now the Ethereum blockchain is experiencing the same scaling issues and high fees. So, the best approach is to use a Layer 2 solution like Rollups ([zkSync](docId:6TX_ve1PyUrXuwax-mWWw) in particular), until Ethereum releases version 2.0 to further address scaling issues. + + +Thanks to René Smeekes (@BrightSilence) for summarizing all reasons in one [post](https://forum.storj.io/t/move-storj-to-the-xrpl-for-faster-payouts/13404/8?u=alexey). \ No newline at end of file diff --git a/app/(docs)/node/faq/can-we-use-an-exchange-as-a-wallet-for-storj-tokens/page.md b/app/(docs)/node/faq/can-we-use-an-exchange-as-a-wallet-for-storj-tokens/page.md new file mode 100644 index 000000000..a71938d47 --- /dev/null +++ b/app/(docs)/node/faq/can-we-use-an-exchange-as-a-wallet-for-storj-tokens/page.md @@ -0,0 +1,19 @@ +--- +title: Can we use an exchange as a wallet for STORJ tokens? +docId: 857f3c8c-43ca-476a-9b2f-4883c415bcbf +redirects: + - /hc/en-us/articles/360060646292-Can-we-use-an-exchange-as-a-wallet-for-STORJ-tokens + - /hc/en-us/articles/360060646292 +--- +It is very important to note that an exchange address is not a valid address unless it is of the type that enables you to hold the private key yourself (decentralized exchange). See article [How do I hold STORJ? What is a valid address or compatible wallet?](docId:a045be02-e05a-11ef-9338-6045bd1fa4e3) + +If you specify an exchange address where you do not hold the private keys as your payout address, and also opt-in for [](docId:6TX_ve1PyUrXuwax-mWWw), it will be impossible to withdraw tokens from L2 (zkSync) to L1 (Ethereum) if this exchange does not yet provide support for zkSync. + +In most cases, you do not control the private keys from the deposit address of the centralized exchanges, so all the funds in such an account are under the exclusive control of the exchange. This means that they can decide whether they will allow you to access any tokens you deposit there or not. + +Since the deposit address is disposable, the exchange could also change it at any time without further notice, thus funds sent to an old deposit address after such a change could be lost. + +Most of the exchanges use a separate deposit addresses for every token and if you send STORJ to the Ethereum deposit address for example, they could be lost. Exchanges post warnings about this on their deposit addresses so you may have no recourse if you ignore the warning and deposit STORJ to the wrong exchange deposit address anyway. + + +We will not be able to assist to recover STORJ tokens if you have any problems with an exchange; in order to recover tokens, you will have to file a support ticket directly with the help desk of the exchange in question. \ No newline at end of file diff --git a/app/(docs)/node/faq/estimate-payouts/page.md b/app/(docs)/node/faq/estimate-payouts/page.md index 22d1da82c..c85b4907e 100644 --- a/app/(docs)/node/faq/estimate-payouts/page.md +++ b/app/(docs)/node/faq/estimate-payouts/page.md @@ -5,7 +5,7 @@ redirects: - /node/resources/faq/estimate-payouts --- -If you would like to estimate how much you can expect to get paid for running your Node during a given month, please follow the instructions [here](https://support.storj.io/hc/en-us/articles/360029053531-Calculate-the-current-earnings-for-v3). +If you would like to estimate how much you can expect to get paid for running your Node during a given month, please follow the instructions [here](https://forum.storj.io/t/earnings-calculator-update-2024-07-28-v14-1-0-now-shows-garbage-collection-progress-detailed-earnings-info-and-health-status-of-your-node-including-vetting-progress-and-garbage-collection-status/1794). This information is also available on the [](docId:3k4V1HFunDWHVso9b1Xt9) (docker) or [](docId:gH4m4hVZ0BkMVAoW_jA2t) diff --git a/app/(docs)/node/faq/graceful-exit-guide/page.md b/app/(docs)/node/faq/graceful-exit-guide/page.md new file mode 100644 index 000000000..0cc4b2ffa --- /dev/null +++ b/app/(docs)/node/faq/graceful-exit-guide/page.md @@ -0,0 +1,109 @@ +--- +title: Graceful Exit Guide +docId: ddd68892-8aa9-4f8c-b1d1-4cd41f077334 +redirects: + - /hc/en-us/articles/360039432051-Graceful-Exit-Guide + - /hc/en-us/articles/360039432051 +--- +*(This guide was originally published by Jens Heimbürge in [this forum thread](https://forum.storj.io/t/graceful-exit-guide/3618) and updated with a new version of the Graceful Exit implementation [later](https://forum.storj.io/t/graceful-exit-guide-new-procedure-as-of-2023-10/23882). Please read the thread in order to find the most recent updates and changes).* + +{% callout type="warning" %} +Warning: Read this carefully before you start +Please read the following information carefully and ask any questions your might have on this forum thread and this one before executing graceful exit. +{% /callout %} + +# Requirements +1. Storage node has joined the network more than **15 months** ago (requirement **temporarily reduced to 6 months**). +2. Storage node is **healthy** and **hasn’t lost any significant amount of data**. Disqualification during graceful exit is possible. +3. Storage node will have **no huge downtime** during the graceful exit period (30 days). The uptime score requirement is higher during graceful exit (0.8) than it is normally (0.6). If your node has too much downtime during the graceful exit period, the graceful exit will fail and you will not get back your held amount. + +# Start Graceful Exit +Are you sure you want to start graceful exit? Did you read the information above? Do you understand that graceful exit can’t be canceled once initiated? + +Here is an example how you call graceful exit from the command prompt (Linux): +```shell +docker exec -it storagenode /app/bin/storagenode exit-satellite --config-dir /app/config + +Please be aware that by starting a graceful exit from a satellite, you will no longer be allowed to participate in repairs or uploads from that satellite. This action can not be undone. Are you sure you want to continue? y/n : y + +Domain Name Node ID Space Used +ap1.storj.io:7777 121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6 37.9 GB +us1.storj.io:7777 12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S 38.7 GB +eu1.storj.io:7777 12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs 0.8 TB + +Please enter a space delimited list of satellite domain names you would like to gracefully exit. Press enter to continue: ap1.storj.io:7777 us1.storj.io:7777 eu1.storj.io:7777 +``` + +For Windows GUI users, the exit command should look as follows, but be sure to point to your own identity and config directories (in cmd.exe): +```shell +"C:\Program Files\Storj\Storage Node\storagenode.exe" exit-satellite --config-dir "C:\Program Files\Storj\Storage Node\\" --identity-dir "C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode2" --log.output stderr + +Please be aware that by starting a graceful exit from a satellite, you will no longer be allowed to participate in repairs or uploads from that satellite. This action can not be undone. Are you sure you want to continue? y/n : y + +Domain Name Node ID Space Used +ap1.storj.io:7777 121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6 37.9 GB +us1.storj.io:7777 12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S 38.7 GB +eu1.storj.io:7777 12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs 0.8 TB + +Please enter a space delimited list of satellite domain names you would like to gracefully exit. Press enter to continue: ap1.storj.io:7777 us1.storj.io:7777 eu1.storj.io:7777 +``` + +You can exit the satellites one by one or all at the same time. + +## For multiple nodes owners +If you used multiple nodes on the same host, you have changed the `server.private-address` option in your config file. You must use this option in the exit-satellite and exit-status commands. + +For example, if you changed it to `server.private-address: 127.0.0.1:7779` and your other identity is located in `"C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode2"`, and the `config.yaml` file is located in `"C:\Program Files\Storj\Storage Node2\"` then the exit-satellite command will look like: + +```shell +"C:\Program Files\Storj\Storage Node\storagenode.exe" exit-satellite --config-dir "C:\Program Files\Storj\Storage Node2\\" --identity-dir "C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode2" --log.output stderr --server.private-address 127.0.0.1:7779 +``` + +# During Graceful Exit +You can watch the status of graceful exit as follows (example output from a test satellite): + +```shell +docker exec -it storagenode /app/bin/storagenode exit-status --config-dir /app/config --identity-dir /app/identity + +Domain Name Node ID Percent Complete Successful Completion Receipt +127.0.0.1:10000 12fbck97kqEGbWPu673CpeyrXavtqgVriyv9pCfL3mpw3yz2zN9 0.00% N N/A +``` + +From the `cmd.exe` (Windows) +```shell +"C:\Program Files\Storj\Storage Node\storagenode.exe" exit-status --config-dir "C:\Program Files\Storj\Storage Node\\" --identity-dir "C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode" --log.output stderr + +Domain Name Node ID Percent Complete Successful Completion Receipt +127.0.0.1:10000 12fbck97kqEGbWPu673CpeyrXavtqgVriyv9pCfL3mpw3yz2zN9 0.00% N N/A +``` + +For the second node with identity `"C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode2"` and `server.private-address: 127.0.0.1:7779`, and the `config.yaml` file is located in `"C:\Program Files\Storj\Storage Node2\"`: + +```shell +"C:\Program Files\Storj\Storage Node\storagenode.exe" exit-status --config-dir "C:\Program Files\Storj\Storage Node2\" --identity-dir "C:\Users\USER\AppData\Roaming\Storj\Identity\storagenode2" --log.output stderr --server.private-address 127.0.0.1:7779 +``` + +{% callout type="info" %} +The “Percent Complete” field is a relic of the old graceful exit and is no longer meaningful. It will likely be removed at some point. +{% /callout %} + +If you get the output `No graceful exit in progress.` this means graceful exit didn’t start because of the minimum node age requirement. In the storage node logs you will find additional information such as: `node is not yet eligible for graceful exit: will be eligible after 2020-04-02 01:18:23.910919 +0000 UTC.` + +In case of a crash, power failure or other outage during graceful exit, please get your storage node back online. Graceful exit will continue. + +# Finish Graceful Exit +After the graceful exit period (currently 30 days) is complete, your node will no longer be in the graceful exit stage. Either it will have succeeded (if your uptime was high enough) or it will have failed. + +At the end you will get this output: (sample output from a test satellite) + +```shell +root@kali:~# storagenode exit-status + +Domain Name Node ID Percent Complete Successful Completion Receipt +127.0 0 1:10000 12fbck97kqEGbWPu673CpeyrXavtqgVriyv9pCfL3mpw3yz2zN9 100.00% Y 0a473045022100da86329cfb4f5bb16f0702c1d073c3a8b54787311b54855bcf01a8e245250040022003ef911b3b2b2bea86ba34cd4927223f2718cd35c3b7de7cc030cd3a8ce4959a1220db55bd9fa76e8938be5a7a25c970d48bde19936e269dcf69a3ab9fa41b5486001a207508f9a6138cdc4089ea075f1553736d472cb1d3afa4397496a8eb948d121200220c08abe5dcf0051086e6fefe01 +Your node should automatically delete any remaining data for the satellite(s) it exited from when graceful exit is completed. +``` + +As long as graceful exit was successful, you will get back your held amount with the next regular payout. The “Completion Receipt” contains a signature from the satellite and is your ticket to get the payback. + +In some situations, the storage node doesn’t need to transfer 100% of the data and might finish graceful exit with a lower percentage. As long as graceful exit was successful, you should get your held back amount along with the next regular SNO payout on Layer 1, if the owed amount is above the minimum payout threshold, or if the node is opted in to zkSync Era, on Layer 2. The “Completion Receipt” contains a signature from the satellite you exited and is your ticket to get the held back amount. Please keep your nodeID, each satelliteID and each completion receipt in a safe place. With this information your can open a [support ticket](https://support.storj.io/hc/en-us/requests/new) if needed. \ No newline at end of file diff --git a/app/(docs)/node/faq/how-do-I-hold-storj-tokens/page.md b/app/(docs)/node/faq/how-do-I-hold-storj-tokens/page.md new file mode 100644 index 000000000..d06bbbb65 --- /dev/null +++ b/app/(docs)/node/faq/how-do-I-hold-storj-tokens/page.md @@ -0,0 +1,29 @@ +--- +title: How do I hold STORJ? What is a valid address or compatible wallet? +docId: a045be02-e05a-11ef-9338-6045bd1fa4e3 +metadata: + title: How do I hold STORJ tokens? What is a valid address or compatible wallet? + description: Learn how you can hold STORJ tokens and what is valid address or a compatible wallet +redirects: + - /hc/en-us/articles/360026611692-How-do-I-hold-STORJ-What-is-a-valid-address-or-compatible-wallet + - /hc/en-us/articles/360026611692-How-do-I-hold-STORJ-What-is-a-valid-address-or-compatible-wallet- + - /hc/en-us/articles/360026611692 +--- +STORJ is an ERC-20 token running on the Ethereum platform. In order to receive and hold your STORJ token payouts, you should use an ERC-20 compatible wallet to which you hold the private key yourself. Several options are available: +* [mycrypto](https://mycrypto.com/) +* [MyEtherWallet](https://www.myetherwallet.com/) +* [MetaMask](https://metamask.io/) + +You may also access a hardware wallet such as Trezor or Ledger Nano S from mycrypto or MyEtherWallet. This is the preferred and safest way to store your STORJ tokens. + +There are many more wallets available for ERC20 tokens - we only listed a few above that have proven to be most reliable/popular and offer good setup instructions and help sites. + +It is very important to note that an exchange address is not a valid address unless it is of the type that enables you to hold the private key yourself (decentralized exchange). + +Furthermore, please be sure that the ethereum address you use when you configure your storage node is one created by the wallet you choose. + +{% callout type="danger" %} +**Do not use the STORJ Token smart contract** address 0xB64ef51C888972c908CFacf59B47C1AfBC0Ab8aC as payout address! If you accidentally have specified that address in your storage node configuration as payout address, you will not be able to withdraw your funds as you are not controlling the private keys of this address yourself. If you discover that you have accidentally used the wrong payout address, please follow [these instructions](docId:bMlttgapdFJxCNAULJDIv) to change the payout address to your own wallet address. +{% /callout %} + +Storj Labs will not be able to help you recover your funds if you have used any payout address that you do not hold the private keys of yourself. \ No newline at end of file diff --git a/app/(docs)/node/faq/how-to-add-an-additional-drive/page.md b/app/(docs)/node/faq/how-to-add-an-additional-drive/page.md index 7ac632618..1ed3f0427 100644 --- a/app/(docs)/node/faq/how-to-add-an-additional-drive/page.md +++ b/app/(docs)/node/faq/how-to-add-an-additional-drive/page.md @@ -86,7 +86,7 @@ In summary: 3. if the second node is running on the same device as the first one, you need to forward `28968` to `28968`, change the `server.address:` option in the `config.yaml` (in case of binary or `docker run` with `--network host`) or `-p 28968:28967` parameter in `docker run` command (in case of docker without `--network host`). {% callout type="info" %} -See KB article [Single and multi-node Port forwarding setup](https://support.storj.io/hc/en-us/articles/360042343052-Single-and-multi-node-Port-forwarding-setup) for details. +See KB article [Single and multi-node Port forwarding setup](docId:52ea9ae6-74e2-41b4-88f1-4b1230ec27da) for details. See [](docId:y0jltT-HzKPmDefi532sd) section for general port forwarding configuration. {% /callout %} diff --git a/app/(docs)/node/faq/how-to-change-the-payment-address-for-storagenode/page.md b/app/(docs)/node/faq/how-to-change-the-payment-address-for-storagenode/page.md new file mode 100644 index 000000000..824180da4 --- /dev/null +++ b/app/(docs)/node/faq/how-to-change-the-payment-address-for-storagenode/page.md @@ -0,0 +1,8 @@ +--- +title: How to change the payment address for storagenode (v3 network) +docId: 65905400-c86d-40f3-a078-b476a522c4c5 +redirects: + - /hc/en-us/articles/360030439232-How-to-change-the-payment-address-for-storagenode-v3-network + - /hc/en-us/articles/360030439232 +--- +To change the payment address for the storagenode (v3 network), please follow the instructions in our Storage Node Installation [FAQ](docId:IsOkCjvE5sqGHcaamSB7X) section about [changing parameters](docId:bMlttgapdFJxCNAULJDIv). diff --git a/app/(docs)/node/faq/how-to-fix-a-database-disk-image-is-malformed/page.md b/app/(docs)/node/faq/how-to-fix-a-database-disk-image-is-malformed/page.md new file mode 100644 index 000000000..58007eacb --- /dev/null +++ b/app/(docs)/node/faq/how-to-fix-a-database-disk-image-is-malformed/page.md @@ -0,0 +1,162 @@ +--- +title: How to fix a "database disk image is malformed" +docId: b75703c5-1484-4a1d-88fe-eb489dfc5554 +redirects: + - /hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed + - /hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed- + - /hc/en-us/articles/360029309111 +--- +# Problem +Sometimes a Storage Node Operator may encounter the "database disk image is malformed" error in their log. This could happen during unplanned shutdown or reboot. The error indicates that one or more of the `sqlite3` databases may have become corrupted. + +# Solution +Firstly, we should try to verify the database with an embedded SQLite3 command. So, we need to have `sqlite3` installed (v3.25.2 or later). The installation steps depend on the OS. + + +1. [Stop the storagenode]() +2. Make a backup of all the sqlite3 databases. They are located in the storage folder for your data storage. For example `x:\storagenode\storage\bandwidth.db`, where `x:\storagenode` is the data folder you had specified in the `--mount type=bind,source=x:\storagenode,destination=/app/config` option of the `docker run` command for your storagenode, or `x:\storagenode\storage` in case of using the Windows GUI, in the `storage.path:` option of the [config.yaml](docId:gDXZgLlP_rcSW8SuflgqS) file. +3. Check each database for errors. We will use `bandwidth.db` as an example in this guide. + +{% tabs %} +{% tab label="Docker version of sqlite3" %} +We will use Docker instead of direct installation (this option is available only for x86_64 CPUs, for arm-based boards you will need to install sqlite3 via the package manager of your OS). See the next tab. + +replace ${PWD} with an absolute path to the databases location, or simple switch the current location to there +```shell +docker run --rm -it --mount type=bind,source=${PWD},destination=/data sstc/sqlite3 find . -maxdepth 1 -iname "*.db" -print0 -exec sqlite3 '{}' 'PRAGMA integrity_check;' ';' +``` +{% /tab %} +{% tab label="Direct installation of sqlite3" %} +{% tabs %} +{% tab label="Linux" %} +```bash +sudo apt update && sudo apt install sqlite3 -y +``` +{% /tab %} +{% tab label="Windows" %} + +[https://www.sqlitetutorial.net/download-install-sqlite/](https://www.sqlitetutorial.net/download-install-sqlite/) +{% /tab %} +{% /tabs %} + +Make sure that the version is v3.25.2 or later, otherwise the check will not work correctly. +```shell +sqlite3 --version +``` +perform the integrity check for each database, for example for `bandwidth.db`: +```shell +sqlite3 /path/to/storage/bandwidth.db "PRAGMA integrity_check;" +``` + +Or check all databases with help of shell commands: +{% tabs %} +{% tab label="Linux" %} +```bash +find /path/to/storage/ -maxdepth 1 -iname "*.db" -print0 -exec sqlite3 '{}' 'PRAGMA integrity_check;' ';' +``` +{% /tab %} +{% tab label="Windows" %} +```powershell +Get-ChildItem X:\storagenode\storage\*.db -File | %{$_.Name + " " + $(sqlite3.exe $_.FullName "PRAGMA integrity_check;")} +``` +{% /tab %} +{% /tabs %} +{% /tab %} +{% /tabs %} + +4. If you see errors in the output, then the check did not pass. We will unload all uncorrupted data and then load it back. But this could sometimes fail, too. If no errors occur here, you can skip all the following steps and start the storagenode again. +5. If you were not lucky and the check failed, then please try to fix the corrupted database(s) as shown below. + +6. Open a shell +{% tabs %} +{% tab label="Docker version of sqlite3" %} +Open a shell Inside the container: +```shell +docker run --rm -it --mount type=bind,source=x:\storagenode\storage,destination=/storage sstc/sqlite3 sh +``` +{% callout type="info" %} +Tip. You can use tmpfs to restore your databases. It uses memory instead of disk and should take a lot less time than on HDD (you can read more about usage of tmpfs with Docker in the Use tmpfs mounts guide or this forum comment). For Windows or MacOS you must increase the allocated RAM for the docker's VM via Docker desktop application to fit a double size of the greatest corrupted database file in case of usage of tmpfs. +{% /callout %} +{% /tab %} +{% tab label="Direct installation of sqlite3" %} +You could use your shell directly if you have sqlite3 installed. In that case, use the path to your storage instead of `"/storage/"` across this guide below. + +For Windows with local sqlite3 installed, we recommend to use a PowerShell to execute the commands below. Don't forget to replace the `"/storage/"` folder with your local path to the folder where the databases are stored. If the `sqlite3.exe` executable is not in the system variable `PATH`, then you should specify the full path to it or run from the location of the executable. +{% /tab %} +{% /tabs %} + +7. Now run the following commands in the shell. You need to repeat steps 7 to 12 for each corrupted sqlite3 database: +```shell +cp /storage/bandwidth.db /storage/bandwidth.db.bak +sqlite3 /storage/bandwidth.db +``` + +8. You will see a prompt from sqlite3. Run this SQL script: +```sql +.mode insert +.output /storage/dump_all.sql +.dump +.exit +``` + +9. We will edit the SQL file dump_all.sql +{% tabs %} +{% tab label="Linux or docker version" %} +``` +{ echo "PRAGMA synchronous = OFF ;"; cat /storage/dump_all.sql; } | grep -v -e TRANSACTION -e ROLLBACK -e COMMIT >/storage/dump_all_notrans.sql +``` +{% /tab %} +{% tab label="PowerShell (Windows) with a local sqlite3 version" %} +``` +$(echo "PRAGMA synchronous = OFF ;"; Get-Content dump_all.sql) | Select-String -NotMatch "TRANSACTION|ROLLBACK|COMMIT" | Set-Content -Encoding utf8 dump_all_notrans.sql +``` +{% /tab %} +{% /tabs %} + +10. Remove the corrupted database (make sure that you have a backup!) +```shell +rm /storage/bandwidth.db +``` + +11. Now we will load the unloaded data into the new database +```shell +sqlite3 /storage/bandwidth.db ".read /storage/dump_all_notrans.sql" +``` + +12. Check that the new database (bandwidth.db in our example) has a size larger than 0: + +{% tabs %} +{% tab label="Linux or docker version" %} +```shell +ls -l /storage/bandwidth.db +``` +{% /tab %} +{% tab label="PowerShell (Windows) with a local sqlite3 version" %} +```powershell +ls /storage/bandwidth.db +``` +{% /tab %} +{% /tabs %} +13. Exit from the container (skip this step, if you use a directly installed sqlite3) +```shell +exit +``` +14. If you are lucky and all corrupted `sqlite3` databases are fixed, then you can start the storagenode again. + +{% callout type="warning" %} +Warning. If you were not successful with the fix of the database, then your stat is lost. + +You need to follow the guide [How to fix database: file is not a database error](docId:f8bed9a6-755f-4860-a5bb-ce2b1a51f8b0). +{% /callout %} + +# Prevention +On Windows: disable the write cache. Consider migrating to the [Windows GUI](docId:LAtWfg_LTgbI5yJ8PILUI) instead of using Docker. + +On Unraid: update to the latest version of the platform (the bug is fixed in the 6.8.0-rc5 as seen in [this comment](https://forums.unraid.net/bug-reports/prereleases/sqlite-data-corruption-testing-r664/page/4/?tab=comments#comment-6650)) or rollback to version [6.6.7](https://forums.unraid.net/topic/80439-downgraded-back-to-667-due-to-sqlite-corruption/). + +On Docker: use the updated docker run command from the documentation: [](docId:HaDkV_0aWg9OJoBe53o-J) + +## Common Problems +Make sure that you are not using NFS or SMB to connect to the storage, they are not compatible with SQLite. The only working network protocol is iSCSI. + +Make sure that your external USB drive has enough power and it does not turn off during operations. It's better to avoid using them and use only internal drives. \ No newline at end of file diff --git a/app/(docs)/node/faq/how-to-fix-database-file-is-not-a-database-error/page.md b/app/(docs)/node/faq/how-to-fix-database-file-is-not-a-database-error/page.md new file mode 100644 index 000000000..f2d40940f --- /dev/null +++ b/app/(docs)/node/faq/how-to-fix-database-file-is-not-a-database-error/page.md @@ -0,0 +1,42 @@ +--- +title: "How to fix database: file is not a database error" +docId: f8bed9a6-755f-4860-a5bb-ce2b1a51f8b0 +redirects: + - /hc/en-us/articles/4403032417044-How-to-fix-database-file-is-not-a-database-error + - /hc/en-us/articles/4403032417044 +--- +If your node was abruptly terminated due to power failure, the database file could be irreversible corrupted, you can see an error `Error starting master database on storagenode: database: file is not a database` in [your logs](docId:O68S24Iww4ZEnVk8yO7Mv). + +# Find out which database is corrupted +The Storage Node software might not mention which database is corrupted or errors displayed are not immediately understandable to the node operator. In this case we recommend to check all databases, as described in the article [How to fix a "database disk image is malformed"](docId:b75703c5-1484-4a1d-88fe-eb489dfc5554). + +{% callout type="warning" %} +Please note - the linked article will not help to recover database in state "file is not a database." +{% /callout %} + +Once you discovered which database is irreversibly corrupted, you can continue with fixing. + +# Recreate corrupted database(s) +1. [Stop the storagenode](docId:Zh_lD6UPciHT53wOWuAoD) +2. Delete the corrupted database(s), include file(s) with `.db-shm` and `.db-wal` extensions. +3. Move all remaining databases (`*.db`) to the backup folder (*the database files are placed in the storage location by default [unless you have changed that](https://forum.storj.io/search?q=move%20databases%20%23database%20%23sno-category%3Asno-faq%20)*). + +{% callout type="warning" %} +Please note, no databases should remain in the current database location, otherwise they will not be recreated in the next steps. The node will recreate all databases only if there wouldn't be any. +{% /callout %} + +4. [Start the storagenode](docId:Zh_lD6UPciHT53wOWuAoD) + +*it will re-create all databases, but they will be empty. Wait until all migrations are applied*. + +5. Stop the storagenode +6. Move backed up databases back with replace +7. Start the storagenode +8. [Check your logs](docId:O68S24Iww4ZEnVk8yO7Mv) + +{% callout type="warning" %} +Please note - since we recreated the database(s) from scratch, some statistics such as bandwidth or disk usage and payout information for shutdown satellites (like the now deprecated Stefan, Europe-North-1 and US2 satellites) could be lost, however it will not prevent the storage node from working. +{% /callout %} + +# Still have issues? +Ask on the [forum](https://forum.storj.io)! \ No newline at end of file diff --git a/app/(docs)/node/faq/install-storagenode-on-raspberry-pi3-or-higher-version/page.md b/app/(docs)/node/faq/install-storagenode-on-raspberry-pi3-or-higher-version/page.md new file mode 100644 index 000000000..1bfd42cc1 --- /dev/null +++ b/app/(docs)/node/faq/install-storagenode-on-raspberry-pi3-or-higher-version/page.md @@ -0,0 +1,303 @@ +--- +title: Install storagenode on Raspberry Pi3 or higher version +docId: 50382094-408e-4ff7-bf42-22356de16303 +redirects: + - /hc/en-us/articles/360026612332-Install-storagenode-on-Raspberry-Pi3-or-higher-version + - /hc/en-us/articles/360026612332 +--- +Raspberry Pi3 model B is a microcomputer for doing almost anything. Let's use it for installing storagenode for V3 of the Storj Network! + +*In this guide we assume that you have a Raspberry Pi 3 (or higher), set up with Raspberry Pi OS Lite (without Graphical User Interface). [To set up Raspberry Pi OS Lite, please refer to the official documentation here.](https://www.raspberrypi.com/software/)* + + +# Prepare +Set up your Pi to [allow SSH](https://www.raspberrypi.com/documentation/computers/remote-access.html#ssh) (it will make your life a lot easier). + +{% callout type="info" %} +Note. If you want to enable SSH on headless Pi, you can enable this checkbox during image customization or manually later: you should place an empty ssh file in the boot partition on your SD-card. This will enable the ssh daemon on your Pi after boot. +``` +sudo touch /boot/firmware/ssh +``` +{% /callout %} + + +Connect to the RPi via ssh and follow the steps below. + +If your SD card is big enough, you can extend the system to use the whole available space (by default you have only a few MB in the root partition). + +Run the `raspi-config` to extend it: +```shell +sudo raspi-config +``` +Navigate to the **Advanced Options**, then choose **Expand Filesystem**. After a while you should see a screen like this: + +![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/rpi3/mceclip0.png) + +When you exit from the `raspi-config`, it will suggest you to reboot. Please do it. + +{% callout type="warning" %} +It is recommended to replace the default password for the default user **pi** for security reasons. Please do so. +{% /callout %} + +Please configure the [passwordless login via ssh](https://www.raspberrypi.com/documentation/computers/remote-access.html#configure-ssh-without-a-password) and after that, make sure that you can login with your public key, after which you can disable the password authentication completely. + +To continue with this guide, please use the `screen` command, this will enable you to still reconnect to a disconnected session using the `screen -x` command after logging in via `ssh`. + +```shell +sudo apt-get update +sudo apt-get install screen +screen +``` + +# Formatting and mounting your HDD + +{% callout type="danger" %} +Please do not reformat your HDD if it already contains the storage node's data and you want only to mount it after an OS reinstall! +{% /callout %} + +## Format your hard drive +If you just reinstalled the system on the SD card, you can skip this step and continue to [Mount your hard drive](#mount-your-hard-drive) below, otherwise, please proceed with: + +```shell +sudo apt-get install gdisk -y +sudo gdisk /dev/sda +``` + +Then, type `n`, and press **Enter** until you exit out of the command. Write changes to the disk: `w`, confirm by `y`. + +Now we will format the drive to use the **ext4** filesystem + +{% callout type="warning" %} +Do not try to use **btrfs** or **zfs** on models with RAM less than 4GiB! The **exFat** is strictly not recommended in any setup, the **ntfs** uses a lot of RAM on Linux and you can lose data, if this disk were used on Windows (modern Windows uses dedup and compress features by default and they are not fully supported under Linux). +{% /callout %} + +```shell +sudo mkfs.ext4 /dev/sda1 +``` + +## Mount your hard drive +```shell +sudo mkdir /mnt/storj +lsblk +``` + +Find your drive and request its `UUID`: + +```shell +sudo blkid /dev/ +``` + +Copy `UUID` and open the `/etc/fstab` file in a text editor: + +```shell +sudo nano /etc/fstab +``` + +Then add the following line to the end (replace `` with the copied `UUID`): + +``` +UUID= /mnt/storj ext4 defaults 0 2 +``` + +Save the `/etc/fstab` (**Ctrl-O** and confirm saving, then exit with **Ctrl-X**) + +Check your mount: + +```shell +sudo mount -a +``` + +It should not print any errors. Otherwise - please, check the `UUID` and the filesystem type. Do not reboot until you fix the error, otherwise your Pi may stuck on boot. + +To check that all ok: + +```shell +df -HT +``` + +You should see your disk and free space on it, mounted to /mnt/storj. + +If mount is ok, you can proceed further. + +```shell +sudo chown -R pi:pi /mnt/storj +``` + +To add cgroup memory support (to prevent an OOM hang of your Pi 3 B/B+): + +{% callout type="warning" %} +Note. This fix is tested only on Raspberry Pi 3 B/B+ models. +{% /callout %} + +```shell +sudo nano /boot/cmdline.txt +``` + +If you are using a Pi3 B/B+ please add `cgroup_enable=memory cgroup_memory=1 swapaccount=1` to the end of the line. The resulting string should look like this: + +``` +dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=XXXXXX-XX rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=memory cgroup_memory=1 swapaccount=1 +``` + +Save the file (**Ctrl-X**, confirm saving) and reboot: + +```shell +sudo reboot +``` + +# Create your node Identity +You can create an identity directly on your Pi. It will take at least 24 hours. But you may prefer to create the identity on a more powerful desktop or laptop where identity creation would take a lot less time, and then move the identity files to the Pi. + +## Create a node Identity on your PI +Download the identity binary for the RPi: [identity_linux_arm.zip](https://github.com/storj/storj/releases/latest/download/identity_linux_arm.zip) + +```shell +sudo apt-get install unzip curl -y +curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_arm.zip -o identity_linux_arm.zip +unzip ~/identity_linux_arm.zip +``` + +Generate the Identity: + +```shell +./identity_linux_arm create storagenode +``` +Your identity will be generated here: `/home/pi/.local/share/storj/identity/storagenode` + +## Create a node Identity on your desktop +Download the identity binary for your platform: + +* Mac OS: [identity_darwin_amd64.zip](https://github.com/storj/storj/releases/latest/download/identity_darwin_amd64.zip) +* Linux: [identity_linux_amd64.zip](https://github.com/storj/storj/releases/latest/download/identity_linux_amd64.zip) +* Windows 10: [identity_windows_amd64.zip](https://github.com/storj/storj/releases/latest/download/identity_windows_amd64.zip) + +Unpack the binary to the preferred folder. Let´s suppose it is your home folder. + +Then generate the Identity (this example is for Windows): + +```powershell +./identity_windows_amd64.exe create storagenode +``` + +Your Identity will be generated here: + +* Windows: `$Env:APPDATA/Storj/Identity/storagenode` (Powershell) or `%APPDATA%\Storj\Identity\storagenode` if you use a `cmd.exe` or Explorer +* MacOS: `/Users/USER/Library/Application Support/Storj/identity/storagenode` +* Linux: `~/.local/share/storj/identity/storagenode` + +{% callout type="info" %} +Note. You can also specify to place the identity files into another folder using the option `--identity-dir` +{% /callout %} + +## Sign your node Identity +```powershell +./identity_windows_amd64.exe authorize storagenode user@example.com:ohihioHiohohIOhUyTUfyufVJHvufUyvJHvyFTYdhVJGionOoHib +``` +Where `user@example.com:ohihioHiohohIOhUyTUfyufVJHvufUyvJHvyFTYdhVJGionOoHib` is your authorization token you [have generated](docId:v-fUvPqySvUwTMF-od6hD). + +We recommend to move your signed identity from the SD card to the HDD with the storagenode data, so if the SD card fails, you will not lose your identity. In the event of a hard drive failure, your node would be lost anyway, so it is better to store identity and data together in different folders on the hard drive. + +{% callout type="info" %} +Note: You cannot authorize your identity if you didn't get your authorization token. + +Note: The email address is a part of the authorization token and should be copied including all characters. + +Note: You can specify the identity folder with an `--identity-dir` option. +{% /callout %} + +## Copy your node Identity to the RPi +In case you generated and authorized your node identity on a desktop/laptop computer instead of directly on the RPi to save time, you can copy it to the RPi afterward, as follows: + +### Copy the Identity to the RPi from Linux or Mac +Copy your node identity from your desktop to the RPi: [https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh](https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh) + +### Copy the Identity to the RPi from a Windows machine +Copy your node identity from your Windows machine to the RPi: [https://unix.stackexchange.com/questions/92715/can-i-transfer-files-using-ssh](https://unix.stackexchange.com/questions/92715/can-i-transfer-files-using-ssh) + + +# Install Docker +To install Docker on the RPi, be sure to use the following installation method: +```shell +curl -sSL https://get.docker.com | sh +``` + +To enable docker to start after reboot: +```shell +sudo systemctl enable docker.service +sudo systemctl enable containerd.service +``` + +# Download Docker container with storagenode +```shell +docker pull storjlabs/storagenode:latest +``` + +# Port forwarding +In our example, we will need to have port no. `28967` forwarded to our RPi. Use the steps for Linux OS from the article [Port forwarding](docId:y0jltT-HzKPmDefi532sd) to perform port forwarding to your Raspberry Pi. + +You can take a look at [this article](https://www.noip.com/support/knowledgebase/install-linux-3-x-dynamic-update-client-duc) to learn how to install the no-ip software, if you have a dynamic public IP. Note that if you use the free version of no-ip, you will need to periodically renew it every month so it will continue working properly. + +Please be sure to check that your port is open [here](https://www.yougetsignal.com/tools/open-ports/). + +# Setup the storagenode before the run +Please setup your node first as described here. + +```shell +docker run --rm -e SETUP="true" \ +--mount type=bind,source="",destination=/app/identity \ +--mount type=bind,source="",destination=/app/config \ +--name storagenode storjlabs/storagenode:latest +``` + +For our example we will use these parameters: + +* `/home/pi/.local/share/storj/identity/storagenode` is the location of your identity files. You can copy the absolute path from the output of the identity command you ran earlier (second to last line below). We recommend to move it to the HDD, for example, to `/mnt/storj/storagenode/identity`. In this case replace the string `/home/pi/.local/share/storj/identity/storagenode` with your actual path, e.g. `/mnt/storj/storagenode/identity`. It should contain 6 files belonging to the identity. +* `/mnt/storj/storagenode`: this is the local directory where you want files to be stored on your hard drive for the network. + +So the initial setup command will looks like: + +```shell +docker run --rm -e SETUP="true" \ +--mount type=bind,source="/home/pi/.local/share/storj/identity/storagenode",destination=/app/identity \ +--mount type=bind,source="/mnt/storj/storagenode",destination=/app/config \ +--name storagenode storjlabs/storagenode:latest +``` + +# Run the Docker container with storagenode +We recommend to create a subfolder for the storagenode on your disk, as this would prevent your node from starting in the event that the mount accidentally fails for any reason. We will assume further that this subfolder is called `storagenode`. + +Parameters used in the Docker run command: + +* `WALLET`: ERC20 compatible ethereum address for STORJ token payments (use the same payout address for all nodes if you are running multiple nodes.) If you are opting in to zkSync L2 payouts, please use your zkSync wallet address. You can read more about choosing L1 or L2 payout options and how to configure zkSync [here](docId:6TX_ve1PyUrXuwax-mWWw). +* `EMAIL`: (optional) email address so that we can notify you when a new version has been released, or when the node goes offline and return online, about suspension and disqualification +* `ADDRESS`: external IP address or the DDNS you configured and the port you opened on your router. + +{% callout type="info" %} +Note: If you are using a custom port other than `28967`, then you have to change the `-p 28967:28967` to `-p other_port:28967` +{% /callout %} + +* `STORAGE`: How much disk space you want to allocate to the Storj network +* `/home/pi/.local/share/storj/identity/storagenode`: This is the location of your identity files. You can copy the absolute path from the output of the identity command you ran earlier (second to last line below). We recommend to move it to the HDD, for example, to the `/mnt/storj/storagenode/identity`. In this case replace the string `/home/pi/.local/share/storj/identity/storagenode` with your actual path, e.g. `/mnt/storj/storagenode/identity`. It should contain 6 files belonging to the identity. +* `/mnt/storj/storagenode`: local directory where you want files to be stored on your hard drive for the network. + +Example of `docker run` command: + +```shell +docker run -d --restart always --stop-timeout 300 \ +-p 28967:28967/tcp \ +-p 28967:28967/udp \ +-p 127.0.0.1:14002:14002 \ +-e WALLET="0x0000..." \ +-e EMAIL="your@email.com" \ +-e ADDRESS="externaladdress:28967" \ +-e STORAGE="2TB" \ +--memory=800m \ +--log-opt max-size=50m \ +--log-opt max-file=10 \ +--mount type=bind,source=/home/pi/.local/share/storj/identity/storagenode,destination=/app/identity \ +--mount type=bind,source=/mnt/storj/storagenode,destination=/app/config \ +--name storagenode storjlabs/storagenode:latest +``` + +# Setup Watchtower to keep your storagenode updated +The storagenode software should be updated in a timely fashion to avoid node suspension or disqualification. Please follow the guide [here](docId:ojIatmeXyCN4rc-GPx8yW). \ No newline at end of file diff --git a/app/(docs)/node/faq/is-account-required/page.md b/app/(docs)/node/faq/is-account-required/page.md new file mode 100644 index 000000000..fd5fda0d7 --- /dev/null +++ b/app/(docs)/node/faq/is-account-required/page.md @@ -0,0 +1,14 @@ +--- +title: Is an account required to rent out drive space ? +docId: 82991d9a-a306-4ffb-a314-6ead39c8cfee +redirects: + - /hc/en-us/articles/360026892091-Is-an-account-required-to-rent-out-drive-space +--- + +**No**. You do not need to create an account to start earning STORJ tokens by renting your drive space. + +All you need to do is run the storagenode software and [configure it properly](/node). + +Note that [the V2 network has been shutdown in January 2020](https://forum.storj.io/t/v2-is-officially-shut-down/4250) as v3 in [Production](https://www.storj.io/blog/announcing-early-access-for-tardigrade) now, so it is not possible to start farming with new nodes on V2 anymore. + +You can learn about how to sign up to become a Storage Node Operator on the V3 network [here](docId:kjMiGo7HTr4v_qwD5Iqc7). \ No newline at end of file diff --git a/app/(docs)/node/faq/low-payouts/page.md b/app/(docs)/node/faq/low-payouts/page.md index aec19d3df..50503f071 100644 --- a/app/(docs)/node/faq/low-payouts/page.md +++ b/app/(docs)/node/faq/low-payouts/page.md @@ -5,7 +5,7 @@ redirects: - /node/resources/faq/low-payouts --- -If you believe you should have gotten higher payouts, please run [the earnings estimator](https://support.storj.io/hc/en-us/articles/360029053531-Calculate-the-current-earnings-for-v3) and then compare each Satellite’s payouts to the amount you received in the transactions sent to your payout address for the month in question. Please wait to submit any support ticket until we have announced that all payouts have been completed for the month. Payouts are sent monthly, in the first two weeks after the month being paid is done. Please also consider that part of your payouts will be held back during the first nine months of operation, as explained here: [](docId:TPy59W2Kvxsj50ERIZ1hU) +If you believe you should have gotten higher payouts, please run [the earnings estimator](https://forum.storj.io/t/earnings-calculator-update-2024-07-28-v14-1-0-now-shows-garbage-collection-progress-detailed-earnings-info-and-health-status-of-your-node-including-vetting-progress-and-garbage-collection-status/1794) and then compare each Satellite’s payouts to the amount you received in the transactions sent to your payout address for the month in question. Please wait to submit any support ticket until we have announced that all payouts have been completed for the month. Payouts are sent monthly, in the first two weeks after the month being paid is done. Please also consider that part of your payouts will be held back during the first nine months of operation, as explained here: [](docId:TPy59W2Kvxsj50ERIZ1hU) The bottom section of the earnings estimator shows the amount you can expect to receive immediately vs the amount held back, depending which stage you’re in (months 1-3, months 4-6, or months 7-9). If your Node has been running more than nine months already, you’ll receive the full payout with no held back amount. diff --git a/app/(docs)/node/faq/machine-restart-shutdown/page.md b/app/(docs)/node/faq/machine-restart-shutdown/page.md index 9db873bb2..6c2026083 100644 --- a/app/(docs)/node/faq/machine-restart-shutdown/page.md +++ b/app/(docs)/node/faq/machine-restart-shutdown/page.md @@ -17,6 +17,6 @@ In case of using the Windows GUI, the service will not restart automatically and Such failures should be attended to immediately as they can lead to the node getting disqualified. -[Here are instructions on how to fix a malformed database disk image](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed-). If the database is not recognized ("file is not a database"), recovery of this database will be impossible, and you will need to [recreate it](https://support.storj.io/hc/en-us/articles/4403032417044-How-to-fix-database-file-is-not-a-database-error). +[Here are instructions on how to fix a malformed database disk image](docId:b75703c5-1484-4a1d-88fe-eb489dfc5554). If the database is not recognized ("file is not a database"), recovery of this database will be impossible, and you will need to [recreate it](docId:f8bed9a6-755f-4860-a5bb-ce2b1a51f8b0). If you need assistance, please ask on our [forum](https://forum.storj.io/c/sno-category). diff --git a/app/(docs)/node/faq/page.md b/app/(docs)/node/faq/page.md index 1c470241e..6ef8f6756 100644 --- a/app/(docs)/node/faq/page.md +++ b/app/(docs)/node/faq/page.md @@ -46,6 +46,20 @@ metadata: [](docId:6xwcyBYTMDNojI58mxXSd) +### Wallet address + +[](docId:66d6c295-53e4-4308-9cde-1c6193155f52) + +[](docId:3a5981b3-588a-49ca-98d0-3eb7a2421af7) + +[](docId:37344d79-8559-46e3-95c8-5848a9f2ddbd) + +[](docId:a045be02-e05a-11ef-9338-6045bd1fa4e3) + +[](docId:857f3c8c-43ca-476a-9b2f-4883c415bcbf) + +[](docId:65905400-c86d-40f3-a078-b476a522c4c5) + ### Remote access [](docId:pueo_P_wgMERT0DdEn2pr) @@ -82,6 +96,12 @@ metadata: [](docId:M-Yv2DFc-OFZ4r9Q8b8HY) +[](docId:52ea9ae6-74e2-41b4-88f1-4b1230ec27da) + +[](docId:2832eccf-8c63-4563-abd7-92ede9dece83) + +[](docId:6514f956-dfeb-44a6-81a6-7f8a245af97b) + ### Updates [](docId:CfmXIRjM5X5Sh8KDGC1qF) diff --git a/app/(docs)/node/faq/running-node-via-pia/page.md b/app/(docs)/node/faq/running-node-via-pia/page.md new file mode 100644 index 000000000..d67a2426a --- /dev/null +++ b/app/(docs)/node/faq/running-node-via-pia/page.md @@ -0,0 +1,388 @@ +--- +title: Running a V3 Storage Node with PIA (VPN) +docId: 1a788e13-f8d1-4ff7-a2af-578d4eefefed +metadata: + title: Running a V3 Storage Node with VPN + description: Learn how to connect your node to the network through CGNAT. +redirects: + - /hc/en-us/articles/360026892971-Running-a-V3-Storage-Node-with-PIA-VPN +--- + +*Can't connect to the network via TCP directly?, try this guide.* + +*Run a storage node anonymously and safely anywhere in the world without the possibility of censorship from ISPs, governments or the necessity of router configuration.* + + + +# 1. Introduction + +Internet anonymity and freedom are becoming less and less common in the current digital age, both corporations and governments are increasingly interested in monitoring and tracking the user’s activity on the World Wide Web, from mass surveillance programs to ISP blocking of certain types of network traffic or even blocking entire websites. There are many countries in the world that are blocking our storagenode software from being able to connect to the network. More so, some ISPs allow their clients to use only http/https or use a carrier-grade NAT for them. All of these issues prevent the storagenode user from ever being able to run a successful storage node. ISPs are continuously monitoring the client’s network activity, so even if the storage node operator manages to successfully connect to the network, the ISP will know he or she is running storagenode, which can lead to network throttling or even ISP warnings of unusual network activity. Configuring port forwarding in the router settings could be a tedious task for a lot of people unfamiliar with port forwarding. In this guide we will set up a VPN called _[Private Internet Access (PIA) ™](https://www.privateinternetaccess.com/)_ and configure storagenode to connect the storage node to the network through PIA. In this guide we will do the following: + +1. Set up a hostname with a service called [NoIP](http://www.noip.com/) to continuously keep track of the VPN's public IP address to prevent the node from going offline. +2. Private internet access will be downloaded and configured to be able to use port forwarding. +3. storagenode will be configured to use both the NoIP hostname and the given TCP port by PIA. +4. Different techniques will be used to test if the storage node(s) are working correctly. + + +# 2. Why use Private Internet Access + +Private Internet Access (PIA) is one of the safest and most popular VPN’s out there, it is easy to setup and offers a large number of advanced settings (e.g. the ability to request port forwarding), which will be used in this guide. Although PIA is not free, it is also not very expensive, at $3.33/month for a yearly contract (at time of writing this guide) it is very affordable. + +For Operators not interested in internet privacy (e.g. private browsing) and who want to rent out only a few GBs of data, the cost of paying for a VPN will not be justified. + +However, Operators that value internet privacy or are unable to connect to the storage node network due to a variety of issues discussed in the introduction, and who plan to rent out more than 500 GB, can expect to pay for their VPN through their earnings from running storagenode. The other large advantage for Storage Node Operators is that PIA accepts payments in Bitcoin/Etherium/etc., which makes paying with the Storj earnings even easier, since this will only involve selling the STORJ tokens earned on an exchange for Bitcoin/Etherium/etc., which can then directly be used to pay the VPN invoice. The workflow covered in this guide can of course also be applied to other VPNs. Storj does not endorse any particular VPN service, every user is free to decide for themselves which VPN company they want to select. + +There are plenty of other competitors in that space: +* [portmap.io](https://portmap.io/) +* [ngrok](https://ngrok.com/) +* [PureVPN](https://www.purevpn.com/) +* [AirVPN](https://airvpn.org/) +* etc... + +## The positives and negatives of using Private Internet Access in combination with storagenode +### Upsides + +1. Up to five machines can be connected with a single private internet access subscription at once, which means that five connections can be configured on five machines. +2. The TCP port assigned by PIA through which the node will connect to the network remains static as long as the connection is made to the same VPN gateway. +3. There are 8x VPN gateways available that allow port forwarding. + +### Downsides + +1. The PIA public IP address changes continuously, which required the setup of a DDNS domain name to prevent the node from going offline. +2. PIA is not free and depending on your storagenode operation returns, it might or might not be economically viable. +3. PIA slows down the internet connection by about 30-60% in most cases (highly variable through the day). + +# 3. Storagenode download, installation and initial configuration + +In this step, we will download and install storagenode. If you have already done so, please skip this step. + +## Windows architecture check + +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 your system (Figure 4.1). The system architecture in this guide is 64-bit (x64), indicating that the 64-bit version of the storagenode binary should be downloaded (Figure 3.1). + +![System architecture check](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cc2ed0a8.png) + +***Figure 3.1.** System architecture check.* + +## Linux, Ubuntu and Mac architecture check + +In Linux. Ubuntu or Mac open a terminal and type in the following command: +``` +uname -a +``` +This command should return a text similar to the following: +``` +Linux behrooz 2.6.32-5-amd64 #1 SMP Tue Apr 4 12:24:40 UTC 2017 \*x86_64** GNU/Linux* +``` +This indicates that the user has an amd64 (64-bit) architecture system. If it prints out x86 instead, the system has a 32-bit architecture. + +## 3.1. Install Docker + +To use the docker image of the storagenode, you must have Docker installed. +If you want to install node as a service, please skip this step. + +For Windows: [https://docs.docker.com/docker-for-windows/install/](https://docs.docker.com/docker-for-windows/install/) + +For MacOS: [https://docs.docker.com/docker-for-mac/install/](https://docs.docker.com/docker-for-mac/install/) + +For Linux:  +* Ubuntu: [https://docs.docker.com/install/linux/docker-ce/ubuntu/](https://docs.docker.com/install/linux/docker-ce/ubuntu/) +* CentOS: [https://docs.docker.com/install/linux/docker-ce/centos/](https://docs.docker.com/install/linux/docker-ce/centos/) +* Debian: [https://docs.docker.com/install/linux/docker-ce/debian/](https://docs.docker.com/install/linux/docker-ce/debian/) +* Fedora: [https://docs.docker.com/install/linux/docker-ce/fedora/](https://docs.docker.com/install/linux/docker-ce/fedora/) + +## 3.2. Create Identity + +You need to [create a new Identity](docId:aT6VAB297OWLd4vqeXxf5) for your storage node, if you don't have one. + +## 3.3. Authorize your identity with an authorization token + +If you [requested an authorization token](docId:v-fUvPqySvUwTMF-od6hD), you should get your one-time authorization token. This token can be used only once. For the second time it will not be valid. + +[Sign the Identity](docId:aT6VAB297OWLd4vqeXxf5#3-authorize-the-identity) and Backup the Identity folder. + +## 3.4. Download a storagenode +{% quick-links %} +{% quick-link title="⌨️ CLI Install" href="docId:rz3s9lC3qAQHYSl37ngBN" /%} + +{% quick-link title="🖥 GUI Install - Windows" href="docId:5shJebpS3baWj6LDV5ANQ" /%} +{% /quick-links %} + +## 3.5. Wallet address + +The article [](docId:66d6c295-53e4-4308-9cde-1c6193155f52) will let you create a valid STORJ token 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](docId:a045be02-e05a-11ef-9338-6045bd1fa4e3), you can continue with the steps below. + +## 3.6. Storage Location + +You will need a place to store the data. It could be a dedicated HDD (or even RAID, if you want). + +We suggest to use a subfolder for the data (it will prevent the storage node from start if the disk would disconnect for some reason). + +{% callout type="warning" %} +***Note.** The network connected drive could work, but not recommended and not supported.* +{% /callout %} + +## 3.7. Storage Size + +Next, you have to make a decision how much space you want to rent out to the network. The minimum allotted space is 500 GB however, you should allow for 10% overhead. + +# 4. DDNS hostname configuration + +When registered with a VPN gateway, your public IP address will change to the address of the gateway. This is done for security and privacy reasons by Private Internet Access (PIA) or whatever VPN service you choose, so you don’t give away your location. Although we can configure PIA to stay online for long periods of time, the IP address can and will change regularly. The consequence of this would be that when the IP address changes, storagenode would lose connection to the network. + +Adding a DDNS hostname solves the issue of public IP changes. We will add a free DDNS hostname using [NoIP](http://www.noip.com/) which needs to be renewed for free every 30 days on a free account. See [](docId:y0jltT-HzKPmDefi532sd#create-a-free-hostname-using-no-ip) + +1. In the hostname input field select a hostname of your linking (e.g. `myhomestorjrig`), it can contain letters and numbers. +2. Next select `.ddns.net` in the box to the right. +3. Click on Sign Up + +![Adding our own DDNS hostname](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/dbmW2zZComZnvZfiTlmTZ_image.png) + +***Figure 4.1.** Adding our own DDNS hostname.* + +4. On the sign-up page enter your email, username and password. Make sure to write these details down, we will need them later. + +![NoIP registration page](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/Xzp-7nDgdp0H2r60KmFvq_image.png) + +***Figure 4.2.** NoIP registration page.* + +5. 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. + +6. Now scroll down to where it says How to remote access your device and click on get started with dynamic DNS (**Figure 4.3**). + +![The activation page](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/Od2QBn9eLu5_O8RpNC1GR_image.png) + +***Figure 4.3.** The activation page: click on the large blue box to go to the DDNS hostname setup page.* + +7. Clicking on the link should take us to our NoIP dashboard. +8. Now scroll down to *Dynamic Update Client for Windows (DUC)* and click on Download (**Figure 4.4**). This should take us to the download page where we can download the DUC tool. On the download page click on **Download Now**. + +![Dynamic Update Client download](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09ccb529ec.png) + +***Figure 4.4.** Dynamic Update Client download.* + +9. After the file downloaded successfully head over to the download folder and double click on the DUCSetup executable. +10. On the resulting installation window, click on **Agree** - **Install** - **Finish**. + +![DUC installation](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09ccc138d2.png) + +***Figure 4.5.** DUC installation.* + +11. The Dynamic Update Client should now open. Enter the details from step (4) above and click on **Sign in** (**Figure 4.6**). + +![Dynamic Update Client](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09ccced623.png) + +***Figure 4.6.** Dynamic Update Client.* + +12. Once logged in successfully, the Edit groups/Hosts menu should be displayed (Figure 4.7). If not already selected, choose the hostname box and click on save. + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09ccdc5c95.png) + +***Figure 4.7.** From the Edit groups/Hosts menu, select the hostname and click on **Save**.* + +13. The DUC tool will now come to life (**Figure 4.8**). Next head over 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 storagenode starts automatically, it will not run into a closed port as DUC is also already running. + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cce87ccc.png) + +***Figure 4.8.** DUC once configured correctly.* + +Congratulations! You now have a hostname and a dynamic update tool that automatically tracks and assigns the IP address to your DDNS hostname. So if your public IP changes, storagenode will not lose access to the TCP port. In the next section, we will look at downloading and setting up the private internet access VPN program. + +# 5. Private internet access download and configuration + +In this step we will download and configure PIA so that it can be used with storagenode. First we head over to the registration page, this page gives us three payment plan options. If you just want to test out PIA with storagenode, it is advisable to take the One month only plan. On the other hand, if you are serious about running storagenode and plan to rent out a storage space over the long run (the ideal case), the yearly plan at 3.33$/month is much cheaper (**Figure 5.1**) + +![Private internet access plans and pricing](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/Screenshot-2025-01-30-124150.png) + +***Figure 5.1.** Private internet access plans and pricing.* + +Next we select the plan that is best for us and click on **Select plan**. This should open the payment method window (**Figure 5.2**). + +![Payment methods and options](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/Screenshot-2025-01-30-124457.png) + +***Figure 5.2.** Payment methods and options.* + + +Now click on our preferred payment method and proceed to the registration process. Once paid, Private Internet Access will send a few confirmation emails containing the details of our account and the information we will need to login to the app (**Figure 5.3**). The email containing the login information is called *Private Internet Access Account Activated.* + + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cd127cd9.png) + +***Figure 5.3.** Access Account Activation email containing the PIA app username and password.* + +Now download the PIA app [here](https://www.privateinternetaccess.com/download), after the app has downloaded successfully open the download folder and double click on the PIA installer. This will open up a terminal that automatically installs the app and necessary drivers. If a driver window pops up, click on **Install**. When the installation is completed, the terminal window should close automatically and the main PIA app window should now be displayed. + +* Now add the username and password that was sent to you in the activation email. +* Next select Start application at login and hit save (**Figure 5.4**). + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cd204766.png) + +***Figure 5.4.** PIA application with the entered username and password provided to us via email.* + +We now have to connect to a gateway that allows for configuring port forwarding. ***The following gateways support port forwarding:*** + +* CA Toronto +* CA Montreal +* Netherlands +* Switzerland +* Sweden +* France +* Germany +* Romania +* Israel + +{% callout type="info" %} +**Note**: Based on your geographical location it is best to select the gateway closest to your location to lower the ping times. +{% /callout %} + +In order to add a gateway we head over to the PIA app, which is normally hidden in the system tray (right side of the taskbar) - right click on it - click on "settings" (**Figure 5.5**). + +{% callout type="info" %} + +**Note**: we can also launch the app by doing a windows app search for PIA, which allows us to pin the app to the taskbar, making it easier to access in the future. +{% /callout %} + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cd2c30c4.png) + +***Figure 5.5.** How to enter the PIA settings through the system tray icon.* + +See how to configure port forwarding for Desktop application [here](https://helpdesk.privateinternetaccess.com/kb/articles/how-do-i-enable-port-forwarding-on-my-vpn). + +Now right click on the system tray icon again (**Figure 5.5**) and click on **Connect**. PIA should now initiate the connection to the network. If all goes well the PIA icon should turn green. + +Now hover over the green icon with the mouse, the IP address and port number should appear, note however that it can be delayed a bit so sometimes it does not appear right away as PIA first has to request a port from the gateway which can take some time (**Figure 5.6**). + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cd4a29f7.png) + +***Figure 5.6.** When hovering over the PIA tray icon our new IP and port is shown. We will use the port number of PIA in storagenode.* + +Write down the port number as it will be used in the last part of setting up the storage node. + +# 6. Storagenode configuration with DDNS and PIA port + +We will now configure the storagenode software and add our NoIP hostname and the TCP port given to us by PIA. + +Our assumptions for this example: + +* your DDNS hostname is `mystoragenode.ddns.net` +* your PIA port is `59538` + +Replace the above parameters with your own, the DDNS and PIA port you configured above. + +## Docker version + +Specify the PIA port in your `docker run` command as `-p 59538:28967`, and your DDNS hostname with the PIA port in the `ADDRESS` parameter of your `docker run` command as `-e ADDRESS=mystoragenode.ddns.net:59538`. + +All other parameters should be specified accordingly [](docId:HaDkV_0aWg9OJoBe53o-J#step-3-run-the-storage-node), then Run the storagenode. + +That's it! The storagenode should now start and connect to the Storj network through PIA. + +{% callout type="info" %} +**Note**: You can notice that we published the `59538` host's port to the `28967` container's port. This is the default internal port of the container. You can read more there: [](docId:52ea9ae6-74e2-41b4-88f1-4b1230ec27da). +{% /callout %} + +## Windows GUI version + +Specify the PIA port in the `server.address:` option of the `"C:\Program Files\Storj\Storage Node\config.yaml"` file with a text editor such as Notepad++ (please, do not use a regular Notepad!). + +Specify the DDNS hostname with the PIA port in the `contact.external-address:`. + +These changes should look like: +``` +... +contact.external-address: mystoragenode.ddns.net:59538 +... +server.address: :59538 +... +``` +Please, save the configuration file after the change (click menu File - Save) and restart the storagenode service either from the Services applet or from the elevated Powershell: +``` +Restart-Service storagenode +``` +{% callout type="info" %} +**Note**. You could notice that we specified the `server.address:` as `server.address: :59538`, this notation mean that storagenode service will listen on all local interfaces with TCP port `59538`. +{% /callout %} + +# 6.1 Optional - How to manually edit the configuration parameters + +If one later has the necessity to edit some configuration parameters, this will have to be done manually. + +You can open the `config.yaml` file in the configuration folder with a text editor, such as Notepad++ (Windows), Plain text editor (MacOS), `nano` (for Linux), or any preferable plain text editor. + +For Windows users it is advisable to download and install Notepad++, which formats the YAML text in a neat way, you have to configure Windows to always open a text/YAML file with Notepad++. + +Default configuration file containing the settings for one specific node: +``` +# path to the certificate chain for this identity +identity.cert-path: "identity/identity.cert" +# path to the private key for this identity +identity.key-path: "identity/identity.key" +# the public address of the node, useful for nodes behind NAT +contact.external-address: "" +# operator email address +operator.email: "" +# operator wallet address +operator.wallet: "" +# the minimum log level to log +log.level: info +# address to listen on +server.address: ":28967" +# total allocated disk space in bytes +storage.allocated-disk-space: 1.0 TB +``` +Now replace the fields mentioned above with your own parameters. Keep in mind, parameters specified in the storagenode start command has a precedence over options. For example, the environment variable `ADDRESS` for the docker version will override value of the `contact.external-address:` option in the config file and so on. + +When you save the config file, you should stop and remove the container and run it again (or restart the storagenode service in case of Windows GUI version) to allow storagenode to use this new configuration. + +{% callout type="info" %} +**Note**: The environment variables and parameters in the start command have a precedence over the config file. The order is: +1. config options +2. command line parameters +3. environment variables + +{% /callout %} + +# 7. Testing if everything is working correctly + +Now that everything is set up correctly, we have to test the following: + +* Can our node(s) connect to the network and talk to it, and can the network see our node. +* Is the PIA port open for our hostname(s). + +The easiest way to manually check if everything is working correctly is to use an online port checker to check if our PIA port is open. + +1. First we go to [yougetsignal](http://www.yougetsignal.com/tools/open-ports/) in our browser. +2. We then enter our DDNS hostname (`myhomestorjfarm.ddns.net` in this example) in the **Remote Address** field. +3. Next we enter the PIA port number (`59538` in this example) in the **Port Number** field. +4. We then click on **Check**. + +A green flag should now appear indicating that the PIA port is open for our hostname, indicating that storagenode is successfully connected to the network (**Figure 7.1**). + + +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/5cb09cd619824.png) + +***Figure 7.1.** When all is working correctly the PIA port should be open for our DDNS* + + +## 7.1. If the port is closed + +If the flag indicator is red, it means there is a connection problem. This can occur sometimes at startup when the IP address is suddenly updated but the Dynamic Update Client (DUC) does not recognize the IP change yet as it only updates the IP address every 5 minutes (this can be lowered with a paid NoIP account). This indicates that storagenode is connected to the old IP address through the hostname. The way to solve goes as follows: + +1. Stop the storagenode: [](docId:Zh_lD6UPciHT53wOWuAoD) +2. Click on **Refresh now** in the DUC app. +3. Right after refreshing DUC, start the storagenode back, this should start storagenode with the correct IP address assigned to our hostname. +4. Now repeat the Yougetsignal check, the port should now be open, indicated by a green flag. If you are on windows and the port is still closed have a look at [Windows Firewall](docId:y0jltT-HzKPmDefi532sd#make-sure-to-add-a-firewall-rule) on how to allow the PIA port through the Windows firewall. + +If the port is still closed, let it run for 30 minutes and try the port scan again. + +If it still doesn't show the port is open, restart PIA and storagenode and try again until it works, sometimes it takes a bit of trial and error to get it working the first time. + +{% callout type="info" %} +**Note**: A antivirus program can prevent storagenode from connecting through the PIA port. +{% /callout %} + +# 8. Conclusion + +Following the steps laid out in this Tutorial, we have successfully configured PIA, NoIP and storagenode, resulting in fully functioning node. Our storage nodes now have two encryption layers, the first one offered natively by storagenode and the second one by PIA which encrypts all our internet data. We are also able to do normal internet tasks as the VPN encrypts all data coming from our computer and not just that of storagenode, circumventing internet censorship and defeating government spying programs, basically making the internet function as it was intended to be. + +If you have any more questions or comments, feel free to join us on our [forum](https://forum.storj.io) or ask a question via our [support helpdesk](https://support.storj.io/). \ No newline at end of file diff --git a/app/(docs)/node/faq/set-up-a-storagenode-on-droid-hc2-video-tutorial/page.md b/app/(docs)/node/faq/set-up-a-storagenode-on-droid-hc2-video-tutorial/page.md new file mode 100644 index 000000000..0bf4a0d6c --- /dev/null +++ b/app/(docs)/node/faq/set-up-a-storagenode-on-droid-hc2-video-tutorial/page.md @@ -0,0 +1,12 @@ +--- +title: Set up a storagenode on Odroid HC2 (video tutorial) +docId: d3ed4c97-6ff8-42d3-8e00-a55e4ecb731c +redirects: + - /hc/en-us/articles/360030467972-Set-up-a-storagenode-on-Odroid-HC2-video-tutorial + - /hc/en-us/articles/360030467972 +--- +This is a video tutorial that explains how to set up `storagenode` on the Odroid HC2 board + +We thank our fellow community member Will Topping for sharing this contribution. + +{% youtube-embed videoId="kD3l92cjo0Y" /%} diff --git a/app/(docs)/node/faq/single-and-multinode-setup/page.md b/app/(docs)/node/faq/single-and-multinode-setup/page.md new file mode 100644 index 000000000..44d1858a9 --- /dev/null +++ b/app/(docs)/node/faq/single-and-multinode-setup/page.md @@ -0,0 +1,86 @@ +--- +title: Single and multi-node Port forwarding setup +docId: 52ea9ae6-74e2-41b4-88f1-4b1230ec27da +redirects: + - /hc/en-us/articles/360042343052-Single-and-multi-node-Port-forwarding-setup +--- + +When the outside world is trying to reach a specific node, it basically has to go through a few steps. We are going to include the Docker setup steps in case you want to use it on the other system or in case someone else with a docker setup has the same question. + +# Single node setup +outside world => 28967 => router => 28967 => node machine [ => 28967 => docker container] + +For single node, you will use the same port number throughout, so you can just use port `28967` everywhere. This makes the settings easier. However, there are several places where you can adjust ports and forward ports to other ports. That will become relevant in multi-node setups. + +# Multi-machine multi-node setup +In a multi-machine setup for example, it could look like this. + +* node1: outside world => 28967 => router => 28967 => node machine1 [ => 28967 => docker container] +* node2: outside world => 28968 => router => 28967 => node machine2 [ => 28967 => docker container] + +In this setup, your router translates external port `28968` to internal port `28967` on machine2. This means machine 2 is still listening on the default `28967` port, but if the outside world wants to reach it, it has to talk to external port `28968`. + +# Single-machine multi-node setup +Only use this setup if you want to share multiple HDD’s on a single machine. There is no advantage to be gained from running multiple nodes on the same HDD or array. This would not result in your nodes getting more data than if you were running only one single node on your hard drive. + +In a single-machine setup with multiple nodes, it could look like this. + +* node1: outside world => 28967 => router => 28967 => node machine1 [ => 28967 => docker container] +* node2: outside world => 28968 => router => 28968 => node machine1 [ => 28967 => docker container] + +In this setup your router forwards both ports to the same machine without changing them. That machine then has to deal with port `28968` for node2. There are two options. + +1. On setups without Docker, make the node2 listen to port `28968` by changing the `config.yaml` +2. On Docker node setups, change the port forward parameter in the `docker run` command for node2 to `-p 28968:28967`. Please note that these port numbers are different, because traffic on the machine is received on external port `28968` but translated to internal port `28967` inside the container. Because of this translation, no change in the `config.yaml` is necessary for these setups. + +## Related settings +For the second node in multi-node setups, this translates to the following settings in config.yaml: +``` +# public address to listen on +server.address: :28967 +``` +This setting refers to the port the node is listening on. + +Without Docker: +outside world => 28968 => router => **28967** => node machine + +With Docker: +outside world => 28968 => router => 28967 => node machine => **28967** => docker container +``` +# the public address of the node, useful for nodes behind NAT +contact.external-address: yourddns.domain.com:28968 +``` +This setting refers to where the outside world can contact the node. +outside world => **28968** => router => 28967 => node machine [ => 28967 => docker container] + +Note: For Docker setups, this value is set through the `-e ADDRESS="yourddns.domain.com:28967"` parameter in the `docker run` command. + +# Common mistakes +## Forwarding twice +Have the router forward `28968` to `28967`, but also do the same in your `docker run` command with `-p 28968:28967` + +outside world => 28968 => router => **28967** / **28968** => node machine => 28967 => Docker container + +The ports that the node machine receives traffic on and Docker expects traffic on no longer match, so it doesn’t go through. + +## Changing the port your node listens to while also translating ports +``` +# public address to listen on +server.address: :28968 +``` +With `-p 28968:28967` in the `docker run` command. + +outside world => 28968 => router => 28968 => node machine => **28967** / **28968** => Docker container. + +The Docker container gets traffic on `28967`, but the node listens on `28968`. + +## Using the same port on the same machine for multiple nodes +Different nodes always need to use different ports. Traffic can’t go through one port and then be split up again. This is why when you use a single machine, you can’t have your router forward both port `28967` and `28968` to `28967` on the same machine, but you can use the same port on multiple machine setups. The same goes for containers with docker setups. Multiple nodes can all listen to port `28967` as long as they are in multiple containers. + +## In general +Mistakes usually consist of anything that breaks this chain. It’s important that in every step, the port that traffic is being sent to is also the port the next element in the chain is listening to. This can be complicated even more if people run multiple NAT setups and when firewalls get in the way. But that’s out of scope for this post. + + +{% callout type="info" %} +This article was adapted from the original forum post [by author René Smeekes (@BrightSilence)](https://forum.storj.io/t/setting-up-second-machine-with-storj-on-same-network/5953/4?u=alexey) +{% /callout %} \ No newline at end of file diff --git a/app/(docs)/node/faq/suspension-mode/page.md b/app/(docs)/node/faq/suspension-mode/page.md new file mode 100644 index 000000000..385abaf4c --- /dev/null +++ b/app/(docs)/node/faq/suspension-mode/page.md @@ -0,0 +1,42 @@ +--- +title: Suspension mode +docId: 6514f956-dfeb-44a6-81a6-7f8a245af97b +redirects: + - /hc/en-us/articles/360042257912-Suspension-mode + - /hc/en-us/articles/360042257912 +--- +An overview of the [suspension mode design](https://forum.storj.io/t/design-draft-storage-node-suspended-state/4606?u=alexey) + +[How does suspension mode work?](https://forum.storj.io/t/suspension-mode-and-disqualification-emails/6091) + +[Explanation regarding suspension mode notification emails](https://forum.storj.io/t/node-suspension/6102/111) + +# What should I do? +Please, search for the reason for failed audit [in your logs](docId:O68S24Iww4ZEnVk8yO7Mv). You should try to find the errors on the affected satellite(s) starting around the timestamp mentioned in the suspension mode notification email you received. + +## Linux/MacOS bash +``` +docker logs storagenode 2>&1 | grep -E "GET_AUDIT|GET_REPAIR" | grep failed +``` + +## Linux/MacOS bash for [redirected logs](docId:EeyBBKEeuNK5oqkB4EyU0) +``` +grep -E "GET_AUDIT|GET_REPAIR" /mnt/storj/storagenode/node.log | grep failed +``` + +## Windows Docker Powershell +``` +docker logs storagenode 2>&1 | sls "GET_AUDIT|GET_REPAIR" | sls failed +``` + +## Windows GUI Powershell +``` +sls "GET_AUDIT|GET_REPAIR" "C:\Program Files\Storj\Storage Node\storagenode.log" | sls failed +``` + +## Windows Powershell for [redirected logs](docId:EeyBBKEeuNK5oqkB4EyU0) +``` +sls "GET_AUDIT|GET_REPAIR" "x:\storagenode\node.log" | sls failed +``` + +Once you have found the error(s), search for threads mentioning these errors [on the forum](https://forum.storj.io/search?expanded=true) so you can find what are the steps to fix the error. Once you have fixed the error that led your node to get suspended, it should get unsuspended fairly soon after and you should start seeing new uploads for that satellite in your logs, which indicates that the node is no longer suspended. \ No newline at end of file diff --git a/app/(docs)/node/faq/wallet-address-for-storagenode/page.md b/app/(docs)/node/faq/wallet-address-for-storagenode/page.md new file mode 100644 index 000000000..41d4ad88d --- /dev/null +++ b/app/(docs)/node/faq/wallet-address-for-storagenode/page.md @@ -0,0 +1,57 @@ +--- +title: Wallet address for storagenode +docId: 66d6c295-53e4-4308-9cde-1c6193155f52 +metadata: + title: ERC20-compatible wallet address for STORJ tokens + description: Learn what is valid wallet address to receive STORJ ERC20 tokens. +redirects: + - /hc/en-us/articles/360029700972-Wallet-address-for-storagenode +--- +Here is walkthrough for one of the popular software wallet - [https://MyEtherWallet.com](https://MyEtherWallet.com) . The following step will let you create a valid STORJ token 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 Metamask, Parity or Mist, you can skip this article. + +First we will add a STORJ ERC20 payout address. STORJ is the name of the token which is used to pay the Operators 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, you can use any compatible ethereum wallet; we use [https://www.myetherwallet.com/ (MEW)](https://www.myetherwallet.com/) here as example. There are many other options available; Storj Labs does not endorse any particular wallet, please choose the one you are most comfortable with. + +You have three options how to create a new wallet on MEW site + +1. mobile application +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip3.png) +2. keystore file +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip2.png) +3. mnemonic phrase +![](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip1.png) + + +# Create wallet using keystore file +On the MEW website, enter a strong password of your liking into the "Enter a password" field and then click on "Create New Wallet", see **Figure 3.1.** + +![Creating a payout address with MyEtherWallet using keystore file](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip2.png) + +***Figure 3.1.** Creating a payout address with MyEtherWallet using keystore file.* + +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 to assure 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 *Download Keystore file* + +![Download the Keystore file](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip5.png) + +***Figure 3.2.** Download the Keystore file.* + +# Create wallet using mnemonic phrase +![Creating wallet using mnemonic phrase](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip6.png) + +***Figure 3.3.** Creating wallet using mnemonic phrase* + +Write down your mnemonic phrase or print it. Then click on **I Wrote Down My Mnemonic Phrase** to continue. Then wallet will do a little exam for you. You need to fill missed words from your mnemonic phrase. See **Figure 3.4** + +![Verification](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip7.png) + +***Figure 3.4.** Verification* + +![Verification was successful](https://link.storjshare.io/raw/jwdgkkb45jf3qbxeehfmdu6b23kq/docs/images/PIA-storagenode/mceclip8.png) + +***Figure 3.5.** Verification was successful* + +# Please Note: +{% callout type="danger" %} +Do NOT use an exchange wallet address, the micropayments wont work with an exchanges' deposit addresses. + +You could lose your payments, if you would use an exchanges' deposit address instead of your wallet. +{% /callout %} \ No newline at end of file diff --git a/app/(docs)/node/faq/what-is-the-storj-token/page.md b/app/(docs)/node/faq/what-is-the-storj-token/page.md new file mode 100644 index 000000000..2d93ef91c --- /dev/null +++ b/app/(docs)/node/faq/what-is-the-storj-token/page.md @@ -0,0 +1,8 @@ +--- +title: What is the STORJ token? +docId: e9c616d7-f4a5-47cb-93b7-3e8e3ce05928 +redirects: + - /hc/en-us/articles/360026611072-What-is-the-STORJ-token + - /hc/en-us/articles/360026611072 +--- +STORJ is a utility token on the Ethereum network which follows the [ERC20 standard](https://en.wikipedia.org/wiki/ERC20). STORJ tokens allow you to purchase storage or earn money for renting your free hard drive space regardless of where in the world you are located (the only exception are countries currently embargoed by the US government which for legal reasons Storj Labs cannot serve). STORJ token can be used directly on Ethereum blockchain for its transactions on Layer 1, and zkSync for transactions on Layer 2. \ No newline at end of file diff --git a/app/(docs)/node/faq/why-is-my-node-disqualified/page.md b/app/(docs)/node/faq/why-is-my-node-disqualified/page.md new file mode 100644 index 000000000..0d28a2c51 --- /dev/null +++ b/app/(docs)/node/faq/why-is-my-node-disqualified/page.md @@ -0,0 +1,121 @@ +--- +title: Why is my node disqualified? +docId: 2832eccf-8c63-4563-abd7-92ede9dece83 +redirects: + - /hc/en-us/articles/4403035941780-Why-is-my-node-disqualified + - /hc/en-us/articles/4403035941780 +--- +Node disqualification is designed to protect customers' data from being lost or getting altered. It's an edge action when the node become unreliable or malicious. + +Disqualifications are permanent and not reversible. There are some rare exceptions where disqualifications may be reverted such as, due to a bug in our code or satellite misconfiguration. These special cases are not the subject of this article. + +# Reasons of disqualification +A disqualification could happen on one or more satellites for the following reasons: + +* too many failed audits (losing more than 4% of audit score: when the audit score falls below the 96% threshold, the node will be disqualified); +* node too long in offline status (more than 30 days); +* too many offline periods. + +See: + +* [how the audit score is calculated](https://github.com/storj/design-docs/blob/f6b8e7b3124326228ee4ae0e81e06e3d5007edef/20190909-reputation-and-node-selection.md); +* [what initial parameters used for audit score](https://forum.storj.io/t/tuning-audit-scoring/14084/72?u=alexey); +* [design of online detection with audits](https://github.com/storj/design-docs/blob/f6b8e7b3124326228ee4ae0eh81e06e3d5007edef/20200521-access-revocation.md); +* [how the online score is calculated](docId:p7qPegEKWZtjlC0fKCRB7). + + +# Reasons of failed audits +To be audited, the node should be online and answering to audit requests, otherwise it will [affect the online score](docId:p7qPegEKWZtjlC0fKCRB7) instead of audit score. + +So, the node is online, answers to audits but: + +* did not provide a piece for audit in 5 minutes. Did the same two more times for the same piece; +* has provided a piece but it's corrupted; +* did not provide a piece with error "file not found". + +In such cases, the audit of this piece is considered failed. 40 consecutive failed audits are enough to disqualify the node. However, while 40 consecutive failed audits are sufficient to be disqualified, that’s just the fastest way. The failed audits don’t have to be consecutive - you can also be disqualified e.g., by failing 100 audits with lots of passing audits in between, as any failure of more than 4% of audits over time would lead to disqualification. The higher the percentage that fail, the fewer audits are needed. 40 audits at 100% failure rate is the fastest way to get there. In contrast, at 4% failure rate it would take about 3000 audits to get disqualified. + +# How to detect an audit failure +You need to inspect [your logs](docId:O68S24Iww4ZEnVk8yO7Mv) for errors during **GET_AUDIT** and **GET_REPAIR** operations, if they show **failed**, then it will affect the audit score immediately. + +Failed audits due to corrupted pieces can be not logged by the storagenode software to make adoption of malicious user harder. However, they could be detected indirectly (see [Detect hanging and silent audit failures](#detect-hanging-and-silent-audit-failures) below). Some corruption errors are logged: [https://github.com/storj/storj/issues/4194](https://github.com/storj/storj/issues/4194) + +Failed audits due to timeouts are not logged on the node's side for obvious reason - if the node is unable to provide a piece, it's likely hanging and cannot write a log either. These types of failure are hard to detect, they usually relate to the hardware (SMR disks or dying disks, overheating etc.) or OS (drivers, updates etc.) or other software (antivirus, firewalls, malware or viruses etc.) + +When storagenode cannot provide a piece before the 5 minute timeout has expired, it can still respond to audit requests but cannot provide a piece because it becomes incredibly slow (usually SMR disks or dying disks or other hardware / software problems that make the node too slow to respond), even the port will appear open on [https://www.yougetsignal.com/tools/open-ports/](https://www.yougetsignal.com/tools/open-ports/), and even UptimeRobot.com would not be able to notice the problem. + +Usually a simple reboot is enough to bring storagenode back to life. + +# Detecting direct audit failures +Direct audit failures can be detected by keywords in the logs as shown below. + +## Linux/MacOS bash +``` +docker logs storagenode 2>&1 | grep -E "GET_AUDIT|GET_REPAIR" | grep failed +``` +## Windows Docker Powershell +``` +docker logs storagenode 2>&1 | sls "GET_AUDIT|GET_REPAIR" | sls failed +``` +## Windows GUI Powershell +``` +sls "GET_AUDIT|GET_REPAIR" "C:\Program Files\Storj\Storage Node\storagenode.log" | sls failed +``` + +# Detect hanging and silent audit failures +Hanging and silent audit failures can be detected by a lack of audit requests during long periods in the logs, or started but not finished audits, or by long periods between "download started" and "downloaded" for **GET_AUDIT** or **GET_REPAIR**. This also affects the audit score on the dashboard (it may not display as updated depending on how badly your node is hanging). + +For the first sign there is no automation at the moment - you can detect it only visually - usually your node should be audited not less than once an hour. If you see no audits for a long time (it's even visible on your dashboard as lack of audit traffic), this is a reason to be concerned, especially if you see that the audit score starts to fall even by one percent. + +For the second sign you can calculate total audits started and total audits finished. If the numbers doesn't match - there could be a problem (the unmatched numbers should not be greater than 7). + +For the third sign you can request the time stamps for the exact pieces for one or several satellites: [https://forum.storj.io/t/topic/14848/97](https://forum.storj.io/t/topic/14848/97) + +## Linux/MacOS bash +Number of started audits: +``` +docker logs storagenode 2>&1 | grep -E "GET_AUDIT|GET_REPAIR" | grep started -c +``` +Number of finished audits: +``` +docker logs storagenode 2>&1 | grep -E "GET_AUDIT|GET_REPAIR" | grep downloaded -c +``` +## Windows Docker Powershell +Number of started audits: +``` +(docker logs storagenode 2>&1 | sls "GET_AUDIT|GET_REPAIR" | sls started).Count +``` +Number of finished audits: +``` +(docker logs storagenode 2>&1 | sls "GET_AUDIT|GET_REPAIR" | sls downloaded).Count +``` +## Windows GUI Powershell +Number of started audits: +``` +(sls "GET_AUDIT|GET_REPAIR" "C:\Program Files\Storj\Storage Node\storagenode.log" | sls started).Count +``` +Number of finished audits: +``` +(sls "GET_AUDIT|GET_REPAIR" "C:\Program Files\Storj\Storage Node\storagenode.log" | sls downloaded).Count +``` + +# Disqualification for downtime +The disqualification for downtime is implemented only for long downtimes (more than 30 days offline.) + +In other cases only a suspension would be applied. However, downtime disqualification could get enabled soon, so better consider it as enabled already. + +## Long time offline +If your node was offline or is running a version of the software lower than the minimum allowed version (see [Both nodes remain OFFLINE](https://forum.storj.io/t/both-nodes-remain-offline/4025) for example), it can be disqualified. So please if you are using the docker version of the software, enable [automatic updates](docId:ojIatmeXyCN4rc-GPx8yW#automatic-updates) to protect the node. The Windows GUI and Linux GUI versions already use the automatic updates by default. + +## Too many offline events +Your node can be offline for 288 hours before it would get suspended, however, if your node is still relatively new, the online score could be very sensitive, so in general - when the online score falls below 60%, the node will get suspended. While suspended, the node will not receive any ingress traffic, but will still be audited and could have egress traffic. + +After a suspension happened, you have a week to fix the issue. If the issue is not resolved (your node is still offline), it may get disqualified. + +When you fix the issue and the node comes back online, it needs to stay online for the next 30 days to recover fully. So during this 30-day recovery time your node will be under review. If the node still is in suspension at the end of the review period - it will be disqualified as unreliable. + +Every new offline event will require another 30 days online to recover after the downtime. The review period is not extended. + +When the online score rises above the 60% threshold, the node will come out of suspension and receive ingress normally again. See [How is the online score calculated?](docId:p7qPegEKWZtjlC0fKCRB7) for details. + +While your node is offline, it can lose pieces due to repair, because offline pieces are considered as unhealthy. The longer the node stays offline - the more of its used space could be freed up due to pieces being repaired to other healthy nodes and this would then also lead to a lower payout. \ No newline at end of file diff --git a/app/(docs)/node/faq/why-not-pay-in-fiat/page.md b/app/(docs)/node/faq/why-not-pay-in-fiat/page.md new file mode 100644 index 000000000..265f3ff68 --- /dev/null +++ b/app/(docs)/node/faq/why-not-pay-in-fiat/page.md @@ -0,0 +1,15 @@ +--- +title: Why does Storj Labs not pay Storage Node Operators directly in USD? +docId: 37344d79-8559-46e3-95c8-5848a9f2ddbd +redirects: + - /hc/en-us/articles/360061043591-Why-does-Storj-Labs-not-pay-Storage-Node-Operators-directly-in-USD +--- +In many countries, receiving foreign currency as a payment may be prohibited by local laws unless you are a legal entity. There are a lot of restrictions around fiat. + +At the time this article was published we had storage node operators located in 94 countries (http://storjnet.info/), so it would be nearly impossible to comply with all local requirements to send fiat USD to Operators. + +Another problem is that sending international wire transfers is usually very slow and frequently involves very costly transaction fees. Even after paying the high fees, the transfer may still fail, get lost or be rejected. + +In the case of STORJ tokens, we are not faced with the above mentioned problems in most cases (you would need to consult with a local attorney and your tax office regarding any local legal requirements around cryptocurrencies, we do not guarantee that receiving tokens is allowed in your country). + +Also, the STORJ tokens you earn for sharing your hard drive and bandwidth can be used to pay for our Storj DCS service to store your files in our decentralized end-to-end encrypted S3 compatible cloud storage. \ No newline at end of file diff --git a/app/(docs)/node/get-started/install-node-software/gui-windows/storage-node/page.md b/app/(docs)/node/get-started/install-node-software/gui-windows/storage-node/page.md index a09a4565a..45b2ff9e2 100644 --- a/app/(docs)/node/get-started/install-node-software/gui-windows/storage-node/page.md +++ b/app/(docs)/node/get-started/install-node-software/gui-windows/storage-node/page.md @@ -28,7 +28,7 @@ weight: 0 ![Identity folder selection screen](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/LL0TW17fdolT5vFvZa0OX_pasted-image-0.png) -6. Enter your [ERC-20 compatible wallet address](https://support.storj.io/hc/en-us/articles/360026611692-How-do-I-hold-STORJ-What-is-a-valid-address-or-compatible-wallet-) where you want to receive your STORJ token payouts. +6. Enter your [ERC-20 compatible wallet address](docId:a045be02-e05a-11ef-9338-6045bd1fa4e3) where you want to receive your STORJ token payouts. ![Operator information - Ethereum wallet](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/85j1PrZepUeQGCYMGFKJw_pasted-image-0.png) diff --git a/app/(docs)/node/get-started/install-node-software/qnap-storage-node-app/page.md b/app/(docs)/node/get-started/install-node-software/qnap-storage-node-app/page.md index db14f70d0..2d2f73d6f 100644 --- a/app/(docs)/node/get-started/install-node-software/qnap-storage-node-app/page.md +++ b/app/(docs)/node/get-started/install-node-software/qnap-storage-node-app/page.md @@ -50,7 +50,7 @@ Go to **Control Panel** -> **Privileges**, double click the storage node app and ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/kfnmhfsVG_k61weJPvi4a_image.png) -1. Add your [ERC-20 Token Compatible Wallet Address](https://support.storj.io/hc/en-us/articles/360026611692-How-do-I-hold-STORJ-What-is-a-valid-address-or-compatible-wallet-) for payouts. +1. Add your [ERC-20 Token Compatible Wallet Address](docId:a045be02-e05a-11ef-9338-6045bd1fa4e3) for payouts. ![](https://link.storjshare.io/raw/jua7rls6hkx5556qfcmhrqed2tfa/docs/images/4nmAYwFJUzivgihR-NruY_image.png)