How to change the default P2P port to another?

Is it possible to modify the P2P port defined by default 8233 in a node for another one?
I only found Tor Support in Zcash — Zcash Documentation 5.0.0 documentation where some flags are mentioned but I think it’s not what I am looking for.
I only want to modify that port. Do I have to define some env variable or add some flag?
Thank you in advance.

Howdy,

It is possible to make this change using the following flags per your environment.

rpcbind
rpcport

IIRC tor configs need other flags to operate gracefully. Please let us know if you run into other issues. Always happy to help.

But i thought rpcport was for rpc endpoint(default is 8232), i wanted to change the peer to peer port that is 8233 by default. Troubleshooting Guide — Zcash Documentation 5.1.0 documentation
This one 8233 for mainnet peer-to-peer network not this one 8232 for mainnet RPC 8232 for mainnet RPC.
Thank you in advance, and sorry for the delay answer

Yep, rpcport is used for the RPC interface (e.g. zcash-cli); you’d change the peer-to-peer port by setting port=... (there is also bind for selecting which IP to bind to).

By the way, a lot of these settings are inherited from bitcoind, so a good first guess would be to check what the corresponding setting is for Bitcoin and checking if Zcash has the same, and indeed it is :slight_smile: This also means that configs used to, say, Tor-ify bitcoind are a good starting point to Tor-ify zcashd. (Zcash has not integrated Onion v3 support yet, so there are differences related to using Tor hidden services.)

Ok thanks , I clould set up the p2p port with the flag -port in the same way it done with bitcoins as you said, Thank you very much!