How to Add a Custom Solana RPC Node to Phantom (2024)

Phantom is the most widely used wallet on Solana because it has a simple user interface and gives developers options for easily connecting to Solana’s Devnet.

Because transactions on a public RPC endpoint may experience latency and hit throughput limitations, this article explains how Solana developers can update their Phantom wallet settings to add a custom Solana endpoint.

Whether you’re configuring your Solana developer tools for the first time, or need better Solana node performance, this article will explain how developers can add a custom Solana RPC endpoint to their Phantom wallet using Alchemy and an HTTP Proxy server.

Because Phantom does not let users change their network, an HTTP Proxy server can be used to connect to a custom node when changing Phantom’s network to ‘localhost’.

📘

DISCLAIMER:

The below solution is most applicable for web3 developers who know JavaScript, since it requires you to write a small running code snippet. Because Phantom doesn't allow you to change network RPC URLs on the wallet itself, non-technical web3 wallet users still need to use the default RPC URL Phantom provides.

If you'd like Phantom to allow for their users to switch to an Alchemy RPC URL for faster, more reliable transactions, please fill out this form.

Here is what you will need to complete this tutorial:

  • NodeJs is installed on your machine (version 16 or higher)
  • NPM package installed (version 8)
  • Phantom Wallet
  • Code editor e.g VSCode

Alchemy provides a variety of web3 development tools for Solana developers including best-in-class Solana RPC infrastructure.

  1. Go to the Alchemy dashboard
  2. Create a free account*
  3. Choose “Solana” as the app’s chain

How to Add a Custom Solana RPC Node to Phantom (1)

📘

If you are an existing user, sign in and create a new Solana app.


Here is the information you need to create a Solana app:

  1. Name - Project’s Name
  2. Chain - Solana
  3. Network - Mainnet

For more information on setting up an Alchemy account, read the Alchemy Quickstart tutorial.

In the next section, we will go through how you can add a custom RPC to Phantom.

On your Phantom wallet locate the wallet icon on the top left of the pop-up. Then scroll down to ‘Developer Settings’ and click on 'Change Network'.

Select the Localhost option and it should automatically take you to the home screen. You get the message “Failed to get assets” because you do not have a custom RPC set up yet.


How to Add a Custom Solana RPC Node to Phantom (2)


Step 3: Install the HTTP Proxy Package

The HTTP Proxy package acts as an HTTP Client and an HTTP Server. You can install it by running the following command in your terminal:

npm install http-proxy --save

Because there is no way to add a custom RPC to Phantom directly, we need to use a Node.js proxy server to act as an intermediary between the wallet and our Alchemy HTTP endpoint.

Now, each time your Phantom wallet sends a request, it will send the transaction to the proxy, which then gets routed through the Alchemy HTTP endpoint.

This step of the process will create a new directory and create a proxy server to listen to localhost port 8000 and console logs a response when it is listening.

First, create a new directory and navigate into it.

mkdir node_servercd node_server

Next, create a main.js file in the directory and copy the following code snippet into it:

var http = require('http'),httpProxy = require('http-proxy');httpProxy.createProxyServer({target:'ALCHEMY_HTTPS_URL', changeOrigin:true}).listen(8899);console.log("listening on: 8899");

Then, let’s update your proxy server’s URL.

  1. Click “View Key” from your Solana App’s dashboard
  2. Paste this key into the main.js code snippet
  3. Save the file

Finally, run the file in your terminal:

node main.js

Step 5: Confirm Phantom is Working

Open your Phantom wallet, and you should notice that the original “Failed to get assets” error message disappeared, and all of your assets load successfully. This is because Phantom is able to send and receive RPC requests through your local HTTP Proxy server with Alchemy.


How to Add a Custom Solana RPC Node to Phantom (3)


This article explains how Solana developers can add a custom RPC node to their Phantom wallet by creating a localhost HTTP Proxy server. For more information about Solana nodes, read our guide to Solana nodes and our Solana API documentation.

Updated over 1 year ago

How to Add a Custom Solana RPC Node to Phantom (2024)

FAQs

How to Add a Custom Solana RPC Node to Phantom? ›

Once a transaction is created, the web application may ask the user's Phantom wallet to sign and send the transaction. If accepted, Phantom will sign the transaction with the user's private key and submit it via a Solana JSON RPC connection.

What RPC does Phantom Wallet use? ›

Once a transaction is created, the web application may ask the user's Phantom wallet to sign and send the transaction. If accepted, Phantom will sign the transaction with the user's private key and submit it via a Solana JSON RPC connection.

How to add Solana node? ›

Install Solana Binaries
  1. Download Solana Binaries. ...
  2. Create Validator Keypair. ...
  3. System Requirements and Optimization. ...
  4. Create Startup Script and Systemd Service. ...
  5. Monitor Node Operation. ...
  6. Improve RPC Node Performance. ...
  7. Create a User for Solana RPC Node. ...
  8. Install Nginx.

How to add custom RPC on Phantom? ›

How to Add a Custom Solana RPC Node to Phantom
  1. Step 0: Prerequisites.
  2. Step 1: Create a Solana Node on Alchemy.
  3. Step 2: Change your Network to Localhost.
  4. Step 3: Install the HTTP Proxy Package.
  5. Step 4: Create an HTTP Proxy Server.
  6. Step 5: Confirm Phantom is Working.
  7. Conclusion.

How do I add RPC? ›

