Skip to main content
Quick solutions to common problems you might encounter while using Private Connect.

Connection Issues

Symptoms:
  • connect up hangs or times out
  • Error: “Failed to connect to Hub”
  • WebSocket connection errors
Solutions:
  1. Check Hub URL
    # Verify you're using the correct Hub URL
    connect up --hub https://api.privateconnect.co
    
    # Or set environment variable
    export CONNECT_HUB_URL=https://api.privateconnect.co
    connect up
    
  2. Check network connectivity
    # Test if Hub is reachable
    curl https://api.privateconnect.co/health
    
    # Should return: {"status":"ok"}
    
  3. Check firewall/proxy settings
    • Ensure outbound HTTPS (443) is allowed
    • WebSocket connections must be permitted
    • Corporate proxies may block WebSocket traffic
  4. Try with verbose logging
    connect up --verbose
    # Check logs for specific error messages
    
  5. Check for expired token
    # Rotate token if expired
    connect up --rotate-token
    
Symptoms:
  • Error: “Service ‘prod-db’ not found”
  • connect reach fails to find service
Solutions:
  1. List available services
    connect ls
    # Shows all services in your workspace
    
  2. Check service name
    # Service names are case-sensitive
    connect reach prod-db     # ✓ Correct
    connect reach Prod-DB     # ❌ Wrong case
    
  3. Verify workspace
    # Ensure you're in the same workspace as the service
    connect status
    # Check "Workspace" field
    
  4. Check if exposing agent is online
    # The agent exposing the service must be running
    connect ls --verbose
    # Shows which agent is exposing each service
    
  5. Re-expose the service
    # On the machine with the service
    connect expose localhost:5432 --name prod-db
    
Symptoms:
  • Error: “Port 5432 is already in use”
  • connect reach fails to create tunnel
Solutions:
  1. Use a different local port
    connect reach prod-db --port 5433
    # Access at localhost:5433 instead
    
  2. Find what’s using the port
    # On macOS/Linux
    lsof -i :5432
    
    # On Windows
    netstat -ano | findstr :5432
    
  3. Stop the conflicting service
    # Example: stop local PostgreSQL
    brew services stop postgresql
    # or
    sudo systemctl stop postgresql
    
  4. Clear port mapping
    # Remove saved port mapping
    connect map --clear prod-db
    # Next connection will try a different port
    
Symptoms:
  • Tunnel disconnects frequently
  • “Connection reset by peer” errors
  • Intermittent connectivity
Solutions:
  1. Check network stability
    # Test latency and packet loss
    ping -c 10 api.privateconnect.co
    
  2. Use daemon mode for persistence
    # Install as system service
    connect daemon install
    
    # Daemon auto-reconnects on disconnect
    
  3. Check for token expiry
    connect status
    # Look for "Token expires in" warning
    
    # Rotate if expiring soon
    connect up --rotate-token
    
  4. Increase timeout settings
    # Set longer timeouts (self-hosted only)
    export CONNECT_TIMEOUT=60000  # 60 seconds
    connect up
    
  5. Check Hub status
    # For hosted version, check status page
    curl https://api.privateconnect.co/health
    

Authentication Issues

Symptoms:
  • Browser doesn’t open for login
  • Magic link email not received
  • Error: “Authentication failed”
Solutions:
  1. Use device code flow
    # For headless servers
    connect up --device
    # Enter code from any device at the provided URL
    
  2. Check email spam folder
  3. Try different browser
    # Specify browser
    BROWSER=firefox connect up
    
  4. Use API key instead
    # Generate API key from web UI
    connect up --api-key pc_xxxxxxxxxxxxx
    
  5. Clear saved credentials
    # Remove old auth data
    rm -rf ~/.connect/auth.json
    connect up
    
Symptoms:
  • Error: “Token has expired”
  • Agent won’t authenticate
  • 401 Unauthorized errors
Solutions:
  1. Rotate token
    connect up --rotate-token
    # Generates new token, invalidates old one
    
  2. Log in again
    # Re-authenticate from scratch
    rm -rf ~/.connect/auth.json
    connect up
    
  3. Set up token rotation reminders
    # Check token status regularly
    connect status
    # Shows "Token expires in X days"
    
Symptoms:
  • Error: “Permission denied”
  • Cannot expose services
  • Cannot create shares
Solutions:
  1. Check workspace membership
    connect status
    # Verify you're in the correct workspace
    
  2. Use API key with correct permissions
    # API keys inherit workspace permissions
    # Generate new key from web UI if needed
    
  3. Contact workspace admin
    • Only workspace members can expose services
    • Admin can invite you from the web UI

Service Exposure Issues

Symptoms:
  • connect expose fails
  • Service not appearing in connect ls
  • Error: “Failed to expose service”
