Changing docker parameters

Hi,

I have been running node in docker for a few days now. There is currently about 300GB of data on the disk.

I need to make some changes to the configuration.
Namely, I want to change the local address and port, domain address and port for this node.

I started the node via docker using the command:

docker run -d --restart unless-stopped --stop-timeout 300 \ -p 28967:28967/tcp \ -p 28967:28967/udp \ -p 10.40.1.9:14002:14002 \ -e WALLET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -e EMAIL="myemail@gmail.com" \ -e ADDRESS="storj.mydomain.co.uk:28967" \ -e STORAGE="9.4TB" \ --user $(id -u):$(id -g) \ --mount type=bind,source=/root/.local/share/storj/identity/storagenode/,destination=/app/identity \ --mount type=bind,source=/mnt/storj1,destination=/app/config \ --name storagenode storjlabs/storagenode:latest

Now if I want to make these changes, how exactly should I do it?

Stop the docker from node, remove it and then create it with the same command as above, only changing the appropriate parameters?

For example:

docker run -d --restart unless-stopped --stop-timeout 300 \ -p 28968:28967/tcp \ -p 28968:28967/udp \ -p 10.90.1.102:14002:14002 \ -e WALLET="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -e EMAIL="myemail@gmail.com" \ -e ADDRESS="storj.mydomain2.co.uk:28968" \ -e STORAGE="9.4TB" \ --user $(id -u):$(id -g) \ --mount type=bind,source=/root/.local/share/storj/identity/storagenode/,destination=/app/identity \ --mount type=bind,source=/mnt/storj1,destination=/app/config \ --name storagenode storjlabs/storagenode:latest

I preferred to ask rather than lose the data that I already have on this node.

Yes, stop/remove container & re-create. The important info is stored in your mount paths.

If you only make changes to config.yaml then stop + start is sufficient to reload it.

It’s possible to use docker compose to streamline this a bit but it’s not in the official documentation - can search the forums.

1 Like

You can tweak the config.yaml too, but the recommended way is to use only the docker run command, because some parameters, even though they are in config, they are ignored, if the run command don’t reffer to them.
The best exemple is the allocated space. If you don’t put the flag in run command (without a value), the config setting is ignored.
So set everything you can in run command.
When you post code in forum, put it between 3 back ticks (or how they are called); or press the dedicated button in the editor < > .

1 Like

Yesterday evening I made the changes and everything works properly.

I don’t have much experience with docker so I preferred to ask.

1 Like

Very well. Ask everything you are uncertain of. We are here to help. We’ve been in your shooes.

2 Likes