Change port 9944

Hi. I have another node (gear) on port 9944. How I can change port to another? Can you give commands, please.
I use this script - wget -q -O && chmod +x && sudo /bin/bash

In general all that needs to be done is adding some parameters to the farmer and the node.

Add --rpc-port PORT_NUMBER to the end of parameters.

Add --node-rpc-url ws://localhost:PORT_NUMBER to the end of parameters.

PORT_NUMBER needs to be replaced with the port you want to use, for instance 9945.

Though it looks like you are using a community made script so I wouldn’t be able to speak too much to how to change that exactly but I can suggest checking out the docker instructions as its a little more open to modification.


can you describe the commands in more detail, it’s a bit difficult for me, please

I have edited answer above a bit.
The idea is that you typically run node and farmer with some parameters already, you just need to add some more at the end to change default port.

You’re using unofficial instructions, so for clarifications on where to change those parameters you need to ask the author of the guide or switch to official instruction, for instance Docker setup is fairly easy to do and I think will achieve the same goal as the script you’re trying to use.

BTW, running random scripts from the Internet is a bad practice, especially bad practice is to run them under sudo!