Self-Hosting Quick Start
Set up tribecode for your team with complete privacy and control. All your AI analytics data stays on your own infrastructure.
What You'll Set Up
PostgreSQL for persistent storage (Supabase, NeonDB, or self-hosted)
tribecode server running on your infrastructure
Each team member connects their CLI to your server
Phase 1: Admin Setup
One-time setup by the team admin or DevOps
Set Up Your Database
tribecode requires a PostgreSQL database for persistent storage. Choose one of these options:
Option A: Supabase (Easiest)
- 1. Go to supabase.com and create a free account
- 2. Create a new project
- 3. Go to Settings β Database
- 4. Copy the Connection string (URI)
postgresql://postgres.[project-ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgresOption B: NeonDB (Serverless PostgreSQL)
- 1. Go to neon.tech and create an account
- 2. Create a new project
- 3. Copy the connection string from the dashboard
postgresql://[user]:[password]@[endpoint].neon.tech/neondb?sslmode=requireOption C: Self-Hosted PostgreSQL
Use your existing PostgreSQL server or deploy one with Docker:
docker run -d --name tribe-postgres \
-e POSTGRES_USER=tribe \
-e POSTGRES_PASSWORD=your-secure-password \
-e POSTGRES_DB=tribe_analytics \
-p 5432:5432 \
postgres:15Connection string: postgresql://tribe:your-secure-password@localhost:5432/tribe_analytics
π Save your DATABASE_URL - you'll need it in the next step. This is also the key you'll distribute to team members who want to view the dashboard.
Install & Start the Server
Install the tribecode CLI on your server machine:
npx @_xtribe/cli@latestConfigure your database connection:
# Configure database (interactive)
tribe server config set
# Or set database directly:
tribe server config database "postgresql://user:pass@host:5432/tribe_analytics"
# Verify configuration
tribe server statusStart the server:
# Start the server
tribe server start
# Check status
tribe server status
# View logs
tribe server logsβ
Success! Your server is now running. Test it: curl http://localhost:8080/api/health
Make Server Accessible to Your Team
Your team members need to reach the server. Options:
Option A: Internal Network
If your team is on the same network, use the server's internal IP:
http://192.168.1.100:8080Option B: Public URL with HTTPS (Recommended)
Set up a reverse proxy (nginx, Caddy) with SSL for remote access:
https://tribe.your-company.comOption C: Cloud Deployment
Deploy on Railway, Render, Fly.io, or your cloud provider. Set the DATABASE_URL environment variable.
π Save your Server URL - this is what you'll share with team members.
Phase 2: Team Member Setup
Each team member follows these steps on their own machine
Install the tribecode CLI
Each team member installs the CLI on their development machine:
npx @_xtribe/cli@latestRequirements: Node.js 16+ with npm/npx. Works on Linux, macOS, and Windows.
Connect to Your Team's Server
Configure the CLI to point to your team's self-hosted server:
# Interactive configuration
tribe config set
# When prompted, enter your team's server URL:
# Dashboard URL: https://tribecode.ai (keep default)
# tribecode server URL: https://tribe.your-company.com (YOUR server)
# Verify configuration
tribe config showAuthenticate via tribecode.ai OAuth:
# Login (opens browser for OAuth)
tribe login
# Enable telemetry collection
tribe enable
# Check everything is connected
tribe statusβ Done! Your CLI is now sending telemetry to your team's self-hosted server. All data stays on your infrastructure.
Phase 3: Using the Dashboard
View your team's AI analytics
Access the Dashboard
Team members can view analytics via the tribecode.ai dashboard, pointed at your self-hosted data:
- 1Go to tribecode.ai and log in
- 2Navigate to Settings β Data
- 3Enter your team's tribecode server URL (e.g.,
https://tribe.your-company.comfrom Step 3) - 4Click Test & Save
π Privacy Guarantee
The tutor server URL is stored only in your browser's localStorage. tribecode's servers never see or store your server connection details. The dashboard connects directly from your browser to your tutor server.
Share Server Access with Team
For team members to view the dashboard, share your tutor server URL:
Team Onboarding Checklist
Team Setup Instructions
-----------------------
1. Install CLI: npx @_xtribe/cli@latest
2. Configure server: tribe config set
When prompted, enter:
- Dashboard URL: https://tribecode.ai (default)
- tribecode server URL: https://tribe.your-company.com
3. Login: tribe login
4. Enable: tribe enable
5. Dashboard setup (for viewing analytics):
- Go to tribecode.ai β Settings β Data
- Enter tribecode server URL: https://tribe.your-company.com
- Click Test & SaveCopy this to your team's internal wiki or Slack channel.
β οΈ Security Note: Ensure your tutor server is properly secured with HTTPS and network access controls before sharing access with team members.
Quick Reference
| Who | What They Need | Where to Get It |
|---|---|---|
| Admin | Database URL | Supabase/NeonDB/PostgreSQL |
| Admin | Server hosting | Your infrastructure |
| Team Members | Server URL | Admin provides (e.g., https://tribe.company.com) |
| Team Members | tribecode server URL (for dashboard) | Admin provides (same as CLI server URL) |
| Team Members | tribecode.ai account | Sign up at tribecode.ai |
Troubleshooting
β "Connection refused" when team member enables
Problem: CLI can't reach the server
Solutions:
- Verify server is running:
tribe server status(on server machine) - Check firewall allows the port
- Verify the server URL is correct:
tribe config show
β οΈ Dashboard shows "Connection failed"
Problem: Dashboard can't connect to the tutor server
Solutions:
- Verify the tribecode server URL is correct
- Check the server is running:
curl https://your-server/api/health - Ensure CORS allows connections from tribecode.ai
- For HTTPS: ensure SSL certificate is valid
βΉοΈ No data appearing in dashboard
Problem: Dashboard is connected but shows no events
Solutions:
- Ensure CLI is enabled:
tribe status - Check CLI is pointing to correct server:
tribe config show - Verify server is receiving data:
curl https://your-server/api/telemetry/stats - Use Claude Code or Cursor to generate some telemetry events
π You're All Set!
Your team now has tribecode running on your own infrastructure with complete privacy and control. All AI analytics data stays on your database - tribecode never sees your data.