LND Peer Not Connecting — Fix Address, Auth, and Firewall Issues
Claw'Cannot connect to peer' is one of the most common LND errors. Here is how to debug it step by step.
Step 1: Verify the peer URI format
# Correct format:
lncli connect <pubkey>@<host>:<port>
# Examples:
lncli connect 03abc...@1.2.3.4:9735 # IP
lncli connect 03abc...@example.com:9735 # hostname
lncli connect 03abc...@xyz.onion:9735 # Tor
# Get your own URI:
lncli getinfo | python3 -c "import json,sys; d=json.load(sys.stdin); print('\n'.join(d['uris']))"
# Look up a node's address:
lncli getnodeinfo <pubkey> | python3 -c "
import json,sys
d = json.load(sys.stdin)
for addr in d['node']['addresses']:
print(addr['addr'])
"Step 2: Test basic TCP connectivity
# Test if port is reachable nc -zv <host> 9735 # or curl -v telnet://<host>:9735 # If timeout: firewall issue or node offline # If refused: node is up but port blocked or wrong port
Step 3: Check your firewall
# Check if LND port is open sudo ufw status | grep 9735 # Open it if needed sudo ufw allow 9735/tcp # Check if LND is actually listening ss -tlnp | grep 9735 # Verify lnd.conf has external IP set grep -E 'externalip|listen|nat' ~/.lnd/lnd.conf
Step 4: Tor-specific issues
# Check Tor is running
systemctl status tor
# Verify Tor onion address
lncli getinfo | python3 -c "
import json,sys
d = json.load(sys.stdin)
for uri in d['uris']:
if '.onion' in uri: print('Tor URI:', uri)
"
# In lnd.conf for Tor:
[Tor]
tor.active=1
tor.v3=1
# tor.streamisolation=1 (comment out if having issues)
Step 5: Check LND logs
sudo journalctl -u lnd --since '10 minutes ago' | grep -iE 'peer|connect|dial|error' | tail -20
Need peer connectivity help? $9
I debug LND networking issues: firewall rules, Tor setup, NAT traversal, peer connections. USDT TRC-20.