Developers Forum for XinFin XDC Network

Cover image for How to Run an XDC Full Node behind CGNAT
s4njk4n
s4njk4n

Posted on

How to Run an XDC Full Node behind CGNAT

If you've ever tried to run a full XDC node from home (or on a cheap VPS) and noticed your peer count stuck at 5–10 peers, you're not alone — and it's probably not your fault.

What is CGNAT?

CGNAT (Carrier Grade Network Address Translation) is a technique used by many Internet Service Providers (ISPs) to stretch the limited supply of IPv4 addresses.

Instead of giving every customer their own unique public IP address, the ISP puts hundreds or even thousands of users behind a single public IP. Your home router already does NAT, but CGNAT adds a second layer of translation at the ISP level (often called “double NAT”).

The result?

Your node can reach out to the internet, but the outside world cannot reliably reach back in to your node.

Why This Kills XDC Node Performance

XDC (like most blockchain networks) relies on a healthy peer-to-peer mesh. Your node needs to accept incoming connections from other nodes to:

  • Maintain a solid peer count (ideally 20+)
  • Stay fully synced
  • Contribute meaningfully to the network

Behind CGNAT, incoming connections are blocked or dropped. The result is chronically low peer counts, slower block propagation, and frustration for home node operators.

Many users on consumer broadband, mobile broadband, or certain VPS providers are silently affected without realizing it.

The Solution: XDC_Node_Behind_CGNAT

We have just released a clean, lightweight, open-source tool that automatically solves this exact problem:

XDC_Node_Behind_CGNAT

How it works:

  • Runs as a background service on Ubuntu/Lubuntu 26.04 (or any Ubuntu-based system)
  • Checks your Dockerized XDC node’s peer count every hour directly inside the container (no RPC required)
  • If peers drop below a configurable threshold (default = 15), it automatically runs your existing peer.sh script to inject more bootnodes
  • Sends a clean notification to your iOS/Android phone via ntfy.sh so you know when it kicks in
  • Includes simple pause and restart scripts for manual control
  • Starts automatically on boot via systemd
  • Keeps logs in the same folder and auto-trims them to stay under 1 MB

It’s designed specifically for people running the official XDC Docker node.

Perfect for:

  • Home lab setups
  • Residential fiber / cable connections
  • Anyone stuck behind CGNAT or strict firewalls

Get it here:

xdcoutpost.xyz/

The project is MIT licensed, actively maintained, and already helping XDC node operators keep their nodes healthy without needing static IPs or complex port forwarding.

If you’re tired of watching your peer count hover in single digits, give it a try — it might be the simplest quality-of-life upgrade you can make to your XDC node today.

Enjoy!

Discussion (0)