# Dashboard: Shutdown button for secure Node power off

**URL:** <https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058>\
**Category:** Storage Node feature requests - voting\
**Created:** [May 22, 2020, 4:39pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058 "2020-05-22T16:39:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![victorelec14](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/victorelec14/32/71_2.png) [@victorelec14](https://forum.storj.io/u/victorelec14)\
**Post date:** [May 22, 2020, 4:39pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/1 "2020-05-22T16:39:41Z")

</div>

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 😃

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [May 22, 2020, 4:54pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/2 "2020-05-22T16:54:50Z")

</div>

> [@victorelec14](#):
>
> to prevent shutting down the node while writing information

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

> [@victorelec14](#):
>
> -t 300

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.

---

<div class="post-metadata">

**Author:** ![victorelec14](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/victorelec14/32/71_2.png) [@victorelec14](https://forum.storj.io/u/victorelec14)\
**Post date:** [May 22, 2020, 4:57pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/3 "2020-05-22T16:57:13Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [May 22, 2020, 6:08pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/4 "2020-05-22T18:08:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [May 22, 2020, 7:07pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/5 "2020-05-22T19:07:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [May 22, 2020, 8:10pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/6 "2020-05-22T20:10:09Z")

</div>

> [@victorelec14](#):
>
> 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?

You should update your `docker run` command:

> **[Storage Node - Storj Docs](https://docs.storj.io/node/get-started/install-node-software/cli/storage-node)**
>
> Make the world your data center

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.

---

<div class="post-metadata">

**Author:** ![victorelec14](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/victorelec14/32/71_2.png) [@victorelec14](https://forum.storj.io/u/victorelec14)\
**Post date:** [May 22, 2020, 8:53pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/7 "2020-05-22T20:53:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![victorelec14](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/victorelec14/32/71_2.png) [@victorelec14](https://forum.storj.io/u/victorelec14)\
**Post date:** [May 22, 2020, 8:57pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/8 "2020-05-22T20:57:16Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [May 22, 2020, 9:26pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/9 "2020-05-22T21:26:14Z")

</div>

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:

> **[Use bind mounts](https://docs.docker.com/storage/bind-mounts/#differences-between--v-and---mount-behavior)**
>
> Bind mounts have been around since the early days of Docker. Bind mounts have limited functionality compared to volumes. When you use a bind mount, a file or directory on...

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [May 22, 2020, 9:46pm UTC](https://forum.storj.io/t/dashboard-shutdown-button-for-secure-node-power-off/7058/10 "2020-05-22T21:46:14Z")

</div>

> [@victorelec14](#):
>
> 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 🙂

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.
