Guide to install Storj on synology

In “docker run…”
you have
-p 127.0.0.1:14002:14002 (view only at the server)
or
-p 14002:14002 (view on LAN)

https://documentation.storj.io/setup/cli/dashboard

dears
will be there someone, who will help noob with stepbystep?

what I’ve done:

  1. i’ve compatibile Synology with docker
  2. installed docker from offcicial packages
  3. created shared folder Storj on Volume2 - the shared folder Docker already existed (probably cause I’ve choosen Install volume during Docker install to Volume2)
  4. generated token
  5. on Windows machine went through Identity
  6. copy address from Myetehrwallet

but next? SSH to Synology, ok and?

simply copy *.key files (all files)? where? As I’ve mentioned before, I’ve

/volume2/Storj (empty)
/volume2/docker (empty)

I’ve created:
storjlabs-storagenode1

with mounted folder Storj to /volume2/Storj and docker to /volume2/Docker
in environment I’ll enter mail address, wallet, storage and set Setup to true.

than run? and wait for……? later create storjlabs-storagenode2 with the same, just „setup false“?

Thanks, Zdeněk

Hello,
Just read this and dont use docker gui on synology and create container using command on SSH

https://documentation.storj.io/setup/cli/storage-node

  • synology is linux but dont do this
    “Linux Users: You must static mount via /etc/fstab.”

If you created and signed identity on windows just copy to synology

Zdravím z ČR

thx Kryštof
will be easier to continue in czech, but I guess it’s against to forum rules …

anyway, I’ve red it, of course, but it’s not clear. Ok, I can delete via GUI created container, no problem. Just to verify, steps 1-5 I did right, ok?

both folders are empty, is it ok?

this step
docker pull storjlabs/storagenode:latest
is not needed, cause it was done via gui of Synology, right? (= installing latest version of Docker). I can run it again, but if there is no newer version, it will do “nothing”

than
docker run --rm -e SETUP="true" \ --mount type=bind,source="<identity-dir>",destination=/app/identity \ --mount type=bind,source="<storage-dir>",destination=/app/config \ --name storagenode storjlabs/storagenode:latest
I don’t see the relation between + vs /volume2/docker + /volume2/Storj shared folders. And the syntax is - i mean the stting between quotation marks should be /volume2/docker or ./volume2/docker or /volume2/docker/?

and where exactly should be copied files generated by Windows machine? to and directly to root? Will you be so nice and post ls of yours folders?

thank you very much, Zdeněk

You can do it, just answer with split (it will create a new thread).


For easy filtering you can tag your topic with v-češtině tag or similar. Then any who can speak on Czech will be able to filter such topics.
Or moderators can split it later

It is still needed.

Create another dir /volume2/Storj/identity and copy all files of signed identity to there.
You can use scp command for that:

scp -r %AppData%\Identity\storagenode\*.* admin@synology-IP:/volume2/Storj/identity/

if you use a PowerShell, then replace %AppData% to $env:AppData. You need to use IP of your Synology instead of synology-IP in my example.

You need to replace "<storage-dir>" to /volume2/Storj and "<identity-dir>" to /volume2/Storj/identity

The usual docker run must use the same paths, the -e SETUP="true" must be removed, all other parameters should be specified as well: Storage Node - Storj Docs

Thanks @Alexey docker is running. But, on firewall (internet hw fw) I’ve allowed port 28967 forward to Synology. 14002 is not necesary for me. But local_ip:14002 doesn’t work - must be somehow allowed on fw of Synology? or there must by another port forward on synolgy statiton do Docker?

thanks

this I get by ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8963acb030b4 storjlabs/storagenode:latest "/entrypoint" 32 seconds ago Up 28 seconds 127.0.0.1:14002->14002/tcp, 0.0.0.0:28967->28967/tcp storagenode

You can use a remote connection to the dashboard: How to remote access the web dashboard - Storj
Or you can remove 127.0.0.1 from the -p 127.0.0.1:14002:14002 option to become -p 14002:14002, it will allow to connect from any device in your local network. It’s less secure than the first option.
To change any option you need to stop and remove the container:

docker stop -t 300 storagenode
docker rm storagenode

Then run it back with all your parameters include changed ones.

