Time ago, I installed the drive share tool from the blockchain based storj cloud service on my Synology NAS. Therefore I used the community package “debian chroot” to install the storj share (beta) software. Since this, the Storjshare-CLI went through many releases. With debian chroot, the installation was annoying. That was why I decided to use a Docker container to install the recent CLI.
For this installation, you should be able to:
- connect to your NAS with ssh
- forwarding ports in your router
- and you have to be admin of your NAS
Prepare your Synology NAS
First of all, install a the Docker package in your Synology Package Manager and start them after the installation.
Now, create a folder in one of your volumes named storj (e.g. /volume1/storj/). I recommend you to disable the recycling function, because it would be filled of deleted shared data. Create in that folder an other one named data (e.g. /volume1/storj/data/) and change the permissions for execution.
For the Storj-Deamon, you have to forward the (tcp) ports 4000 to 4004 to your NAS server. Configurate your router for the forwarding.
Install the storjshare daemon CLI
After the pulling, you could check de versions of the package parts with:
The next step is to compile the Docker iso to a background running container. For that use the following command:
Now, go to the Docker app in the Synology DSM interface and stop the container “storj”.
As soon as the container is stopped, you can edit them. Now, setup the ports 4000 to 4004 for the local port and the container port (tcp). In th volume options add the directory you created before (e.g. volume1/storj/) and mount this as /storj/.
Your setting should now look like in the picture above and you can start the container again.
Go back to your terminal and create a new node with the command:
Fill the “<..>” with your content. (but leave the “[nodeid]” in peace) There is now a config.json file created in your directory. You can change these settings whenever you want. (Descriptons at docs.Storj.io or at Github)
Start the daemon
To start the storjshare, you have to start the daemon first. Do this with:
Finally, you can start your storjshare node with the settings saved in your config.json file:
Check the running state from your node with the command:
The output of that should look like:
If there are any problems, write a comment or ask the community on community.storj.io.
Autostart your Storjshare Node
If you start restart your Synology NAS in spite of an update or something else, the Storjshare Node will not. To solve this problem, you can write a start script and install it in the system-settings of your NAS. Therefore, use the text editor of your choice and write the following content to a file named
startup_storjshare.sh and save it on your NAS (e.g. /volume1/storj/startup_storjshare.sh ).
Important: Make this file executable with
chmod +x startup_storjshare.sh
Install the file on your Synology NAS under “Task Scheduler” -> “Create Triggered Task” -> “User Defined Script”. Under the “General tab” write your task’s name (e.g. Storj Startup) and choose the event “Boot-up”. Finally, write the path to your startup script into the “User-defined script” box under the “Task Settings” tab. Now, your share-drive is ready for action.
If there are any questions or additions, please write a comment. I would be very grateful. =D
Upgrade the container to a new release
You can check the status of your node for free at https://storjstat.com/ . If you get following state, you have to upgrade your node.
For that, put following commands into your ssh terminal to stop the container, pulling the latest version, removing the old container and to compile the latest iso as same as the old container:
After this, configure the path and ports for the container with the Synology Docker App as written above. Finally, start your container with your old config-file and check if the node is running: (be patient: the node needs a while to reactivate your shards 😉 )