Troubleshooting
Common Issues
Container Exits Immediately
Problem: Container starts then immediately exits.
Solution:
Ensure config file is mounted to
/app/config.jsonCheck config file syntax (must be valid JSON)
View logs:
docker logs x402proxy
SSL Certificate Errors
Problem: UNABLE_TO_GET_ISSUER_CERT_LOCALLY or unable to get local issuer certificate
Solutions:
Mount custom CA certificate:
docker run -p 8080:8080 \ -v $(pwd)/custom-config.json:/app/config.json:ro \ -v $(pwd)/ca-cert.pem:/app/CA_CERT:ro \ ghcr.io/zachalam/x402proxy:latestDisable SSL verification (development only):
docker run -p 8080:8080 \ -e NODE_TLS_REJECT_UNAUTHORIZED=0 \ -v $(pwd)/custom-config.json:/app/config.json:ro \ ghcr.io/zachalam/x402proxy:latest
Payment Not Verified
Problem: Requests are proxied before payment is made.
Check:
Verify
x402-expressversion in logsEnsure
protectedEndpointspaths match request paths (without HTTP method)Check facilitator URL is correct and accessible
Review payment middleware logs
Proxy Request Fails
Problem: Payment verified but proxy request returns error.
Check:
Verify
forwardToURL is correct and accessibleCheck target API accepts the request method
Review network connectivity from container
Check axios error logs in container output
Port Already in Use
Problem: Error: bind: address already in use
Solution:
Use a different port:
-p 4020:8080Stop the service using port 8080
Check what's using the port:
lsof -i :8080
Debugging
Enable Verbose Logging
View detailed logs:
Test Configuration
Validate your config file:
Network Debugging
Test connectivity from container:
Getting Help
GitHub Issues: https://github.com/zachalam/x402proxy/issues
Documentation: Check other sections for detailed guides
Logs: Always include relevant logs when reporting issues
Last updated