3 Run an Exit Node
Claude edited this page 2026-04-03 13:12:22 +01:00

Run a VPN Exit Node

Earn LTHN by providing bandwidth to the Lethean dVPN network.

Exit Node

How It Works

  1. You run a WireGuard VPN server on your home connection
  2. Your node registers itself on the Lethean blockchain
  3. Gateway nodes discover your exit node and route VPN traffic through it
  4. You earn LTHN for every session served
VPN User → Gateway → [encrypted tunnel] → Your Exit Node → Internet

What You Get

  • Full chain node with PoS staking rewards
  • WireGuard VPN exit server
  • Automatic gateway peering via on-chain discovery
  • LTHN earnings from bandwidth + staking

Requirements

  • Linux with Docker installed
  • Public IP address (or port forwarding on your router)
  • Open ports: 46942 TCP (P2P) and 51820 UDP (WireGuard)
  • 2GB RAM, 10GB disk space
  • Stable internet connection

Quick Start

# Download compose and config
curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/docker-compose.exit.yml
curl -O https://forge.lthn.ai/lthn/blockchain/raw/branch/dev/docker/.env.example

# Configure
cp .env.example .env

Edit .env with your details:

WALLET_PASSWORD=your-secure-password
EXIT_PUBLIC_IP=203.0.113.50     # Your public IP
EXIT_NAME=my-exit               # Your node name (optional)
EXIT_MAX_PEERS=25               # Max simultaneous VPN users

Start:

docker compose -f docker-compose.exit.yml up -d

Check Status

# Controller logs (shows height, balance, peers)
docker logs lthn-exit-controller --tail 10

# WireGuard status
docker exec lthn-exit-wireguard wg show

# Wallet balance
curl -s http://localhost:46944/json_rpc \
  -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' \
  -H 'Content-Type: application/json'

Router Setup

Open these ports on your home router:

Port Protocol Service
46942 TCP Chain P2P (node peering)
51820 UDP WireGuard VPN

Finding Your Public IP

curl -s ifconfig.me

Use this IP as EXIT_PUBLIC_IP in your .env.

On-Chain Registration

When your wallet has at least 1 LTHN, the exit node can register an on-chain alias. This makes your node discoverable by gateways.

The alias comment follows the Lethean service discovery protocol:

v=lthn1;type=exit;cap=vpn,proxy;ip=YOUR_PUBLIC_IP

Gateways query the chain for aliases with type=exit and route VPN sessions to your node.

Earnings

Source How
PoS staking Automatic — proportional to balance
VPN bandwidth Per-session payments from gateways
Block rewards Optional — connect a GPU miner

Security

  • VPN traffic passes through your internet connection. You are the exit point.
  • WireGuard encrypts all tunnel traffic between gateway and your node.
  • The controller never exposes your wallet keys.
  • Your ISP sees generic encrypted UDP traffic (WireGuard), not the tunnelled content.

Backup

docker compose -f docker-compose.exit.yml stop wallet
docker cp lthn-exit-wallet:/wallet ./wallet-backup-$(date +%Y%m%d)
docker compose -f docker-compose.exit.yml start wallet

Stopping

docker compose -f docker-compose.exit.yml down        # stop (keeps data)
docker compose -f docker-compose.exit.yml down -v      # stop + delete everything