StorjMonitor

StorjMonitor

Docker app from JCloud's Repository

Overview

Storj daemon + CLI; multiple-node in template support; Storjstat.com monitor installed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Storj is a Crypto-asset and P2P cloud storage service. This Docker runs the back-end client for Storj allowing internet users to rent their disk space and earn STORJ an Ethereum asset. **The template author makes no guarantee that STORJ or ETH will retain, or increase in fiat value.** SETUP REQUIREMENTS: ------------------------------------- 1. TCP port 4000 open on host. 2. Path on host for Storj data to sit. IE: make a user share, /mnt/user/storj 3. Your Ethereum-based wallet address. 4. The max allowed space STORJ can take up on the host; remember to make it less 5. DDNS or DNS address. OPTIONAL REQUIREMENTS: 1. Storjstat.com API-Key 2. Additional network ports, if running multiple nodes. By default it increments from 4000. IE 4001, 4002, 4003++, and so on. STORJ DAEMON STATUS: (In your command line) -------------------------------------------------- docker exec StorjMonitor storjshare status --------------------------------------------------

The Storj Share Daemon+CLI (https://github.com/Storj/storjshare-daemon).

WHAT and WHY

This image is a dirty fork of the official repo, adding multiple node creation and optional deletion of log files. Storj daemon supports running multiple nodes, up to the number of CPU-threads on your system (hard-limit per container). This fork adds simple logic and variables to build and start multiple minning-nodes in a loop.

Deletion of the daemon's log files also added by this fork. By default logs are kept untouched, however if the variable DEL_LOGS is set to 'TRUE' then a second variable DEL_LOGS_DAYS=INT (INT >= 1) is used to specify how many days of logs to keep. Log file pruning occurs at the start of the container - no other schedules.

docker pull zugz/r8mystorj:latest

Local Build

Alternatively, build the container locally:

cd /path/to/your/buildarea
git clone https://github.com/Jcloud67/docker-storjshare-cli
docker build -t Jcloud67/storjshare-cli:latest docker-storjshare-cli/

Run Daemon

Start the daemon by using this command (optional args shown in square brackets with default values):

docker run --detach \
    --name mystorjdaemon \
    --restart=always \
    -v /path/to/storjdata:/storj \
    -p 4000-4003:4000-4003 \
	-e WALLET_ADDRESS=your_ERC20_wallet_address \
	[-e DAEMONADDRESS=127.0.0.1] \
	[-e DATADIR=/storj] \
	[-e SHARE_SIZE=1TB] \                                     <--  Consider, a LARGE # here with multiple nodes, do you have the                                                                            space? Could also change these values later in each config file.
	[-e RPCADDRESS=0.0.0.0] \                                 <--  Recomend DynamicDNS used here.
	[-e MONITORKEY= ] \                                       <--  storjstat.com user API monitor-key here.
	[-e NODE_COUNT=0 ] \                                      <--  How many additional minning-nodes to start.
	[-e NODE_DIR=Node_ ] \
	[-e USE_HOSTNAME_SUFFIX=FALSE] \
	[-e DEL_LOGS_DAYS=32 ] \                                  <--  Keep this many days; older is deleted. Valid is >=1.
	[-e DEL_LOGS=FALSE] \                                     <--  DEL_LOGS=TRUE  to enable.
     Jcloud67/storjshare-cli:latest

For Copy/Paste purposes:

docker run --detach \
    --name mystorjdaemon \
    --restart=always \
    -v /path/to/storjdata:/storj \
    -p 4000-4003:4000-4003 \
	-e WALLET_ADDRESS=your_ERC20_wallet_address \
	[-e DAEMONADDRESS=127.0.0.1] \
	[-e DATADIR=/storj] \
	[-e SHARE_SIZE=1TB] \
	[-e RPCADDRESS=0.0.0.0] \
	[-e MONITORKEY= ] \
	[-e NODE_COUNT=0 ] \
	[-e NODE_DIR=Node_ ] \
	[-e USE_HOSTNAME_SUFFIX=FALSE] \
	[-e DEL_LOGS_DAYS=32 ] \
	[-e DEL_LOGS=FALSE] \
     Jcloud67/storjshare-cli:latest

Status

Check the status of the daemon by using this command:

docker exec mystorjdaemon storjshare status

The output should look something like this:

┌─────────────────────────────────────────────┬─────────┬──────────┬──────────┬─────────┬───────────────┬─────────┬──────────┬───────────┬──────────────┐
│ Share                                       │ Status  │ Uptime   │ Restarts │ Peers   │ Allocs        │ Delta   │ Port     │ Shared    │ Bridges      │
├─────────────────────────────────────────────┼─────────┼──────────┼──────────┼─────────┼───────────────┼─────────┼──────────┼───────────┼──────────────┤
│ abcdefabcdefabcdefabcdefabcdefabcdefabcd    │ running │ 4d 22h … │ 0        │ 243     │ 30            │ 20ms    │ 1234     │ 15.00MB   │ connected    │
│   → /storj/share                            │         │          │          │         │ 15 received   │         │ (Tunnel) │ (1%)      │              │
└─────────────────────────────────────────────┴─────────┴──────────┴──────────┴─────────┴───────────────┴─────────┴──────────┴───────────┴──────────────┘

StorjMonitor

Storjstat.com monitor script is pre-installed, the API-Key can be given at time of container creation using ENV variable MONITORKEY. API key can be added after creation of the Container using the following commands: (interactively)

docker exec -ti mystorjdaemon /bin/sh
sed -i "s/YOUR-TOKEN-HERE/MONITOR_KEY/" /StorjMonitor/storjMonitor.js
exit

Stop Daemon

Stop the daemon by using these commands:

docker stop mystorjdaemon
docker rm mystorjdaemon

Versions

Check versions for npm, node and storjshare with:

docker run --rm -ti --entrypoint /versions zugz/r8mystorj:latest
node version:
v6.7.0

npm version:
{ npm: '3.10.3',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '57.1',
  modules: '48',
  node: '6.7.0',
  openssl: '1.0.2k',
  uv: '1.9.1',
  v8: '5.1.281.83',
  zlib: '1.2.11' }

storjshare version:
daemon: 5.3.0, core: 8.5.0, protocol: 1.2.0

Or run an interactive shell:

docker run --rm -ti --entrypoint /bin/sh zugz/r8mystorj

Or connect to an existing container:

docker exec -ti nameofyourcontainer /bin/sh

Or to check proccess running in a container:

docker exec nameofyourcontainer ps -a

And now the punch-line

It's a good thing I didn't tell him about the dirty knife.

Download Statistics

45,769
Total Downloads
26
This Month
266
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Details

Repository
zugz/r8mystorj:latest
Last Updated2018-05-05
First Seen2018-05-01

Runtime arguments

Network
bridge
Privileged
false

Template configuration

Path of Storj share on arrayPathrw

Enter location of your storj share folder on unRAID host.

Target
/storj
Value
/mnt/user/storj
Wallet AddressVariable

Value should be changed to your Wallet address you use for payout.

Target
WALLET_ADDRESS
SHARE_SIZEVariable

Example: 500GB, 1TB, 8TB, for each node you start. MAX SIZE=8TB per node.

Default
100GB
Value
100GB
RPCADDRESSVariable

Your DynamicDNS or external DNS address here. If you need a DDNS service, a free one: is duckdns.org

Default
0.0.0.0
Value
0.0.0.0
Storjstat.com API-KeyVariable

API-Key for Storjstat.com.

Target
STORJ_MONITOR_API_KEY
Number of extra nodesVariable

Storj daemon can run multiple farming nodes at once. The maximum number of nodes per container is number of threads the CPU has.

Target
NODE_COUNT
Default
0
Value
0
Custom node-directory nameVariable

For multiple nodes this builds your directory, example /storj/thisNameHere#/

Target
NODE_DIR
Default
Node_
Value
Node_
Tunneling RequiredVariable

TCP NAT tunnel on/off switch

Target
TUNNELING_REQUIRED
Default
TRUE
Value
FALSE
Delete log filesVariable

Delete Storj logs on/off switch. Enable == 'TRUE'

Target
DEL_LOGS
Default
FALSE
Value
FALSE
Number of log files to keep (days)Variable

How many days worth of logs to keep. Deletes everything greater than.

Target
DEL_LOGS_DAYS
Default
7
Value
7