Solutions:
  1. Verify target is reachable
    # Test if service is listening
    nc -zv localhost 5432
    # Or
    telnet localhost 5432
    
  2. Check service is actually running
    # Example: PostgreSQL
    pg_isready -h localhost -p 5432
    
    # Example: Redis
    redis-cli -p 6379 ping
    
  3. Use explicit name
    # Sometimes auto-naming fails
    connect expose localhost:5432 --name my-db
    
  4. Check for duplicate names
    # List existing services
    connect ls
    
    # Delete old service if needed
    connect delete old-service
    
  5. Verify agent is connected
    connect status
    # Should show "Connected: yes"
    
Symptoms:
  • Service listed but marked as offline
  • Cannot reach service
  • Health check fails
Solutions:
  1. Check exposing agent
    # Agent must be running on the machine with the service
    connect status  # On the exposing machine
    
  2. Restart agent
    # If using daemon
    connect daemon restart
    
    # If running manually
    # Stop (Ctrl+C) and restart
    connect up
    
  3. Re-expose service
    connect expose localhost:5432 --name prod-db
    
  4. Check target service health
    # Ensure the actual service is running
    systemctl status postgresql  # Example
    
Symptoms:
  • connect expose --public creates URL but it doesn’t work
  • 502 Bad Gateway errors
  • URL times out
Solutions:
  1. Verify service is exposed
    connect ls
    # Should show your service with public URL
    
  2. Check if agent is running
    # Agent must stay running for public URLs
    connect status
    
  3. Test local access first
    # Ensure service works locally
    curl http://localhost:3000
    
  4. Check service bindings
    # Service must bind to 127.0.0.1 or 0.0.0.0
    # NOT just localhost (IPv6)
    netstat -tuln | grep 3000
    
  5. Try temporary tunnel
    # For quick testing without auth
    npx private-connect tunnel 3000
    

Sharing & Collaboration Issues

Symptoms:
  • connect join fails with invalid code
  • Error: “Share not found”
  • Share code expired
Solutions:
  1. Check code validity
    # Codes are case-sensitive
    connect join x7k9m2    # ✓ Correct
    connect join X7K9M2    # ❌ Wrong case
    
  2. Verify expiration
    # Shares can expire
    # Creator should check from web UI or:
    connect share --list
    
  3. Create new share
    # If expired, create new one
    connect share --expires 7d
    
  4. Check workspace access
    • Both parties must have access to workspace
    • Or use connect link for external access
Symptoms:
  • connect clone shows no teammates
  • Error: “No teammates found”
  • Clone succeeds but no services appear
Solutions:
  1. List available teammates
    connect clone --list
    # Shows agents in your workspace
    
  2. Ensure teammate has exposed services
    # Teammate must have services exposed
    # Ask them to run: connect ls
    
  3. Use share code instead
    # More reliable for collaboration
    # Creator: connect share
    # You: connect join <code>
    
  4. Verify same workspace
    connect status
    # Both must be in same workspace
    

Debug Mode Issues

Symptoms:
  • Debug viewer shows no traffic
  • Packets not being captured
  • Empty packet list
Solutions:
  1. Verify debug mode is enabled
    # Must use --debug flag
    connect expose localhost:3000 --debug
    
  2. Check traffic is flowing
    # Send test request
    curl http://localhost:3000
    # Should appear in debug viewer
    
  3. Refresh debug viewer
    • Refresh browser page
    • Check WebSocket connection status
  4. Check browser console
    • Open DevTools → Console
    • Look for WebSocket errors
  5. Verify session is active
    # Agent must be running
    # Debug session ends when agent stops
    connect status
    
Symptoms:
  • AI copilot not responding
  • Error: “AI not configured”
  • API errors
Solutions:
  1. Configure AI provider
    • Go to Settings → AI Copilot in web UI
    • Choose provider (Ollama, OpenAI, Anthropic)
    • Enter API key
    • Click “Test Connection”
  2. Check API credits
    • For OpenAI/Anthropic, verify you have API credits
    • Check provider dashboard
  3. Verify Ollama is running
    # For local Ollama
    ollama serve
    # In another terminal:
    ollama pull llama2  # or your preferred model
    
  4. Try different provider
    • If one provider fails, try another
    • Ollama is best for privacy-sensitive data
Symptoms:
  • Error: “Session expired”
  • Cannot view debug history
  • Old sessions not accessible
Solutions:
  1. Restart debug session
    # Debug sessions are tied to agent lifecycle
    connect expose localhost:3000 --debug
    
  2. Export before stopping
    • Export session as JSON or Markdown before stopping agent
    • Use “Export” button in debug viewer
  3. Keep agent running
    # Use daemon mode for persistent sessions
    connect daemon install
    connect expose localhost:3000 --debug
    

