Skip to main content

Overview

Jean includes a built-in HTTP server with WebSocket support, allowing you to access the full Jean interface from any web browser on your network. This is useful for:
  • Accessing Jean from tablets or phones
  • Working from multiple machines without syncing
  • Remote development scenarios
  • Team collaboration (experimental)

Enabling HTTP Server

Via Preferences

  1. Open Preferences (Cmd/Ctrl + ,)
  2. Navigate to Remote Access tab
  3. Configure server settings:
    • Enable HTTP Server: Toggle on
    • Port: Default 3456 (change if needed)
    • Auto-start: Launch server on app startup
    • Localhost Only: Bind to 127.0.0.1 (more secure)
  4. Click Start Server

Server Status

When running, you’ll see:

Authentication

Token-Based Auth

Jean uses bearer token authentication for HTTP/WebSocket access: Token Requirements:
  • Auto-generated on first server start
  • Stored in preferences (http_server_token)
  • Required by default (http_server_token_required: true)
Disabling Auth (not recommended):
  1. Preferences > Remote Access
  2. Uncheck Require Token
  3. Restart server

Using the Token

URL with token:
WebSocket connection:
API requests:

API Endpoints

/api/auth

Validate authentication token. Method: GET Query params:
  • token - Auth token (optional if token_required: false)
Response:
Error:

/api/init

Get initial application state (projects, worktrees, sessions, preferences). Method: GET Query params:
  • token - Auth token
Response:
Used by: Web frontend to preload data before WebSocket connects.

/ws

WebSocket endpoint for real-time bidirectional communication. Protocol: WebSocket Query params:
  • token - Auth token
Connection:

WebSocket Protocol

Message Types

Client → Server: Invoke Command

Server → Client: Response

Success:
Error:

Server → Client: Event Broadcast

Available Commands

All Tauri commands are available via WebSocket. Examples: List projects:
Create worktree:
Send message:

Event Examples

Worktree created:
Message received:
Status update:

Network Configuration

Localhost Only (Default)

Binds to 127.0.0.1 - only accessible from the same machine. Use when:
  • Testing locally
  • Security is critical
  • No need for remote access

LAN Access

Binds to 0.0.0.0 - accessible from any device on your network. Use when:
  • Accessing from phone/tablet
  • Multiple development machines
  • Team collaboration
Enable:
  1. Preferences > Remote Access
  2. Uncheck Localhost Only
  3. Restart server
Access via:
Find your LAN IP:

Port Forwarding

For internet access (advanced):
  1. Configure router port forwarding: External:3456 → Internal:[your-ip]:3456
  2. Use dynamic DNS service for stable hostname
  3. Access via: http://[your-ddns-hostname]:3456?token=...
Security warning: Only do this with strong token authentication enabled.

Security Best Practices

Token Management

  • Never share tokens: Tokens grant full access to Jean
  • Rotate regularly: Generate new token if compromised
  • Use HTTPS: Set up reverse proxy with SSL for production
  • Strong tokens: Default tokens are 32 bytes (secure)

Network Security

  • Firewall rules: Restrict port access to trusted IPs
  • VPN recommended: Use VPN instead of exposing to internet
  • Monitor access: Check logs for unexpected connections
  • Localhost first: Start with localhost-only, enable LAN only when needed

CORS Configuration

Jean’s HTTP server uses permissive CORS (allow_origin: Any). For production, use a reverse proxy to restrict origins: nginx example:

Static File Serving

The HTTP server serves the Jean web frontend from: Development:
  • ../dist/ (relative to Tauri manifest)
Production:
  • Bundled resources (via Tauri resource config)
  • dist/ relative to executable
Fallback: All routes serve index.html (SPA routing)

WebSocket Broadcast System

Jean uses a broadcast channel to push events to all connected WebSocket clients: Architecture:
  1. Tauri emits event: app.emit("event-name", payload)
  2. HTTP server intercepts via WsBroadcaster
  3. Event serialized to JSON
  4. Broadcast to all WS clients
Implementation:
Extension trait:

Troubleshooting

Port Already in Use

Solution: Change port in Preferences > Remote Access > Port

Cannot Connect from Other Device

  1. Verify server is running: Check Preferences > Remote Access
  2. Disable “Localhost Only” if accessing from another device
  3. Check firewall: Allow port 3456
  4. Verify LAN IP: Use ifconfig/ipconfig to confirm
  5. Test locally first: Visit http://localhost:3456?token=...

WebSocket Disconnects Frequently

  • Check network stability
  • Increase WebSocket timeout
  • Monitor for “lagged” warnings in logs (client too slow)

401 Unauthorized

  • Verify token is correct
  • Check token_required setting
  • Generate new token if old one expired/corrupted

Performance Considerations

  • Multiple clients: Each WebSocket client receives all events
  • Event throttling: Not currently implemented (may lag slow clients)
  • Max clients: No hard limit (resource-dependent)
  • Message queuing: 256-message buffer per client

Example: Web Client