1 Like

Thanks. I just didn’t know how to stop the server. I got this from another post:

docker stop -t 300 storagenode
docker rm storagenode

Thank you!

Guys probably a simple one for you all… but I am trying to create a storj docker node on my synology. I am using this config

sudo docker run -d --restart always --stop-timeout 300
-p 28970:28967
-p 14002:14002
-e WALLET=“0x49ca955fd60D0FA9f0A6a4910d26fFaF5772BD1E”
-e EMAIL="takenmyemailaddressout@gmail.com"
-e ADDRESS=“tootie.duckdns.org:28970
-e STORAGE=“10TB”
–log-opt max-size=50m
–log-opt max-file=10
–user $(id -u):$(id -g)
–mount type=bind,source=/volume1/Storj/Identity,destination=/app/identity
–mount type=bind,source=/volume1/Storj/StorjData,destination=/app/config
–name storagenode storjlabs/storagenode:latest

The issue is the mounting of the drive… it seems that the share is not allowing docker from creating folders with in the /volume1/Storj/StorjData folder.

Here are the logs below

2022-06-20 11:45:41 stdout 2022-06-20 11:45:41,403 INFO stopped: processes-exit-eventlistener (terminated by SIGTERM)
2022-06-20 11:45:40 stdout 2022-06-20 11:45:40,398 INFO stopped: storagenode-updater (exit status 0)
2022-06-20 11:45:40 stdout 2022-06-20T11:45:40.392Z INFO Got a signal from the OS: terminated {Process: storagenode-updater}
2022-06-20 11:45:40 stdout 2022-06-20 11:45:40,392 INFO waiting for processes-exit-eventlistener, storagenode-updater to die
2022-06-20 11:45:40 stdout 2022-06-20 11:45:40,390 WARN received SIGQUIT indicating exit request
2022-06-20 11:45:39 stdout 2022-06-20 11:45:39,385 INFO gave up: storagenode entered FATAL state, too many start retries too quickly
2022-06-20 11:45:38 stdout 2022-06-20 11:45:38,380 INFO exited: storagenode (exit status 1; not expected)
2022-06-20 11:45:38 stdout — stat config/storage/trash: no such file or directory
2022-06-20 11:45:38 stdout — stat config/storage/garbage: no such file or directory
2022-06-20 11:45:38 stdout — stat config/storage/temp: no such file or directory
2022-06-20 11:45:38 stdout — stat config/storage/blobs: no such file or directory
2022-06-20 11:45:38 stdout Error: Error starting master database on storagenode: group:
2022-06-20 11:45:38 stdout 2022-06-20T11:45:38.345Z INFO Operator wallet {Process: storagenode, Address: 0x49ca955fd60D0FA9f0A6a4910d26fFaF5772BD1E}
2022-06-20 11:45:38 stdout 2022-06-20T11:45:38.343Z INFO Operator email {Process: storagenode, Address: simon.brownridge@gmail.com}
2022-06-20 11:45:37 stdout 2022-06-20 11:45:37,920 INFO spawned: ‘storagenode’ with pid 66
2022-06-20 11:45:34 stdout 2022-06-20 11:45:34,899 INFO exited: storagenode (exit status 1; not expected)
2022-06-20 11:45:34 stdout — stat config/storage/trash: no such file or directory
2022-06-20 11:45:34 stdout — stat config/storage/garbage: no such file or directory
2022-06-20 11:45:34 stdout — stat config/storage/temp: no such file or directory
2022-06-20 11:45:34 stdout — stat config/storage/blobs: no such file or directory
2022-06-20 11:45:34 stdout Error: Error starting master database on storagenode: group:
2022-06-20 11:45:34 stdout 2022-06-20T11:45:34.873Z INFO Operator wallet {Process: storagenode, Address: 0x49ca955fd60D0FA9f0A6a4910d26fFaF5772BD1E}
2022-06-20 11:45:34 stdout 2022-06-20T11:45:34.868Z INFO Operator email {Process: storagenode, Address: simon.brownridge@gmail.com}
2022-06-20 11:45:34 stdout 2022-06-20 11:45:34,505 INFO spawned: ‘storagenode’ with pid 58
2022-06-20 11:45:32 stdout 2022-06-20 11:45:32,486 INFO exited: storagenode (exit status 1; not expected)
2022-06-20 11:45:32 stdout — stat config/storage/trash: no such file or directory
2022-06-20 11:45:32 stdout — stat config/storage/garbage: no such file or directory
2022-06-20 11:45:32 stdout — stat config/storage/temp: no such file or directory
2022-06-20 11:45:32 stdout — stat config/storage/blobs: no such file or directory

