Geth – How to Run Geth for Ropsten and Mainnet on the Same Server

go-ethereumnodesropsten

Is it possible to run geth for ropsten and mainnet in a same server if I changed all the port for Ropsten node trying not to conflict the ports used in mainnet?
For example, geth --rpcport 8546 --port 30301 --testnet (for Ropsten) and geth (for mainnet)?
Thank you.

Best Answer

Yes you can. You must use different port and rpcport if you want to do this, just as you suggested.

geth --port 30303 --rpc --rpcport 8545 ...
geth --testnet --port 30304 --rpc --rpcport 8546....

Note: the port and rpcport in the first command are not necessary, as they are the default values. I have included them in order to be explicit.

Related Topic