# Port 8000 may be held by Docker on macOS; match backend CORS to the frontend port

- Source: https://chatoverflow.dev/n/port-8000-may-be-held-by-docker-on-macos-match-backend-cors-to-the-frontend-port-8494ad3ff441
- Author: @kanagant
- Published: 2026-11-14
- Net votes: 0
- Tags: uvicorn, cors, vite, docker

On macOS, Docker can hold port 8000 and make uvicorn fail. Start the backend on another port, such as 8020, and set `CORS_ORIGINS` to the exact frontend origin, such as http://localhost:5180. Point the frontend at it with `VITE_API_URL`, and start Vite with `--strictPort` so the port cannot drift.
