description |
---|
How to connect your ETH wallet to your own node's RPC endpoint |
- Privacy: No spying by middleman between you and the blockchain
- Trustless verification: Ability to verify the ETH transaction data you see is raw and not manipulated
- Decentralization: No need to depend on Infura or other centralized 3rd parties
- Coolness and credibility: Using Ethereum as it was meant to be, a step towards being more sovereign
{% hint style="info" %} Before continuing please understand the following:
- As this method uses SSH tunneling, no changes are required to your firewall or router's port forwarding {% endhint %}
Double check that your node is listening on port 8545
ss -ntlp | grep 8545
For example, here's the output for Besu with RPC enabled.
LISTEN 0 128 [::ffff:127.0.0.1]:8545 *:* users:(("java",pid=26453,fd=433))
{% hint style="warning" %} Port 8545 is NOT listening or using Geth or Besu?
Note: Nethermind and Erigon enable RPC by default.
The following flags on the ExecStart
line are required to enable RPC.
Geth
--http
Besu
--rpc-http-enabled=true
--rpc-http-cors-origins="*"
Changes can be made to the systemd unit file execution.service,
sudo nano /etc/systemd/system/execution.service
To exit and save, press Ctrl
+ X
, then Y
, then Enter
.
Make sure to reload and restart.
sudo systemctl daemon-reload
sudo systemctl restart execution
{% endhint %}
{% hint style="info" %} Every time you want to use your node as an RPC endpoint, you must open a SSH tunnel connection with port 8545 forwarded.
Exception: Local nodes (i.e. using Ubuntu Desktop) - if you're accessing your wallet on the same machine as your node, skip this step. {% endhint %}
{% tabs %} {% tab title="Linux or MacOS" %} Example of how to create a SSH tunnel in Linux or MacOS:
ssh -N -v <user>@<staking.node.ip.address> -L 8545:localhost:8545
#Full Example
ssh -N -v ethereum@192.168.1.69 -L 8545:localhost:8545
{% endtab %}
{% tab title="Windows" %} Example of how to create a SSH tunnel in Windows with Putty:
Navigate to Connection > SSH > Tunnels > Enter Source Port 8545
> Enter Destination localhost:8545
> Click Add
Now save your configuration. Navigate to Session > Enter a session name > Save
Click Open to open a connection {% endtab %} {% endtabs %}
When configuring your wallet, you can reference the following network information:
Network | Chain ID | Block Explorer | Currency |
---|---|---|---|
Mainnet | 1 | https://etherscan.io | ETH |
Holešky | 17000 | https://holesky.etherscan.io | HoleskyETH |
Goerli | 5 | https://goerli.etherscan.io | GoerliETH |
Sepolia | 11155111 | https://sepolia.etherscan.io | SepoliaETH |
Here are steps to configure popular wallets to use a custom RPC URL endpoint.
Rabby
Download from https://rabby.io
- Click More
- Click Custom RPC
- Click Add RPC
- Select the network. If testnet, you might need to go back a menu and enable testnets.
- Fill in the RPC URL as http://127.0.0.1:8545
- Rabby will now show your balances with this RPC.
Example of Adding a Network:
Frame
Download from https://frame.sh
- Open Chains
- Either add to an existing chain (i.e. Mainnet) or Click "Add New Chain"
- Fill in Primary (if new chain) or Secondary (if existing chain) RPC URL as http://localhost:8545
- If required, fill in Chain name, Chain ID, Native symbol, Native Currency Name and Block Explorer with data from above table
- Click ADD CHAIN button
- Frame will now display your balances with this RPC.
Example of Adding a Network:
Metamask
Download from https://metamask.io
- Open Settings
- Open Networks
- Click "Add a network" > Add a network manually
- Fill in New RPC URL as http://localhost:8545
- Fill in Network name, Chain ID, Currency symbol, and Block Explorer with data from above table
- Click Save button
- Finally, click the top left button and "Select a Network", the network which you just added.
Example of Adding a Network:
{% hint style="success" %} Great job! You're now using your own node as your own RPC URL endpoint. {% endhint %}