21

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?

Smart Kid
  • 6,583
  • 2
  • 37
  • 63
JohnHanks
  • 761
  • 1
  • 7
  • 18

3 Answers3

25

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.

Clement J.
  • 3,349
  • 2
  • 16
  • 35
10

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

254123179
  • 4,586
  • 4
  • 32
  • 58
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.

user36303
  • 34,928
  • 2
  • 58
  • 123