Troubleshooting

Most p2proxy issues fall into a handful of buckets. Find your symptom below; each row links to a deeper section if needed.

Troubleshooting matrix

SymptomLikely causeFirst checkFix
Daemon exits immediately with an auth errorBITPING_API_KEY not set or invalidecho $BITPING_API_KEYRe-export the key. Confirm it’s the one from the dashboard, not an old/rotated one.
Stuck on “waiting for peer” foreverPeer filter too strict — no peer matchesTry removing country and lowering min_bandwidthLoosen the filter, or confirm peer availability on bitping.com.
curl says “Connection refused” on localhost:1080p2proxy not listening on that portss -tlnp | grep 1080Confirm the daemon is running; check logs at log_level: debug.
First request slow, subsequent ones fastCold connection poolLook at p2proxy_stream_pool_size{state="idle"}Increase min_idle so warm streams are always ready.
Random failures during long scrapesPer-peer error rate exceeded max_error_rate, rotation took a momentWatch log_level: debug for “rotating peer” messagesLower max_error_rate for faster failover; bump max_retries.
Hangs behind a corporate firewallUDP/45445 blocked egressTry with the libp2p port open in egress firewallOpen the port, or accept relay-only mode (slower).
Docker container immediately diesTTY mismatch with the TUICheck container logsEnsure NO_UI=true is set (it is by default in the official image).
TUI looks garbledTerminal doesn’t support 24-bit colourecho $TERMUse --no-ui, or upgrade your terminal (iTerm2, WezTerm, modern gnome-terminal).
Failed to bind portAnother process already on that portss -tlnp | grep <port>Change the per-server port: in Config.yaml.
Permission denied binding port < 1024Linux capability neededBind to a port ≥ 1024, or sudo setcap 'cap_net_bind_service=+ep' $(which p2proxy).
node_keypair.bin errors on startupCorrupt or missing keypairls ~/.config/p2proxy/node_keypair.binDelete it — p2proxy regenerates on next start. Note: this changes your peer ID.
/metrics endpoint not respondingMetrics disabled or port collisioncurl http://localhost:9091/metricsConfirm metrics port; default is 9091.

Useful debug tactics

Turn the logs up

Set log_level: debug in Config.yaml, or use RUST_LOG:

RUST_LOG=debug p2proxy --no-ui --config Config.yaml

For really noisy traces, scope by module:

RUST_LOG=p2proxy=trace,libp2p=info p2proxy --config Config.yaml

Verify the SOCKS5 hop

Bypass your application logic and prove the daemon is reachable:

curl -v --socks5-hostname localhost:1080 https://ifconfig.me

If the IP you get back is the peer’s, p2proxy is healthy and the problem is in the calling application.

Watch the metrics

When something’s intermittently broken, the metrics endpoint usually tells the story:

curl -s http://localhost:9091/metrics | grep -E 'p2proxy_(socks5_requests|stream_pool|peer_connections)'

A peer_connections value of 0 means peer selection isn’t finding matches — relax your filter.

Still stuck?

Head to Support for escalation paths.

© 2026 Bitping Pty. Ltd.