In this tutorial, you will set up and secure your own private Ethereum node on GetBlock, taking advantage of GetBlock’s plug-and-play infrastructure, 99.9 % uptime, and multi-chain support so you can focus on building rather than maintaining hardware.

By the end of this guide, you will have a dedicated, access-token-protected Ethereum JSON-RPC endpoint running on GetBlock that only your applications can use. We’ll cover the following:

Prerequisites

Before you start, make sure you have the following in place:

Step 1: Creating a Dedicated Ethereum Node Endpoint

What is a dedicated node endpoint?

A dedicated node endpoint is a private API URL that links to a single Ethereum full or archive node hosted by GetBlock. Since the hardware and bandwidth are reserved just for your project, you don't have to deal with slow-downs from other users or public-RPC rate limits. GetBlock provides 24/7 support for each dedicated node and promises 100% availability, offering the privacy of a self-hosted node without the hassle of managing it yourself.

Key benefits

Step-by-step: create the endpoint

  1. Log in to the GetBlock Dashboard.
  2. In My Endpoints, click Add Endpoint.

  1. Select Ethereum in the protocol list.

  1. Pick Mainnet or a testnet (e.g., Sepolia).

  1. Choose the required API interface (HTTP JSON-RPC, WebSocket, or GraphQL).

  1. Click Get. GetBlock immediately issues an endpoint URL and a fresh access token, e.g. https://go.getblock.io/<ACCESS-TOKEN>/.

You can repeat these steps to generate any number of tokens; each one is an independent, rate-limited channel to the same node.

Configuration options

When the wizard opens, fine-tune the node before checkout:

Option

Purpose

Typical choice

Node type

Full keeps recent state; Archive stores every historical state for deep analytics.

Full for dApps, Archive for explorers/analytics

Node client

Pick the Ethereum implementation you prefer (e.g., Geth, Erigon, Nethermind).

Geth for broad compatibility

API interface

Enable JSON-RPC, WebSocket, or GraphQL endpoints.

JSON-RPC + WebSocket to support subscriptions

After you confirm the settings and complete payment, GetBlock provisions the node (usually in a few minutes). The new dedicated endpoint will appear under Dashboard → My Endpoints—ready for the security hardening we’ll perform in the next step.

Step 2 — Configuring the Ethereum Node

Understanding GetBlock configuration files

GetBlock lets you attach a small configuration file to every dedicated node. The file is read by the underlying Ethereum client (Geth, Erigon or Nethermind) when the service starts, so you can keep all runtime flags, RPC-module choices and storage options in one place instead of hard-coding them in your app. Because the file lives inside the node container—not in your codebase—it also prevents you from accidentally committing credentials or IP addresses to a public repo.

Typical sections you can place in the file include:

Category

What you control

Examples*

Network

Chain ID, sync mode, checkpoint, peers

--syncmode=snap, --bootnodes=<enode…>

RPC / APIs

Enabled modules, HTTP/WS ports, host allow-list

--http.api=eth,net,trace, --ws.origins=*

Storage

Pruning depth, database-cache size, archive mode

--gcmode=archive, --cache=4096

Security

CORS domains, JWT secrets, rate limits

--authrpc.jwtsecret=/data/secret

Logging / Tracing

Verbosity, debug tracer, log file path

--verbosity=3, --trace=/data/trace.json

*Parameter names follow upstream Geth syntax; Erigon and Nethermind expose the same concepts under their own flags.

Good to know:

If you skip the file, GetBlock boots the node with its battle-tested defaults. Adding a config file is optional and you can update it at any time. The new file is applied after an automatic restart that usually finishes in a couple of minutes.

Uploading a custom configuration

  1. Open the node in the Dashboard Go to Dashboard → My Endpoints, click the dedicated Ethereum node you created in Step 1, and choose Settings.

  2. Select “Configuration file” A pane appears where you can either drag-and-drop a file (config.toml, config.json, or plain text) or paste the contents directly.

  3. Save & Restart Press Save and confirm. GetBlock queues a seamless restart; once the status badge switches back to Running, the new parameters are live.

  4. Verify Call a lightweight method such as eth_blockNumber. If you changed an RPC port or disabled a module, the call will fail—letting you catch mis-configurations before main-net usage.

With the configuration in place, your dedicated Ethereum node now matches your project’s performance and security requirements. In the next section we’ll lock the endpoint down even further by restricting who can reach the JSON-RPC interface.