How do I connect to an RPC using MetaMask?
  1. Go to MetaMask's website and download the MetaMask wallet. ...
  2. After installing and securing your 12-word secret recovery phrase, a) click on Ethereum Mainnet at the top of the MetaMask wallet screen and b) select Add Network.

What is the RPC URL for Solana Network? ›

​ Summary
NetworkPublic RPC Url
Ethereumhttps://cloudflare-eth.com
Solanahttps://api.mainnet-beta.solana.com
Optimismhttps://mainnet.optimism.io
Gnosis Chainhttps://rpc.gnosischain.com
4 more rows

Is Phantom wallet same as Solana wallet? ›

Phantom Wallet is a non-custodial cryptocurrency wallet and browser extension that provides users a secure and user-friendly way to manage their digital assets. Initially made for the Solana blockchain, Phantom now supports Ethereum, Polygon and Bitcoin, but remains one of the most popular wallets for Solana.

What is the best RPC node for Solana? ›

Backpac enhances blockchain connectivity for reliable data access. Advanced nodeOps tooling with fast and zero-rate-limit access to 100+ blockchain networks. Among the many node options, Ligma Nodes stands out as the best on Solana for reliability and performance.

What are the requirements for RPC nodes in Solana? ›

12-core CPU with 2.8GHz clock speed minimum. 128/256GB of RAM (RPC nodes might require more for custom database indices) 2-4 NVME drives of at least 1TB. 10 Gbps Network.

Is running Solana node profitable? ›

Running a Solana validator is expensive and time-consuming. But the network rewards validators that perform well and help improve network decentralization. If you fall into that category, you can quickly gather stake and break even. Even if you don't, running a Solana validator isn't a blackhole for money.

Is Phantom the best wallet? ›

Phantom is arguably the top wallet for staking your SOL, especially when it comes to liquid staking. Liquid staking enables you to maximize your rewards, gain flexibility to participate in DeFi, and helps secure the Solana network, which is good for the ecosystem.

Is Phantom Wallet a cold wallet? ›

Wallets that come in the form of browser extensions/mobile apps (e.g. Phantom) are referred to as “hot wallets”, as they are always connected to the Internet and accessible online.

How to add Solana RPC to MetaMask? ›

How to Add Solana to MetaMask
  1. Step 1: Obtain the Wrapped Solana Contract Address. First, head to the CoinMarketCap page containing the Wrapped Solana's contract address. ...
  2. Step 2: Confirm Default Network on MetaMask. ...
  3. Step 3: Import and Add Solana to MetaMask.
Jun 26, 2024

What is the RPC URL for Solana? ›

Solana Mainnet RPCs

To get data from the Solana blockchains Mainnet Beta cluster, you must make a JSON-RPC request to an RPC node participating in the network. This request asks the RPC node found at https://api.mainnet-beta.solana.com for the getBlock RPC method.

How do I create a custom Solana token? ›

CREATE SOLANA TOKEN STEP BY STEP
  1. Connect your wallet to be able to use the software.
  2. Enter the name of your token.
  3. Indicate the abbreviation of your SPL Token "Symbol" (max. ...
  4. Select the decimals of your token (most often 6 decimals).
  5. Select the supply.
  6. Upload your tokenimage (PNG format)

How do I get custom RPC in MetaMask? ›

Go to Settings on MetaMask

Open your web browser and click on the Metamask extension icon. Click on your avatar on the top right corner and click on Settings . Click on the Networks tab. This is the tab where you will be able to add and edit custom RPC networks.

Top Articles
option contract
§ 28:2–608. Revocation of acceptance in whole or in part. | D.C. Law Library
Kmart near me - Perth, WA
Senior Tax Analyst Vs Master Tax Advisor
Big Y Digital Coupon App
Buckaroo Blog
Strange World Showtimes Near Amc Braintree 10
Anki Fsrs
Alaska: Lockruf der Wildnis
Nioh 2: Divine Gear [Hands-on Experience]
Directions To O'reilly's Near Me
Meritas Health Patient Portal
Kiddle Encyclopedia
Missed Connections Inland Empire
Sizewise Stat Login
Zack Fairhurst Snapchat
Craigslist Prescott Az Free Stuff
1989 Chevy Caprice For Sale Craigslist
Scout Shop Massapequa
Walmart Near South Lake Tahoe Ca
Purdue 247 Football
St Clair County Mi Mugshots
John Chiv Words Worth
Thick Ebony Trans
Teekay Vop
25 Best Things to Do in Palermo, Sicily (Italy)
Wsbtv Fish And Game Report
Apparent assassination attempt | Suspect never had Trump in sight, did not get off shot: Officials
Water Temperature Robert Moses
Evil Dead Rise Showtimes Near Sierra Vista Cinemas 16
Pixel Combat Unblocked
Jt Closeout World Rushville Indiana
Kaiser Infozone
Landing Page Winn Dixie
Wega Kit Filtros Fiat Cronos Argo 1.8 E-torq + Aceite 5w30 5l
Martin Village Stm 16 & Imax
What Is Xfinity and How Is It Different from Comcast?
Gerber Federal Credit
Pensacola 311 Citizen Support | City of Pensacola, Florida Official Website
Umiami Sorority Rankings
10 games with New Game Plus modes so good you simply have to play them twice
O'reilly's Palmyra Missouri
Marcal Paper Products - Nassau Paper Company Ltd. -
Enr 2100
Tacos Diego Hugoton Ks
Theater X Orange Heights Florida
Maplestar Kemono
Anonib New
Msatlantathickdream
Bluebird Valuation Appraiser Login
Craigslist Monterrey Ca
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6265

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.