any help ?

simon

Did you run the setup step?

sudo docker run --rm -e SETUP="true" \
    --mount type=bind,source="/volume1/Storj/Identity",destination=/app/identity \
    --mount type=bind,source="/volume1/Storj/StorjData",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest
2 Likes

I think i have found a new love in my life and their name is BrightSilence… thanks so much for the quick reply…

I ran that setup followed by the you suggested BrightSilence followed by the storj setup and that now worked

Thanks again!

1 Like

Sorry for resurrecting old thread, but I find it very interesting and actual, it can help.
I see you are strongly recommending using command line. I will try to go fully GUI way instead, let’s see if it will work :wink:

Because my Synology NAS runs very important services for me, and I’m not as comfortable with command line, I don’t want to mess something up. SSH / command line access is and will always stay off here :innocent:

Prerequisites:

  • have folders ready for data storage /docker/storj11/data - empty, and with signed Identity docker/storj11/Identity
  • have Synology Container Manager v. 24
  • have port 28967 forwarded to the Synology IP address

In Container Manager go to Registry tab and type storj to search field:

Click storagenode and Download
After a few minutes, it will ask for Tag, leave there Latest and proceed with Download. Then the image pops up in Image tab:

Select the storagenode row (not the Name) and click Run above
Give it a name, DO NOT Enable auto-restart at this moment:

On Advanced Settings page fill following:

  • Listening ports: 28967 TCP+UDP, 14002 TCP
  • Map folders: /docker/storj11/Identity to /app/identity, /docker/storj11/data to /app/config
  • Environment variables - as usually, except: SETUP = true (will need to change it back to False after first run completed)
  • Network - change to host


Summary will be as follows:



Click Done, now the node will start, and stop immediately as setup is completed (Synology will report Container storjlabs-storagenode-1 stopped unexpectedly…, that’s fine)

Since Synology does not allow changing any Variables, they recommend to do it by duplicating the container.

Click on the container name (not on the Image name)

Click Duplicate

Change only following settings

  • turn on Enable auto-restart
  • in my case it does not remember Port Settings so I need to set them up again (refer to above)
  • change SETUP to false

—That’s all folks —


Now you can delete the first container - that is not running

Now you will see the folders created and filled:

Container Details (It is not showing Network utilization, not sure why)

Starting to consume RAM :slight_smile:

Log:


this is not good though, the logs will not load any longer once the number is higher, it keeps Loading forever, we will need to redirect logs to a file (TBD)

1 Like

ok, so as for the log, in docker\storj11\data\config.yaml I changed

# can be stdout, stderr, or a filename
# log.output: stderr

to

# can be stdout, stderr, or a filename
log.output: "/app/config/node.log"

restarted the container, and now the log is in docker\storj11\data\node.log as text file

Will not these log file grow indefinitely?

By default logs are written to stdout and stderr, which are rotated by Docker. But if you write logs to file - I’m not sure how that would be rotated.

Well, even if docker perform the rotation, still the log was longer that the web frontend could load. The file log - yes it will grow unless manually renamed/deleted. But it makes no harm when the log is 10 GB and more, at least on my other Windows nodes.

Why nobody links my guide? :unamused:
https://forum.storj.io/t/my-docker-run-commands-for-multinodes-on-synology-nas/22034?u=snorkel
Also search for Synology memory upgrade guide.

1 Like

Good point, your great guide for those comfortable with manually running root commands. Whereas I was focusing on those who wants to use Synologys interface that makes it totally safe and foolproof. Obviously the GUI does not provide as much and detailed config possibilities. But it simply works.
As for RAM, I’m fine with my 20 GB (having around 8 GB free constantly) for now.

They may setup a logrotate.

Not sure, that it can be used on a Synology NAS though.

1 Like