Step 3 — Securing Your RPC Endpoint

Why RPC security matters

An exposed JSON-RPC interface is an open door to your node’s compute quota and—if you allow eth_sendRawTransaction—to the network’s mempool. Abuse can run up your GetBlock consumption units (CUs), leak sensitive on-chain data, or let attackers front-run pending trades. Treat the endpoint URL like a password and lock it down before you move to production.

Configuring access control in the Dashboard

  1. Generate a token
    • Navigate to Dashboard → Endpoint → Add Access Token → New Token.
    • Give it a name (e.g., prod-backend) and copy the 64-char string to your password manager.
  2. Add an IP allow-list
    • In the same dialog, expand Allowed IP addresses.
    • Enter a comma-separated list such as 203.0.113.10,198.51.100.0/24.
    • Click Save—the token will now reject requests from any other source.
  3. Harden the node itself (optional)
    • Open Dashboard → My Endpoints → Settings and toggle off unused API interfaces (e.g., GraphQL).

    • If you uploaded a custom config in Step 2, make sure only the necessary RPC modules are enabled (eth,net,web3 is a safe default).

Tip:

Need to expose the endpoint briefly for local testing? Create a temporary token with no IP filter, set an expiry date, and delete it when you’re done.

Verifying that the endpoint is locked down

  1. Run the following command in your terminal.
curl -X POST https://go.getblock.io/<TOKEN>/ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Expected Output:

"result":"0xA1B2C3"

For a more systematic check, import GetBlock’s ready-made Postman Collection and run the Ping and eth_blockNumber requests under your restricted network. They should succeed; the same calls from an unlisted IP will fail.

Once your endpoint passes these tests, you’re protected against drive-by traffic and credential leaks—ready to move on to functional testing in the next step.

Step 4 — Testing the RPC Connection

Use Postman for quick, repeatable tests

Postman’s visual UI makes it easy to fire JSON-RPC calls at your brand-new endpoint without writing any code. GetBlock maintains an official Postman Collection that already contains sample requests for every supported chain and method.

  1. Import the collection
    • Download the GetBlock.postman_collection.json file from the link above.
    • In Postman, click Import → File and select the JSON file. A new workspace folder named GetBlock appears.
  2. Create an environment
    • Click Environments → +.
    • Add two variables:

Variable

Initial value

BASE_URL

https://go.getblock.io/ACCESS_TOKEN/

ADDRESS

0xYourWalletAddress

  1. Send your first request
    • Open Ethereum → eth_blockNumber in the imported collection.

    • Click Send. If the connection is healthy, the response body looks like:

      {
        "jsonrpc": "2.0",
        "id": "getblock.io",
        "result": "0xA1B2C3"   // latest block height in hex
      }
      

Example RPC Tests

You can verify that your endpoint is both reachable and fully synchronized by making simple JSON-RPC calls. For instance, calling the eth_blockNumber method checks the current block height and confirms that the node is up-to-date; the request body looks like this:

{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":"1"}

To inspect the ETH balance of a specific account at the latest block, use the eth_getBalance method. Simply replace {{ADDRESS}} with the account you want to query:

{"jsonrpc":"2.0","method":"eth_getBalance","params":["{{ADDRESS}}","latest"],"id":"1"}

Each of these calls consumes just one computation unit (CU) and should return a response almost instantly on a healthy dedicated endpoint. For a complete list of supported Ethereum JSON-RPC methods, refer to the GetBlock API reference.

Troubleshooting Common Errors

A common problem you might face is an HTTP 403 response with the message “Invalid Project or Token.” This usually means the access token you used is wrong or expired. To fix it, check that the token matches exactly with the one in your dashboard. If needed, create a new token by going to Dashboard → Access Tokens.

If you get an HTTP 403 error saying “IP address is not allowed,” it means your IP isn't on the token’s allow-list. You can fix this by adding your computer’s IP address or a suitable CIDR range to the token’s settings. Another option is to use a VPN that routes requests through an approved address.address.

Sometimes your JSON-RPC call will return null. This usually happens because of a typo in your request or using a method the node doesn't support. Check your request carefully against the examples in the Postman collection to find any mistakes, and ensure you're using one of the documented methods.

Finally, if responses are slow or time out, it might be because you're asking for a very large block of data or there's network congestion. In this case, try switching from HTTP to WebSocket, which can handle larger, streaming responses better. You can also check the problem by making a simple call, like eth_blockNumber, to see if it's a network issue or a problem with the specific method you're using.

Once both eth_blockNumber and eth_getBalance return cleanly, you’ve confirmed that:

With confidence in your connection, you’re ready to automate requests from code—or explore advanced integrations in the next steps.

Step 5 — Integrating Web3 Libraries (optional advanced step)

Modern dApps rarely call JSON-RPC “by hand.” Instead, they use JavaScript helpers such as Web3.js or Ethers.js that wrap raw RPC in a friendly, promise-based API. Below are two quick start paths; pick whichever library your stack already uses.

Using Web3.js (in a Node/React project)

  1. Install the package

    npm install web3        # or:  yarn add web3
    

  2. Instantiate Web3 with your GetBlock endpoint

    const Web3 = require('web3');
    

Warning ⚠️: never hard-code your token — load from env vars or a secret manager const web3 = new Web3('https://go.getblock.io/<ACCESS-TOKEN>/');

  1. Smoke-test the connection
const latest = await web3.eth.getBlockNumber();
console.log('Current block:', latest);

  1. Create a throw-away account

    const acc = web3.eth.accounts.create();
    console.log(acc.address, acc.privateKey);
    

  2. Send a simple value transfer (testnet)

    const tx = {
      to: '0xReceiverAddress',
      value: web3.utils.toWei('0.001', 'ether'),
      gas: 21_000,
    };
    
    const signed = await web3.eth.accounts.signTransaction(tx, acc.privateKey);
    const { transactionHash } = await web3.eth.sendSignedTransaction(signed.rawTransaction);
    console.log('Tx hash:', transactionHash);
    

Using Ethers.js (in a Node/TypeScript/Vite project)

  1. Install Ethers

    npm install ethers       # or:  yarn add ethers
    

  2. Create a provider

    import { ethers } from 'ethers';
    
    // Environment variable keeps the token out of Git
    const provider = new ethers.JsonRpcProvider(
      `https://go.getblock.io/${process.env.GETBLOCK_TOKEN}/`
    );
    

  3. Query the chain

    const block = await provider.getBlockNumber();
    console.log('Block height:', block);
    

  4. Send a raw transaction

    const wallet   = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
    const txResp   = await wallet.sendTransaction({
      to: '0xReceiverAddress',
      value: ethers.parseEther('0.001'),
    });
    const receipt  = await txResp.wait();
    console.log('Mined in block', receipt.blockNumber);
    

When using Ethereum libraries, pick one that suits your code and preferences. If you're handling older projects or prefer the classic Web3.js callback style, then Web3.js is a good choice. But if you're creating new apps in TypeScript and need strong BigInt support with a modern signer interface, Ethers.js is the better choice.

Both libraries charge the same Compute Units (CUs) per RPC call, so the choice is mostly ergonomic. In either case, remember to:

With a working provider in code, your application can now read on-chain data, sign messages, and broadcast transactions through your private GetBlock node. Next up: optionally wiring the endpoint into MetaMask for local debugging and front-end testing.

Step 6 — Connecting MetaMask to Your Private Ethereum Node (optional)

Why plug MetaMask into your node?

By connecting MetaMask to your own node, you can sign and send transactions right from your browser or mobile wallet without using a shared public RPC pool. This gives you true end-to-end testing. Your dApp’s frontend, backend services, and wallet all use the same endpoint, so block numbers and gas price estimates stay in sync, ensuring a smooth user experience. During high network demand, you won't face congestion or throttling like with public gateways such as Infura, because your requests go through your private node.

One-time setup guide

A. Add GetBlock RPC to an existing network

  1. Copy your HTTPS endpoint, e.g. https://go.getblock.io/<ACCESS-TOKEN>/
  2. In MetaMask click the network selector (e.g., “Ethereum Mainnet”).

  1. Press Add RPC URL.

  1. Paste the endpoint, give it a label such as GetBlock API, and hit Add URL.

You can now toggle between MetaMask’s default RPC and your private node at any time.

B. Add a new custom network (if it isn’t listed)

  1. Click the network dropdown ➝ Add a custom network.
  2. Fill the form:

Field

Value

Network name

Anything (e.g. Sepolia GB)

RPC URL

https://go.getblock.io/<ACCESS-TOKEN>/

Chain ID

Run eth_chainId against the endpoint (see curl below) or look it up in Chainlist

Currency symbol

ETH (or native coin)

Block explorer

Optional (e.g. https://sepolia.etherscan.io)

  1. Click Save – the wallet switches to the new network immediately.
# Optional: fetch the chain ID over RPC
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":"getblock.io"}'

Quick verification

For a quick verification, first confirm that the ETH balance displayed in MetaMask matches the balance you fetched with eth_getBalance in Step 4. Then ensure that the next transaction nonce shown in MetaMask aligns exactly with the result of your eth_getTransactionCount call. Finally, expand the “Advanced options” in MetaMask’s send form and verify that the displayed gas price is the same as what you retrieved via eth_gasPrice. If any of these values diverge, double-check that MetaMask is pointed to the identical endpoint URL—including the correct access token.

Connecting MetaMask completes the full development loop: ledger data from GetBlock, transactions signed in the browser, and broadcasts funneled back through your dedicated node—no public RPCs required.

Common Ethereum RPC Methods Overview (Reference)

Below is a concise reference for the JSON-RPC calls you’ll use most often against your private GetBlock endpoint. Each example assumes you have exported your access token in the GETBLOCK_TOKEN environment variable so you never hard-code it in source control.

The eth_call method lets you execute a read-only smart-contract function without sending a transaction or incurring any gas cost. It’s ideal for invoking view or pure Solidity functions. A minimal request body looks like:

{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0xToken","data":"0x70a082310000…"},"latest"],"id":"1"}

and the response returns the ABI-encoded result directly.

When you need to fetch an entire block by its number or tag (for example, "latest" or "pending"), use eth_getBlockByNumber. You can request only header fields plus transaction hashes, or set the second parameter to true to retrieve full transaction objects. A typical call is:

{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":"1"}

and you’ll receive the block header along with the list of transactions.

To broadcast a signed transaction—whether you signed it locally via Web3.js, Ethers.js, or a hardware wallet—use eth_sendRawTransaction. Pass the RLP-encoded hex payload as your parameter:

{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x02f8…"],"id":"1"}

and the node responds with the new transaction hash.

Once you have a transaction hash, call eth_getTransactionReceipt to retrieve execution details such as success status, gas used, and event logs. Poll this endpoint until its result field is non-null:

{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xHash"],"id":"1"}

and you’ll receive the full receipt JSON.

To read an account’s ETH balance at a given block (defaulting to "latest"), the eth_getBalance method is your tool of choice. By supplying the address and block tag, you get back the balance in Wei (hex-encoded):

{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xAddr","latest"],"id":"1"}

Finally, eth_gasPrice returns the network’s median gas price over the last 100 blocks, which helps you set sensible default fees:

{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":"1"}

and the node replies with the suggested gas price in hex-encoded Wei.

On GetBlock, each of these calls consumes one Compute Unit—except when you request a full transaction list via eth_getBlockByNumber, which costs more due to the larger response payload. Feel free to extend your toolkit with methods such as eth_estimateGas, WebSocket subscriptions via eth_subscribe, or network chain ID queries with net_version. For the complete Ethereum JSON-RPC reference, consult the GetBlock Ethereum API documentation.

Conclusion

In this guide, you started by setting up your infrastructure: you created a GetBlock account, got an access token, and set up a dedicated Ethereum endpoint for your project. Then, you customized the node by picking the client implementation, choosing between full or archive storage modes, and turning on the necessary RPC modules for best performance. For security, you managed tokens carefully and set up IP allow-lists so only trusted back-ends and wallets can access your JSON-RPC interface. You checked functionality by running calls like eth_blockNumber and eth_getBalance using the official Postman collection, making sure your node stays in sync and meets GetBlock’s 99.9% uptime promise. Finally, you connected the endpoint to your applications: integrating it with Web3.js or Ethers.js for automated interactions and setting MetaMask to use the same URL for smooth front-end testing.

To keep an eye on your endpoint's health, turn on monitoring and alerts in the dashboard's Monitoring and Analytics section. Here, you can check compute-unit usage, response times, and error rates. Set up email or webhook alerts to get notified before you reach your plan limits. For more control over node behavior, look into advanced settings like pruning options, tracing modes, or JWT-based Engine API authentication. If you need more capacity, add more dedicated nodes or switch to cluster mode to share the load. Keep important documents handy for daily tasks: the endpoint setup guide, the error catalog, and the full Ethereum API reference. By doing this, you'll keep your private Ethereum node secure, easy to monitor, and ready to support everything from internal analytics to production-grade dApps.