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
How to Find Undervalued Stocks in India - Determine Undervalued Stock Indicators
The Life-Style Guru of Frugality
11 beste sites voor Word-labelsjablonen (2024) [GRATIS]
San Angelo, Texas: eine Oase für Kunstliebhaber
Cranes For Sale in United States| IronPlanet
Froedtert Billing Phone Number
Find All Subdomains
Blairsville Online Yard Sale
Obituaries
What Was D-Day Weegy
Ap Chem Unit 8 Progress Check Mcq
Immediate Action Pathfinder
Buying risk?
Theycallmemissblue
OSRS Dryness Calculator - GEGCalculators
RBT Exam: What to Expect
The Cure Average Setlist
Gdlauncher Downloading Game Files Loop
ARK: Survival Evolved Valguero Map Guide: Resource Locations, Bosses, & Dinos
Kamzz Llc
Used Safari Condo Alto R1723 For Sale
Exl8000 Generator Battery
Greenville Sc Greyhound
Regal Amc Near Me
Living Shard Calamity
eugene bicycles - craigslist
Dmv In Anoka
Pain Out Maxx Kratom
Ticket To Paradise Showtimes Near Cinemark Mall Del Norte
Great ATV Riding Tips for Beginners
Movies - EPIC Theatres
Bfsfcu Truecar
Jamielizzz Leaked
The Procurement Acronyms And Abbreviations That You Need To Know Short Forms Used In Procurement
Street Fighter 6 Nexus
Of An Age Showtimes Near Alamo Drafthouse Sloans Lake
Avance Primary Care Morrisville
“Los nuevos desafíos socioculturales” Identidad, Educación, Mujeres Científicas, Política y Sustentabilidad
Überblick zum Barotrauma - Überblick zum Barotrauma - MSD Manual Profi-Ausgabe
Anguilla Forum Tripadvisor
How to Print Tables in R with Examples Using table()
Lima Crime Stoppers
Subdomain Finder
Vagicaine Walgreens
Dineren en overnachten in Boutique Hotel The Church in Arnhem - Priya Loves Food & Travel
1990 cold case: Who killed Cheryl Henry and Andy Atkinson on Lovers Lane in west Houston?
Puss In Boots: The Last Wish Showtimes Near Valdosta Cinemas
How Did Natalie Earnheart Lose Weight
Turning Obsidian into My Perfect Writing App – The Sweet Setup
Inside the Bestselling Medical Mystery 'Hidden Valley Road'
Ravenna Greataxe
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.