Xode is a blockchain platform with its own on-chain governance that aims to bring game development, decentralized finance, real-word assets and businesses to Web3 and Polkadot.
Xode Light Node is a lightweight, containerized NestJS-based node designed to serve as a WebSocket JSON-RPC gateway and HTTP API layer for Polkadot-compatible blockchain environments.
This node bridges communication between Smoldot (a light Polkadot client) and your frontend or backend applications, enabling efficient blockchain queries, transaction broadcasting, and real-time event subscriptions — all through a unified WebSocket endpoint.
It’s optimized for scalability, portability, and quick deployment in containerized or multi-environment setups (e.g., Kubernetes, Docker Compose, or standalone VPS hosting).
✅ Dual-port architecture – Exposes both HTTP (3000) and WebSocket (9944) endpoints.
✅ Lightweight image – Built on node:22-alpine, ensuring minimal memory footprint.
✅ Smoldot-powered gateway – Enables Polkadot/Substrate-compatible JSON-RPC connections.
✅ NestJS framework – Structured, modular, and maintainable backend foundation.
✅ Dockerized deployment – Easy to deploy, replicate, and manage across environments.
✅ Namespace-ready design – Supports multiple Polkadot networks through dynamic WebSocket namespaces.
✅ Developer-friendly – Fully compatible with polkadot-api, @polkadot/api, and JSON-RPC clients.
The Xode-Light-Node currently supports two distinct namespaces for light node connectivity:
| Chain | Namespace | WebSocket URL | Description |
|---|---|---|---|
| 🪙 Xode Polkadot | /xode-polkadot |
ws://localhost:9944/xode-polkadot |
Connects to the Xode polkadot main network |
| 🔶 Xode Paseo | /xode-paseo |
ws://localhost:9944/xode-paseo |
Connects to the Xode paseo test network |
Each namespace operates independently, allowing multiple clients to interact with different chains simultaneously through the same node instance.
Before you start, ensure your system meets the following minimum requirements:
| Component | Recommended |
|---|---|
| OS | Ubuntu 22.04+, macOS 13+, or Windows 10+ |
| CPU | 2 cores minimum |
| Memory | 1 GB minimum (512 MB for light mode) |
| Docker | v20.10 or higher |
| Node.js | v22+ (if building manually) |
This section will guide you through installation and deployment, from installing Docker to running your Xode-Light-Node container.
Docker allows you to run applications inside lightweight, isolated containers.
If you don’t have it yet, install it based on your OS:
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable --now dockerDownload Docker Desktop from the official page: 👉 https://www.docker.com/products/docker-desktop
Verify your installation:
docker --versionOnce Docker is ready, pull the latest prebuilt image from Docker Hub:
docker pull oliverrigonan/xode-light-node:latestThis will download the most recent version of Xode Light Node published by Noah Oliver Rigonan.
Start the container by exposing both HTTP and WebSocket ports:
docker run -d \
--name xode-light-node \
-p 3000:3000 \
-p 9944:9944 \
oliverrigonan/xode-light-node:latest- The HTTP API is available at → http://localhost:3000
- The WebSocket JSON-RPC Gateway is available at → ws://localhost:9944
To check logs:
docker logs -f xode-light-nodeTo stop the container:
docker stop xode-light-nodeTo restart it:
docker restart xode-light-nodeIf you prefer a declarative approach, use the included docker-compose.yml:
version: '3.9'
services:
app:
image: oliverrigonan/xode-light-node:latest
container_name: xode-light-node
ports:
- '3000:3000'
- '9944:9944'
restart: unless-stoppedThen run:
docker compose up -dand stop it with:
docker compose downAfter starting your container, verify both endpoints are working correctly.
curl http://localhost:3000If everything is working, you should see a response from your NestJS server (e.g., "Xode Light Node is running!").
Install wscat (a WebSocket testing tool):
npm install -g wscatThen connect to your gateway for Xode Polkadot or Xode Paseo:
wscat -c ws://localhost:9944/xode-polkadotwscat -c ws://localhost:9944/xode-paseoThen your WebSocket gateway is successfully running!
You can connect your front-end or service layer using the polkadot-api client.
import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider/web';
import { xodePolkadot } from '@polkadot-api/descriptors';
// Use xode-polkadot or xode-paseo depending on the network
const provider = getWsProvider('ws://localhost:9944/xode-polkadot');
const client = createClient(provider);
const chainApi = client.getTypedApi(xodePolkadot);
async function getChainName() {
const specs = await client.getChainSpecData();
console.log('Connected to chain:', specs.name);
}
getChainName();To switch networks, simply replace:
getWsProvider('ws://localhost:9944/xode-polkadot');with:
getWsProvider('ws://localhost:9944/xode-paseo');| Issue | Cause | Fix |
|---|---|---|
| Connection refused | Container not running | Run docker ps and ensure xode-light-node is active |
| Port already in use | 3000 or 9944 occupied | Change host ports: -p 4000:3000 -p 9955:9944 |
| WebSocket not reachable | Gateway bound to localhost | Ensure it's bound to 0.0.0.0 inside the container |
| Chain not found error | Invalid namespace | Confirm correct namespace in WebSocket URL (/xode-polkadot or /xode-paseo) |
- MIT License © 2025 Noah Oliver Rigonan
- Free to use, modify, and distribute with attribution.