النمط
Build on X Layer

X Layer RPC Node Deployment Guide#

📋 Overview#

This guide will help you quickly deploy an X Layer self-hosted RPC node, providing complete L2 blockchain data access services.

💻 System Requirements#

  • Operating System: Linux (Ubuntu 20.04+ recommended)
  • Memory: Minimum 8GB, recommended 16GB+
  • Storage: Minimum 100GB SSD, recommended 500GB+
  • Network: Stable internet connection
  • Docker: Docker 20.10+ and Docker Compose 2.0+

⚡ Quick Deployment#

The easiest way to deploy your X Layer RPC node with minimal configuration:

# Create your node directory and run setup
mkdir -p /data/xlayer-mainnet && cd /data/xlayer-mainnet
curl -fsSL https://raw.githubusercontent.com/okx/xlayer-toolkit/main/rpc-setup/one-click-setup.sh -o one-click-setup.sh
chmod +x one-click-setup.sh
# Run setup script (geth client)
./one-click-setup.sh

This script will:

  • ✅ Automatically detect your system requirements
  • ✅ Download the latest configuration files
  • ✅ Prompt you for required parameters interactively
  • ✅ Generate all necessary configuration files
  • ✅ Start the RPC node services
  • ✅ Verify the installation and show connection details

Interactive prompts will ask for:

  • Network type: testnet or mainnet
  • L1 RPC URL - Ethereum L1 RPC endpoint
  • L1 Beacon URL - Ethereum L1 Beacon RPC endpoint
  • Optional: Custom port mappings

After installation, your RPC node will be available at:

  • HTTP RPC: http://localhost:8545
  • WebSocket: ws://localhost:8546

📊 Service Management#

# Check service status
make status

# Stop services (preserves data)
make stop

# Restart services
make run

# View logs
docker compose logs -f

📡 Service Ports#

ServicePortProtocolPurpose
op-geth RPC8545HTTPJSON-RPC API
op-geth WebSocket8546WebSocketWebSocket API
op-node RPC9545HTTPConsensus layer API
op-geth P2P30303TCP/UDPP2P network
op-node P2P9223TCP/UDPP2P network

Thank you for building with X Layer! 💪