0

I'm trying to create a private Ethereum network, hence I need to run each node on a different port. However, it wouldn't accept the port number when I assigned a new port number. It uses the default port number.

Starting bootnode:

bootnode -nodekey “./boot.key” -verbosity 7 -addr “127.0.0.1:30301”

Node1 creation code:

geth --networkid 20213 --datadir "./data" --bootnodes enode://b31db920ae792d67396bc195a7aa5c1ba685cfcb9e3fd4a3c77e7c63542d3f2e3196f2878c35bb3951e409fefcb7183d22b946250012209f55e6bce5a19a2575@127.0.0.1:0?discport=30301 --port 30304 --ipcdisable --syncmode full --http --allow-insecure-unlock --http.corsdomain "*" --http.port 8546 --unlock 0x1358679CAFE2b9f0Defc1714B317097E8CB9F4B1 --password password.txt --mine console

You can see a few lines of my console once the above command has completed. The http server was launched on a different port, but when authentication failed, it switched to the default port.

enter image description here

Node2 creation code:

geth --networkid 20213 --datadir "./data" --bootnodes enode://b31db920ae792d67396bc195a7aa5c1ba685cfcb9e3fd4a3c77e7c63542d3f2e3196f2878c35bb3951e409fefcb7183d22b946250012209f55e6bce5a19a2575@127.0.0.1:0?discport=30301 --port 30306 --ipcdisable --syncmode full --http --allow-insecure-unlock --http.corsdomain "*" --http.port 8547 --unlock 0xC53637b4af259F6A93f279A576F3Fa63CCDEA69f --password password.txt console

1.How can I use a different port for each node?

2.Do I need to make any changes to my local machines' settings in order to authorize new ports?

1 Answer 1

0

Your node2 folder need to change it to

geth --networkid 20213 --datadir "./data2" --bootnodes enode://b31db920ae792d67396bc195a7aa5c1ba685cfcb9e3fd4a3c77e7c63542d3f2e3196f2878c35bb3951e409fefcb7183d22b946250012209f55e6bce5a19a2575@127.0.0.1:0?discport=30301 --port 30307 --ipcdisable --syncmode full --http --allow-insecure-unlock --http.corsdomain "*" --http.port 8547 --authrpc.port 8552 --unlock PUT_A_NEW_ACCOUNT_INTO_NODE2 --password password.txt console

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.