Skip to main content
Automatically detect running services on your local machine and expose them through Private Connect.

Usage

connect discover [options]

Basic Example

connect discover
Output:
Scanning localhost for services...

✓ Found 4 services:

  Port   Protocol   Service       Status
  ─────────────────────────────────────────
  5432   postgres   postgres      Running
  6379   redis      redis         Running
  3000   http       web-server    Running
  8080   http       api           Running

Expose services? [y/N]:

Options

--host
string
default:"localhost"
Host to scan for services
--ports
string
Comma-separated list of ports to scan. Example: 3000,5432,6379
--json
boolean
Output results as JSON
--config, -c
string
Config file path

Examples

Scan Specific Ports

connect discover --ports 3000,5432,6379,8080

JSON Output

connect discover --json
Output:
{
  "services": [
    {
      "port": 5432,
      "protocol": "postgres",
      "name": "postgres",
      "status": "running"
    },
    {
      "port": 6379,
      "protocol": "redis",
      "name": "redis",
      "status": "running"
    },
    {
      "port": 3000,
      "protocol": "http",
      "name": "web-server",
      "status": "running"
    }
  ]
}

Scan Remote Host

connect discover --host 192.168.1.50

Service Detection

Private Connect automatically detects service types based on port and protocol:
PortService Type
5432PostgreSQL
3306MySQL
27017MongoDB
6379Redis
80HTTP
443HTTPS
3000HTTP (dev)
8080HTTP (alt)

Common Use Cases

Onboarding

Discover local services when setting up a new development environment

Environment Audit

See what services are running on a machine

Quick Setup

Rapidly expose multiple services at once

Troubleshooting

Verify which ports are in use

Interactive Mode

When running connect discover without --json, you’ll be prompted to expose discovered services:
connect discover
# → Found 3 services
# → Expose services? [y/N]: y
# → Select services to expose:
# →   [x] postgres (5432)
# →   [x] redis (6379)
# →   [ ] web-server (3000)
# → 
# → Exposing 2 services...
# → ✓ postgres → localhost:5432
# → ✓ redis → localhost:6379

Exit Codes

  • 0 - Success
  • 1 - Error (network issue, permission denied)
  • 2 - Invalid arguments

Build docs developers (and LLMs) love