Storj node setup issue: "docker: invalid reference format"

Hi all,

Happy new year! Part of my 2022 goals list is becoming a node operator for fun and maybe a little profit. Looks like Storj has a nice and supportive community so I figured id ask my question here. I have attempted to setup a Storj node (using the CLI) over the weekend following all the documentation.

Steps I have completed so far:

  1. Setup Raspberry pi 4b with 2gb RAM, connected it to my router with an ethernet cable.

  2. Used the Raspberry Pi Imager to install Ubuntu TLS 20.4.3 on an SD and inserted it into the pi.

  3. Setup Ddns in my asus router with recommended No-IP. Enabled portforwarding for port 28967 to the ipv4 from my Raspberry pi.

  4. Setup Storj Identity running the “find key” process and validated if the identity is ok by running:

grep -c BEGIN ~/.local/share/storj/identity/storagenode/ca.cert

and

grep -c BEGIN ~/.local/share/storj/identity/storagenode/identity.cert

which return 2 and 3.

  1. Created a partition and static mounted my Seagate etos 18TB hdd.
lsblk -d -fs /dev/sda1 

now returns mountpoint: /mnt/sda1 among other things like FSType xfs, UUID and label.

  1. Installed docker by using the steps from the docker documentation “Install Docker Engine” and verified it was ok by running:
sudo docker run hello-world
  1. Node setup:
docker pull storjlabs/storagenode:latest

returned “image status is up-to-date”.

  1. Attempted:
sudo docker run --rm -e SETUP="true" \ --mount type=bind,source="~/.local/share/storj/identity/storagenode",destination=/app/identity \ --mount type=bind,source="/mnt/sda1",destination=/app/config \ --name storagenode storjlabs/storagenode:latest

Result: “docker: invalid reference format”

I am pretty much hard stuck now. Using just docker run --rm -e SETUP="true" runs without any issues. I tried running the full command with and without “sudo”. I am not sure my Identity and mnt folders are ok like this but considering the greps from step 4 are successful and I can see my static mounted hdd mountpoint I think it should be. I noticed quite a lot of people had problems with the syntax so I triple checked it on curly quotes and stuff like that.

I could use some pointers and some extra eyes on this :slight_smile: Thanks a ton in advance!

Hi @Mystinion,

This usually indicates the syntax is wrong (bad quotes, missing backslash, …).

Could you provide your command wrapped within triple backticks so it’s readable?
For instance:

    ```
    Your command
    ```

@Pac like this? Edited the original post to make it more readable but here is the snippet. Thank you for mentioning the ``` and taking the time to respond.

sudo docker run --rm -e SETUP="true" \ --mount type=bind,source="~/.local/share/storj/identity/storagenode",destination=/app/identity \ --mount type=bind,source="/mnt/sda1",destination=/app/config \ --name storagenode storjlabs/storagenode:latest

Backslashes are used to cancel the effect of new lines in commands (in this case - in fact it’s used for cancelling the effect of special characters in general).
If you want to run the command in one line, you should remove them.

3 Likes

Oof! I didn’t know that. Typed the command from the documentation without adding the newlines. Thanks a lot! The command runs now it is just complaining about

"~/.local/share/storj/identity/storagenode"

not being an absolute path.

Edit: copied the identity onto the /mnt/sda1 in a separate folder /mnt/sda1/identity and used that path. Setup successful. Last step running the node up next but ill leave that for tomorrow. @Pac Thanks a lot again!

1 Like

I would pause a moment and consider setting your pi4 to boot directly from the hdd
I have had sd cards die without warning. Just an opinion.

I use Samsung SD’s with a 5 year+ warranty. Have one for my Raspberry pi 3 and it never failed. What brand sd’s did you use?

there are many different grades of sd cards, some of them can be just as good as a regular ssd.
but the regular camera sd card will not work well for an OS or such.
or it doesn’t have the endurance of normal ssd’s

backslashes are quite useful for making the run command easy to read and modify, if one uses multiple lines… ofc

Could not resist completing everything. Node is up and running, dashboard works. Topic can be closed.

I am using the SanDisk MAX ENDURANCE 32 GB. 120k hours lifetime is twice as my last NAS HDD has achieved.

Btw. I advise to setup a monitoring with an alerting function, as I could handle a couple of issues and downtimes immediately. Without I would have missed them for some days at least. I am using a shell script to notify by e-mail and Discord push:

1 Like