Default port
By default, the proxy server runs on port 18080:scripts/proxy.mjs:18
Changing the port
Set theCOPILOT_PROXY_PORT environment variable to use a different port:
Port conflicts
If port 18080 is already in use, youβll see this error:scripts/proxy.mjs:1322-1324
Resolving port conflicts
Option 1: Use a different port
Option 1: Use a different port
The simplest solution is to run the proxy on a different port:Then update Claude Code to use the new port:
Option 2: Find and kill the conflicting process
Option 2: Find and kill the conflicting process
Find which process is using port 18080:
Option 3: Check if proxy is already running
Option 3: Check if proxy is already running
You may have already started the proxy server. Verify itβs responding:Expected response:If you get this response, the proxy is already running and ready to use.Source:
scripts/proxy.mjs:876-879Docker port mapping
When using Docker, the port mapping is defined indocker-compose.yml:
docker-compose.yml
docker-compose.yml:6-11
To use a different port on the host:
docker-compose.yml
Running multiple instances
You can run multiple proxy instances on different ports:Instance with Brave Search
Instance without Brave Search
Health check endpoint
Verify the proxy is running and check which port itβs using:- Monitoring server health
- Verifying the correct port
- Load balancer health checks
- Docker container health checks
scripts/proxy.mjs:876-879