Skip to main content

Overview

Private Connect makes it easy to share your local services with teammates. Whether you need to collaborate on a feature, debug together, or give someone access to your environment, Private Connect provides multiple sharing methods to fit your workflow.

Environment Shares

Share all your active services with a teammate using a simple join code.
1

Create a share

On your machine:
connect share
Output:
🤝 Creating environment share...

[ok] Environment share created!

  ┌─────────────────────────────────────────────────┐
  │  Share Code: x7k9m2                             │
  └─────────────────────────────────────────────────┘

  Your teammate can join with:

    connect join x7k9m2

  Routes being shared:
    • prod-db → localhost:5432
    • staging-api → localhost:8080
    • redis → localhost:6379

  Expires in 24 hours (Mon Mar 03 2026 23:44:00)
2

Teammate joins

Your teammate runs:
connect join x7k9m2
They now have access to the same services on the same ports.
3

Both work together

You both can now access the same services:
# You
psql -h localhost -p 5432

# Teammate
psql -h localhost -p 5432
# → Connected to the same database
Environment shares include all actively exposed services at the time of creation. Services exposed after creating the share are not included.

Custom Expiration

Control how long the share is valid:
connect share --expires 1h   # 1 hour
connect share --expires 4h   # 4 hours
connect share --expires 7d   # 7 days
Output:
Expires in 1 hours (Mon Mar 02 2026 00:44:00)

Named Shares

Give your share a descriptive name:
connect share --name "Bug #123 debugging"
Output:
[ok] Environment share created!

  ┌─────────────────────────────────────────────────┐
  │  Share Code: x7k9m2                             │
  └─────────────────────────────────────────────────┘

  Name: Bug #123 debugging
  Expires in 24 hours

List Active Shares

