19

What is the Monero P2P port?

What is the Monero RPC port?

What purposes do the different ports serve? Are there other ports Monero needs to have setup properly in order to use extra features?

24

On the daemon side (bitmonerod)

P2P Port is the one used to connect with the other nodes on the network (or locally in some cases).

RPC port (Remote Procedure Call) is used to let other applications such as simplewallet or the GUI interact with the daemon, for instance to get information about a block.

Default ports for the daemon are

  • P2P: 18080 for the mainnet, 28080 for the testnet
  • RPC: 18081 for the mainnet, 28081 for the testnet

They can be changed with following options

  • --p2p-bind-port
  • --testnet-p2p-bind-port
  • --rpc-bind-port
  • --testnet-rpc-bind-port

On the wallet side (simplewallet)

RPC port is used to let other applications interact with the wallet for instance to get balance.

The wallet do not act as a RPC server by default. It can be activated with the option --rpc-bind-port.

For daemon and wallet

The RPC data are exchanged using JSON-RPC a protocol based on JSON data format.

This page shows how to use programming language Python to interact with the daemon or the wallet via RPC.

UPDATE: Added 2 information from user36303 for completeness and because the firewall comment is important

Wallet and daemon may use 53 for DNS, which is optional.

It is recommended to only open the RPC port on your firewall if you need to access RPC from the outside, especially for the wallet.

  • 5
    Please note that these are all TCP ports (except 53 for DNS, which is UDP). – arnuschky Oct 14 '16 at 20:36
  • From my understanding of your answer, if a wallet is on the same machine as the daemon you don't have to open RPC port because the wallet connect to the node directly. Also, If you open the P2P port other machine on your network can mine on your node. Further more, if you forward your router P2P port remote miners will be able to mine on your node as well? Is that correct? firewall-cmd --add-port=18080/tcp --permanent, firewall-cmd --add-port=18081/tcp --permanent not necessary and firewall-cmd --add-port=53/upd --permanent optinally for wallet dns – Louis Loudog Trottier Jun 18 '18 at 3:03
9

You can run Monero without an open port but others will not be able to connect to your node in order to help synchronize their nodes.

Open port 18080 to allow incoming P2P connections. The RPC port is 18081. print_cn will help you verify your incoming connections are working

7

The bitmonerod defaults are:

  • Mainnet:

    P2P: 18080

    RPC:18081

  • Testnet:

    P2P: 28080

    RPC: 28081

The wallet's RPC port has no default.

Wallet and daemon may use 53 for DNS, which is optional.

It is recommended to only open the RPC port on your firewall if you need to access RPC from the outside, especially for the wallet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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