Installation Issues

Symptoms:
  • curl -fsSL ... | bash fails
  • Permission denied errors
  • Binary not found after install
Solutions:
  1. Check system requirements
    • macOS 10.15+, Linux (x64/arm64), Windows (WSL)
    • curl must be installed
  2. Manual installation
    # Download binary directly
    curl -Lo connect https://privateconnect.co/download/latest/linux-x64
    chmod +x connect
    sudo mv connect /usr/local/bin/
    
  3. Use package managers
    # Homebrew (macOS)
    brew install treadiehq/tap/private-connect
    
    # Coming soon: apt, yum, scoop
    
  4. Build from source
    git clone https://github.com/treadiehq/private-connect.git
    cd private-connect
    pnpm install
    cd apps/agent && pnpm run build:binary
    
Symptoms:
  • “Permission denied” when running connect
  • “Command not found: connect”
  • Binary fails to execute
Solutions:
  1. Make executable
    chmod +x /usr/local/bin/connect
    
  2. Check PATH
    # Ensure /usr/local/bin is in PATH
    echo $PATH | grep /usr/local/bin
    
    # Add to PATH if missing
    export PATH="/usr/local/bin:$PATH"
    # Add to ~/.bashrc or ~/.zshrc
    
  3. Try absolute path
    /usr/local/bin/connect up
    
  4. Check architecture
    # Verify binary matches your system
    uname -m    # x86_64 or arm64
    file /usr/local/bin/connect
    
Symptoms:
  • connect daemon install fails
  • Systemd/launchd errors
  • Service won’t start on boot
Solutions:
  1. Check permissions
    # May need sudo for system-wide install
    sudo connect daemon install
    
  2. Verify init system
    # Linux: check if systemd is available
    systemctl --version
    
    # macOS: launchd is default
    launchctl version
    
  3. Check logs
    # Linux (systemd)
    sudo journalctl -u private-connect
    
    # macOS (launchd)
    tail -f ~/Library/Logs/private-connect.log
    
  4. Manual service file
    # Create systemd service manually
    sudo nano /etc/systemd/system/private-connect.service
    # Add service configuration
    sudo systemctl daemon-reload
    sudo systemctl enable private-connect
    sudo systemctl start private-connect
    

Performance Issues

Symptoms:
  • High latency through tunnel
  • Slow database queries
  • Timeouts on large transfers
Solutions:
  1. Check network latency
    # Test latency to Hub
    ping api.privateconnect.co
    
    # Test connection speed
    connect reach prod-db --check
    # Shows latency measurement
    
  2. Use regional Hub (self-hosted)
    # Deploy Hub closer to your agents
    connect up --hub https://eu.yourdomain.com
    
  3. Disable debug mode
    # Debug adds ~1-2ms overhead per request
    # Don't use --debug in production
    connect expose localhost:3000  # Without --debug
    
  4. Check for network issues
    # Test for packet loss
    ping -c 100 api.privateconnect.co
    # Should be 0% packet loss
    
Symptoms:
  • Agent using excessive resources
  • System slowdown
  • Memory leaks
Solutions:
  1. Check version
    connect version
    # Update to latest version
    curl -fsSL https://privateconnect.co/install.sh | bash
    
  2. Reduce concurrent connections
    # Limit number of active tunnels
    # Close unused connections
    connect ls
    connect disconnect <service>
    
  3. Monitor resource usage
    # Check agent process
    ps aux | grep connect
    top -p $(pgrep connect)
    
  4. Restart agent
    # If using daemon
    connect daemon restart
    

Getting Help

If you’re still experiencing issues:

Documentation

Read the full documentation

Discord Community

Ask questions in Discord

GitHub Issues

Report bugs or request features

Provide Debug Information

When asking for help, include:
# System info
connect version
uname -a

# Connection status
connect status

# Service list
connect ls

# Recent logs (if applicable)
connect daemon logs

Common Error Messages

ErrorMeaningSolution
Service not foundService doesn’t exist or wrong workspaceCheck connect ls, verify workspace
Port already in useLocal port is occupiedUse --port flag or stop conflicting service
Token expiredAgent token needs rotationRun connect up --rotate-token
Permission deniedNot authorized for actionCheck workspace membership, use API key
Connection refusedCannot reach target serviceVerify service is running locally
WebSocket errorCannot connect to HubCheck network, firewall, Hub status
Authentication failedLogin issueUse --device flag or API key
Share not foundInvalid or expired share codeGet new share code from creator
Rate limit exceededToo many requests to public linkWait or contact link creator to increase limit
Hub unreachableNetwork or Hub issueCheck curl https://api.privateconnect.co/health

Build docs developers (and LLMs) love