Introduction
Ganache CLI runs a local simulated Ethereum node based on EthereumJS.
If you are running a Ganache CLI node on a remote machine, you may want to connect to it with MetaMask for development purposes.
Step-by-step
Install Ganache CLI
Run:
npm install -g ganache-cli
Run a Ganache CLI node with remote access
Run:
ganache-cli -h IP_ADDRESS
where
- IP_ADDRESS — the IP address of the machine you are starting the node on.
The Ganache CLI node will start and show you the address it is listening for connections on.
Example:
Listening on 164.90.210.149:8545
Connect MetaMask
1. Open your MetaMask and click the network selector:
2. In the network selector, click Custom RPC:
3. In the New RPC URL field, enter the URL in the following format:
http://IP_ADDRESS:PORT
where
- IP_ADDRESS — the IP address of the machine you are running your Ganache CLI node on.
- PORT — the port your Ganache CLI is listening on as provided by the node when started.
Example:
4. Click Save.
If you have any questions, feel free to contact Chainstack support by emailing support@chainstack.com or by submitting this form.
See also:
Comments
0 comments
Article is closed for comments.