See all your active environment shares:
connect share --list
Output:
📋 Active Environment Shares

  x7k9m2 (Bug #123 debugging)
    Routes: 3 | Joined: 2 | Expires: 23h

  a4b8c1
    Routes: 1 | Joined: 0 | Expires: 6h

Revoke a Share

Remove access to a share:
connect share revoke x7k9m2
Output:
[ok] Share x7k9m2 revoked.
Create public URLs that anyone can access - perfect for webhooks, demos, and external integrations.

Quick Share

Create a temporary public URL when exposing a service:
connect expose localhost:3000 --link
Output:
📡 Service "my-app" is now accessible through the hub

🔗 Public URL: https://x7k9m2.privateconnect.co
   Expires: Mon Mar 03 2026 23:44:00

Persistent Public URLs

Create a permanent public URL:
connect expose localhost:3000 --public
Output:
🌐 Public URL: https://abc123.privateconnect.co
   External services (Stripe, GitHub, etc.) can send webhooks to this URL

📡 Service "my-app" is now accessible through the hub

   Public URL: https://abc123.privateconnect.co
   Anyone can reach this service at the URL above

Custom Expiration

connect expose localhost:3000 --link --link-expires 1h
connect expose localhost:3000 --link --link-expires 7d
connect expose localhost:3000 --link --link-expires 1h
Perfect for quick demos and testing.

Webhook Integration

Public share links are perfect for testing webhooks from external services:
# Expose your webhook endpoint
connect expose localhost:3000 --link --link-expires 2h
# → https://x7k9m2.privateconnect.co

# Use in Stripe dashboard:
# https://x7k9m2.privateconnect.co/webhooks/stripe
Public links expose your local service to the internet. Only use them for services designed to handle public traffic.

Clone Teammate Environment

Copy a teammate’s service configuration to your machine:
# List available teammates
connect clone --list
Output:
Available teammates:
  • alice (4 services)
  • bob (2 services)
  • charlie (3 services)

Clone Services

connect clone alice
Output:
✓ Cloned 4 service(s) from alice
→ Generated: .env.pconnect

Services cloned:
  • prod-db → localhost:5432
  • staging-api → localhost:8080
  • redis → localhost:6379
  • mongo → localhost:27017

Connection strings saved to .env.pconnect
Run: source .env.pconnect

Generated Environment File

The .env.pconnect file contains connection strings:
.env.pconnect
DATABASE_URL=postgresql://localhost:5432/myapp
REDIS_URL=redis://localhost:6379
MONGO_URL=mongodb://localhost:27017/myapp
API_URL=http://localhost:8080
Load it in your shell:
source .env.pconnect
Cloning is perfect for onboarding new team members. They get instant access to all the services they need.

Debug Session Sharing

Share live traffic inspection with teammates for pair-debugging:
connect expose localhost:3000 --debug
Output:
🔍 Debug mode enabled
   Share this link: https://app.privateconnect.co/debug/abc123
   Anyone with this link can see live traffic

With AI Assistance

connect expose localhost:3000 --debug --ai
Output:
🔍 Debug mode enabled
   Share this link: https://app.privateconnect.co/debug/abc123
   Anyone with this link can see live traffic
   AI Copilot: enabled

Debug Viewer Features

Teammates with the debug link can:
  • See real-time request/response traffic
  • Inspect headers and payloads
  • View protocol-specific data (HTTP, GraphQL, PostgreSQL, Redis)
  • See who else is viewing (presence indicators)
  • Ask the AI copilot questions about traffic
  • Replay captured requests
Debug mode provides live traffic inspection and AI-powered debugging assistance.

Share Specific Services

Instead of sharing your entire environment, share specific services:
1

Expose the service with a public URL

connect expose localhost:8080 --name api --public
2

Share the URL

Send the public URL to your teammate:
https://abc123.privateconnect.co
3

Teammate accesses it

Your teammate can access it directly:
curl https://abc123.privateconnect.co/health

Security Best Practices

Database Services: Don’t use --public or --link with database services (PostgreSQL, MySQL, Redis, MongoDB). Use environment shares or connect reach instead.
Safe to use public links:
connect expose localhost:3000 --link --link-expires 1h
Perfect for:
  • Web apps
  • REST APIs
  • Webhook endpoints
  • Demo sites

Automatic Protection

Private Connect prevents public URLs for database ports:
connect expose localhost:5432 --public
Output:
[!] --public creates a public HTTP URL, which doesn't work for database/TCP services (port 5432).
    To access this service remotely, use: connect reach postgres
Protected ports:
  • 5432 (PostgreSQL)
  • 3306 (MySQL)
  • 27017 (MongoDB)
  • 6379 (Redis)
  • 6380 (Redis)
  • 26257 (CockroachDB)
  • 9042 (Cassandra)
  • 8529 (ArangoDB)
  • 7687 (Neo4j)
  • 1433 (SQL Server)
  • 1521 (Oracle)
  • 50000 (DB2)

Command Reference

Environment Shares

# Create share
connect share [options]

Options:
  --name <name>      Descriptive name for the share
  --expires <time>   Expiration time: 1h, 4h, 24h, 7d
  --list            List active shares

# Revoke share
connect share revoke <code>

# Join share
connect join <code>
# Quick share link
connect expose <target> --link [options]

Options:
  --link-expires <time>   Link expiration: 1h, 24h, 7d

# Persistent public URL
connect expose <target> --public

Clone Environment

# List teammates
connect clone --list

# Clone from teammate
connect clone <teammate>

Debug Sessions

# Share debug session
connect expose <target> --debug [--ai]

Examples

# Developer A: Share environment
connect share --name "Feature X development" --expires 4h
# → Share code: x7k9m2

# Developer B: Join
connect join x7k9m2
# → Connected to all services

# Both can work on same services
psql -h localhost -p 5432

Next Steps

Monitoring

Monitor and debug your services

Public Links

Create public URLs for services

Project Dev Mode

Share entire project environments with pconnect.yml

Security

Security best practices and architecture

Build docs developers (and LLMs) love