- Connecting to a shared team CLI Proxy instance
- Using a cloud-hosted proxy server
- Accessing CLI Proxy from multiple devices
- Separating the proxy server from the client application
Prerequisites
Before connecting to a remote server, you need:Remote Server Running
A CLI Proxy server running on a remote host with:
- Network accessibility from your location
- HTTPS configured (strongly recommended for remote access)
- Firewall rules allowing incoming connections
API Base URL
The full URL to your CLI Proxy server, for example:
https://llm.yourdomain.comhttps://proxy.example.com:8317http://192.168.1.100:8317(local network only, not recommended for internet)
Connection Steps
Skip Onboarding
When you first launch ZeroLimit, click Skip For Now on the welcome screen.This bypasses the local setup wizard and takes you directly to the login page.
Enter Connection Details
On the login page, fill in the form:API Base URL:
- Enter the full URL to your remote server
- Include the protocol (
https://orhttp://) - Include the port if non-standard (e.g.,
:8317) - Examples:
https://proxy.mydomain.comhttps://llm.company.com:8317http://10.0.1.5:8317(local network)
- Enter the
secret-keyfrom the remote server’sconfig.yaml - This is the authentication credential
- Must match exactly (case-sensitive)
- Check this box to save your credentials securely
- You’ll stay logged in across app restarts
- Credentials are encrypted in local storage
Login
Click the Login button to connect.ZeroLimit will:
- Normalize the API base URL (adds
/v0/managementpath) - Send an authentication request to the management API
- Fetch the server configuration and validate access
- Update connection status to “connected”
- Store credentials if “Remember” is checked
Verify Connection
After successful login, verify your connection:
- Dashboard should show server status and version
- Connection indicator should be green/connected
- You should see your configured providers (if any)
- Server version (e.g., “v1.2.3”)
- Connection status: “Connected” in green
API URL Normalization
ZeroLimit automatically normalizes the API base URL you enter: Input examples:/v0/management) is appended automatically when making requests.
Implementation (auth.store.ts:80):
Connection Lifecycle
Initial Connection
- User enters credentials on login page
- Set connecting status:
- Configure API client:
- Fetch server config (
auth.store.ts:87): - Update state on success:
Session Restoration
If “Remember Credentials” was enabled, ZeroLimit automatically restores your session on launch:- Load saved credentials from secure storage
- Normalize API base URL
- Configure API client
- Attempt auto-login
- Success: Continue to dashboard
- Failure: Show login page
Connection Monitoring
ZeroLimit monitors connection health:- Health checks: Periodic API pings to verify server availability
- Network errors: Detected via failed requests
- Unauthorized: Server rejects management key
auth.store.ts:188-202):
HTTPS Configuration
For remote access, HTTPS is strongly recommended.Why HTTPS?
- Encryption: Protects your management key in transit
- Authentication: Verifies server identity
- Security: Prevents man-in-the-middle attacks
Setting up HTTPS on the Server
- Reverse Proxy (Recommended)
- Self-Signed Certificate
- Let's Encrypt
Use a reverse proxy like Nginx or Caddy to handle HTTPS:Nginx example:Caddy example (auto HTTPS):
Troubleshooting
Connection Failed
Error: “Connection failed” or network timeout Causes:- Server is not running
- Firewall blocking access
- Incorrect URL
- Network issues
-
Verify server is running:
-
Test connectivity:
-
Check firewall rules:
-
Verify DNS resolution:
Authentication Failed
Error: “Login failed” or “Authentication failed” Causes:- Incorrect management key
- Key mismatch between client and server
-
Verify secret-key on server:
-
Check for whitespace:
- Secret keys are trimmed in ZeroLimit:
.trim() - Ensure no extra spaces in
config.yaml
- Secret keys are trimmed in ZeroLimit:
-
Update server config if needed:
Then restart CLI Proxy:
SSL/TLS Errors
Error: “SSL certificate error” or “Certificate validation failed” Causes:- Self-signed certificate not trusted
- Expired certificate
- Certificate domain mismatch
-
For self-signed certificates:
- Import the certificate to your OS trust store
- Or use HTTP for testing (not recommended for production)
-
For expired certificates:
- Renew with Let’s Encrypt:
certbot renew - Or generate new self-signed certificate
- Renew with Let’s Encrypt:
-
For domain mismatch:
- Ensure URL matches certificate CN/SAN
- Access via correct domain name, not IP address
Frequent Disconnections
Symptoms: Connection drops and reconnects repeatedly Causes:- Unstable network
- Server restarting
- Firewall timeout
- Check server logs for crashes or restarts
- Adjust firewall timeout settings
- Use a more stable network connection
- Check server resource usage (CPU, memory, disk)
Can’t Access from Other Devices
Symptoms: Can’t connect from other computers/locations Causes:- Firewall blocking external access
- Server only listening on localhost
- Port forwarding not configured
-
Configure server to listen on all interfaces (
config.yaml): -
Open firewall for external access:
- Configure port forwarding if behind NAT
- Use a reverse proxy with proper HTTPS (recommended)
Security Best Practices
- Always use HTTPS for remote connections
- Use strong management keys:
- At least 16 characters
- Mix of letters, numbers, symbols
- Generate with:
openssl rand -base64 24
- Restrict access with firewall rules:
- Monitor access logs for unauthorized attempts
- Rotate keys periodically
- Use VPN for additional security layer
- Keep software updated to patch security vulnerabilities
After Connection
Once connected to a remote server:Provider Management
Configure providers on the remote server
Monitoring Usage
Monitor server health and usage
Managing Proxy
Start, stop, and configure the proxy
Troubleshooting
Common issues and solutions
Switching to Local Setup
If you later want to set up a local CLI Proxy instance:- Logout from the remote server
- Open Settings > CLI Proxy Server
- Configure local executable path
- Restart ZeroLimit
- Login with
http://localhost:8317and local management key