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.
Create a share
On your machine: 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)
Teammate joins
Your teammate runs: They now have access to the same services on the same ports.
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:
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.
Public Share Links
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
1 Hour
24 Hours (Default)
7 Days
connect expose localhost:3000 --link --link-expires 1h
Perfect for quick demos and testing. connect expose localhost:3000 --link
Good for day-long collaborations. connect expose localhost:3000 --link --link-expires 7d
Ideal for longer-term sharing.
Webhook Integration
Public share links are perfect for testing webhooks from external services:
Stripe Webhooks
GitHub Webhooks
Twilio Callbacks
# 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
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:
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:
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:
Expose the service with a public URL
connect expose localhost:8080 --name api --public
Share the URL
Send the public URL to your teammate: https://abc123.privateconnect.co
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.
Recommended Approach
HTTP/API Services
Database Services
Safe to use public links: connect expose localhost:3000 --link --link-expires 1h
Perfect for:
Web apps
REST APIs
Webhook endpoints
Demo sites
Use environment shares: # You
connect share
# → Share code: x7k9m2
# Teammate
connect join x7k9m2
psql -h localhost -p 5432
Safe for:
PostgreSQL
MySQL
MongoDB
Redis
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 < nam e > Descriptive name for the share
--expires < tim e > Expiration time: 1h, 4h, 24h, 7d
--list List active shares
# Revoke share
connect share revoke < cod e >
# Join share
connect join < cod e >
Public Links
# Quick share link
connect expose < targe t > --link [options]
Options:
--link-expires < tim e > Link expiration: 1h, 24h, 7d
# Persistent public URL
connect expose < targe t > --public
Clone Environment
# List teammates
connect clone --list
# Clone from teammate
connect clone < teammat e >
Debug Sessions
# Share debug session
connect expose < targe t > --debug [--ai]
Examples
Quick Team Collaboration
Webhook Testing
Demo Sharing
Pair Debugging
Onboarding
# 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