The web application now uses a Next.js API proxy by default instead of direct client-to-API connections. This provides better security and enables remote access.
Update your .env.local file:
```bash
cd apps/web
# Add the backend API URL for the Next.js server API_URL=http://localhost:3001
2. **Restart the development servers**:
```bash
# From project root
pnpm run dev
Rebuild your Docker images:
docker-compose build
Port 3001 is now internal only
Run the containers:
docker-compose up
Before (didn't work remotely):
http://192.168.1.100:3000http://localhost:3001 (failed from remote)After (works remotely):
http://192.168.1.100:3000If you need the old behavior (direct client-to-API), you can bypass the proxy:
# In apps/web/.env.local
NEXT_PUBLIC_WATCH_FINISHED_API=http://your-api-server:3001
API_URL=http://localhost:3001
This is useful for:
Browser → http://localhost:3001/api/* (direct)
Browser → ws://localhost:3001/socket.io (direct)
Browser → http://localhost:3000/api/* → Next.js Proxy → http://localhost:3001/*
Browser → ws://localhost:3000/socket.io → Next.js Proxy → ws://localhost:3001/socket.io
Browser → http://localhost:3001/api/* (direct, bypasses proxy)
Browser → ws://localhost:3001/socket.io (direct, bypasses proxy)
API_URL in your environment matches where the API is runningnext.config.tsTo revert to the old behavior temporarily:
# In apps/web/.env.local
NEXT_PUBLIC_WATCH_FINISHED_API=http://localhost:3001
This will bypass the proxy and connect directly to the API.