How to Create a Private RPC Endpoint
Written by Alchemy
Reviewed by Brady Werkheiser
RPC nodes provide a link between blockchains and the decentralized applications (dApps) that run on top of them. Web3 wallets have default RPC node providers so users can easily start interacting with web3 applications, however, sometimes these default, public RPC nodes cause problems for everyday users and web3 developers due to slow network speeds, incorrect blockchain data, and unreliable service (uptime).
In this article we’re going to explain why it is a good idea to create a private RPC endpoint instead of using public RPC endpoints, and how to add one to your MetaMask wallet so you can get faster speeds, accurate data, and more reliable service.
In the context of this article, the term “private RPC endpoint” means a personal RPC endpoint that is not publicly available for everyone else to use. We do not mean that the transactions sent through your personal RPC endpoint are private transactions, that they will settle privately, or that they will not appear in the public mempool.
If you are looking to send private transactions, please refer to the Flashbots API.
What is a private RPC endpoint?
A private RPC endpoint is an RPC endpoint with a unique URL that only the owner can use to send transactions to the public mempool, providing individuals with a direct connection to a node provider.
Private RPC endpoints enable users to publish transactions through a dedicated endpoint instead of using their wallet’s default, public endpoint which is being used simultaneously by the wallet’s other users.
What are the benefits of using a private RPC endpoint?
Using a private RPC endpoint has many benefits including speed, accurate data, more reliable service, and less competition when submitting transactions during periods of high transaction volumes like an exclusive NFT drop.
Here are some of the use cases where traders, developers, and everyday users could benefit from updating their MetaMask wallet from the default RPC endpoint to a personal one:
Sending transactions during an exclusive, first-come-first-serve NFT mint
Sending transactions to capitalize on time-sensitive arbitrage opportunities
Getting reliable service when other node providers experience degraded service during airdrops
There are multiple reasons why web3 users stand to benefit from creating a private RPC endpoint and updating their default web3 wallet settings to send transactions through a personal RPC endpoint.
What are the benefits of using Alchemy for a private RPC endpoint?
Alchemy is the leading web3 node infrastructure provider for Ethereum, Polygon, Arbitrum, Optimism, and many more layer 1 and layer 2 blockchains because of their speed (i.e. low latency), data correctness, and reliability (99.99% uptime), compared to other providers like Infura (MetaMask’s default RPC endpoint provider), and Quicknode.
For everyday users it means Alchemy is faster, more accurate, and dependable than alternative providers.
For developers and traders, using Alchemy has many other benefits from their free account including:
Webhooks for Ethereum, Polygon, Arbitrum, and Optimism
Free archive data
Enhanced APIs
User-friendly debugging and application monitoring tools
A simple-to-use developer dashboard
New accounts can be created in a couple minutes
In addition to these benefits, creating a personal RPC endpoint takes just a couple minutes.
How to Create a Personal RPC Endpoint
We'll use Alchemy to create a personal RPC endpoint. You can create an account for free.
Step 1 - Create an Alchemy Account
Enter your name, email address, and a password to sign up, or log into your existing account.
Step 2 - Create a New App
After creating a new account, you will be redirected to our dashboard, where we can create a new app by clicking on the Create App button as shown below.
Next, input the following app information based on the network for which you want to create a private RPC endpoint.
For the description, you can write anything you want or leave it blank.
Alchemy App Details for a Personal Ethereum RPC Endpoint
Name: Private RPC Endpoint - Ethereum (Mainnet)
Chain: Ethereum
Network: Mainnet
Alchemy App Details for a Personal Polygon RPC Endpoint
Name: Private RPC Endpoint - Polygon (Mainnet)
Chain: Polygon
Network: Mainnet
Alchemy App Details for a Personal Arbitrum RPC Endpoint
Name: Private RPC Endpoint - Arbitrum (Mainnet)
Chain: Arbitrum
Network: Mainnet
Alchemy App Details for a Personal Optimism RPC Endpoint
Name: Private RPC Endpoint - Optimism (Mainnet)
Chain: Optimism
Network: Mainnet
Next, copy the RPC URL provided by Alchemy in the app details as shown below.
Step 3 - Connect to a New Network in MetaMask
Next, open your MetaMask wallet and connect to a new network using the RPC URL from the previous step.
Open Metamask
Click the network name in the window's upper-right corner, as shown below
3. At the bottom of the pop-up window, click the Add Network button.
4. Enter the following network details based on the blockchain for which you created your private RPC endpoint
5. Then click Save
Network Details for Creating a Private Ethereum RPC Endpoint
Network Name: Ethereum Mainnet
New RPC URL: 1 https://eth-mainnet.alchemyapi.io/v2/your-api-key
Chain ID: 1
Currency Symbol: ETH
Network Details for Creating a Private Polygon RPC Endpoint
Network Name: Polygon Mainnet
New RPC URL: https://polygon-mainnet.g.alchemy.com/v2/your-api-key
Chain ID: 137
Currency Symbol: MATIC
Block Explorer URL: https://polygonscan.com/
For more information, read our guide on how to connect MetaMask to Polygon.
Network Details for Creating a Private Arbitrum RPC Endpoint
Network Name: Arbitrum
New RPC URL: https://arb-mainnet.g.alchemy.com/v2/your-api-key
Chain ID: 42161
Currency Symbol: AETH
Block Explorer URL: https://arbiscan.io/
For more information, read our guide on how to connect MetaMask to Arbitrum.
Network Details for Creating a Private Optimism RPC Endpoint
Network Name: Optimism
New RPC URL: https://opt-mainnet.g.alchemy.com/v2/your-api-key
Chain ID: 10
Currency Symbol: ETH
Block Explorer URL: https://optimistic.etherscan.io
For more information, read our guide on how to connect MetaMask to Optimism.
After hitting Save, you’ll be immediately taken to Polygon's Network in the option list!
Create a Personal RPC Endpoint for a Better Web3 User Experience
Private RPC endpoints are a great way for everyday users, builders, and traders to get better performance when trading tokens, minting NFTs, deploying smart contracts, and interacting with dApps on blockchains.
Related overviews
Learn About The Tokenization Initiatives and Why Banking Institutions are Tokenizing Their Assets
Learn About Enterprise Grade Blockchain Infrastructure to Support Your Businesses Specific Needs
Learn About The Advantages, Disadvantages, and Use Cases of Private and Public Blockchains