Dashboard: Shutdown button for secure Node power off

By shutting down a container directly there is a great risk of damaging the database and making the node unusable. Normally before shutting down the command is used:

docker stop -t 300 storagenode

Wouldn’t it be better to put an option in the dashboard to turn off the node and terminate the connection to the database safely and then tell you that you can already turn off the node?

I think it is best to prevent shutting down the node while writing information.

Thanks :smiley:

This is done with -t flag and the number is in seconds

Docker waits for 300 seconds giving enough time for container to gracefully shutdown before killing it forcibly.

You could imitate button behavior using a .bat file (in case of Windows). The action behind the button will probably be the same as executing the above command.

Yes, that’s why I think it would be good to put a button, so you should not enter by ssh and do all that (and wait).

Would it also be possible to reboot the node? or it is not possible to do it while inside the container (the entire container would have to be restarted)

Use “–stop-timeout 300” in your docker run command and you won’t need to use -t300 for stopping the container. Problem solved without a gui button.

2 Likes

Even though it was against the advise by many, a lot of SNOs have exposed their dashboard to the open internet. Putting anything that controls the node on the web dashboard would expose them to attack even more. Just because of this risk, I’m gonna have to abstain from voting for this one, though I do feel your pain, this is not the solution.

2 Likes

You should update your docker run command:

It contains the default timeout for stopping the container to prevent corruption even the operator is forgot to add -t 300 to the docker stop command.

Yes, I saw that many people are opening the external port when it should be on the local network.

Why show them a warning that they should not open it external?, The satellite could also check it and display a message if it is accessible from the outside.

Would it also be nice to allow to put a password to the panel from the environment variables?

Thank you

yes, but in DSM (Synology gui) you cannot put those parameters for the run, in Portainer it seems to me that neither?

Keep in mind that many Storj operators are using docker without knowing what is docker :slight_smile:

Please, do not use a GUI. Use a ssh instead.
Almost all GUI uses -v for volume management, but we must use a --mount instead:

1 Like

You made it harder on yourself by using the GUI in the first place. It’s very dangerous as it uses the unreliable -v mounts as Alexey mentioned. The documentation tells you exactly what you need to do. It’s just a matter of copying and pasting the commands and swapping out your personal info. Figuring out how it works in the GUI takes more effort than setting it up the right way. Please switch asap to prevent future problems.

2 Likes