Restart node in docker after removing the container

After a reboot of my Pi4 y notice the dashboard is “unable to connect” in http://localhost:14002/

So i figured the node is down and tried to restart it manually. After looking for instructions i ended removing the container
docker stop -t 300 storagenode
docker rm storagenode

just after hitting enter i had the doubt if removing the container is the same as killing the node. (i´m greenie in docker as you can see).

Afterwards, i found a thread about " The storagenode docker run command has been updated"

how do i need to do it to reconnect with my node, instead of creating a new one? I´m not sure if it´s going to be rewritten.

thanks

You can execute the docker run command with your credentials after removing container. Its perfectly alright. Its how you can update your command with new wallet address or increase/decrease storage space.

docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967 \
    -p 127.0.0.1:14002:14002 \
    -e WALLET="0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    -e EMAIL="user@example.com" \
    -e ADDRESS="domain.ddns.net:28967" \
    -e STORAGE="2TB" \
    --mount type=bind,source="<identity-dir>",destination=/app/identity \
    --mount type=bind,source="<storage-dir>",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

3 Likes

well
here i found the answer to all my problems.

history | grep “docker run”

there is the last command with all the parameters.

:slight_smile:

1 Like

Once you’re at it, write this command into a script and run that script in the future. This way you won’t forget the command.