ColorCraft reads defaults from runtime-config.json.
| Variable | Default | Purpose |
|---|---|---|
COLORCRAFT_WEB_HOST |
127.0.0.1 |
Vite bind host |
COLORCRAFT_WEB_PORT |
5174 |
Web port |
COLORCRAFT_API_HOST |
127.0.0.1 |
FastAPI bind host |
COLORCRAFT_API_PORT |
4100 |
API port |
COLORCRAFT_READINESS_TIMEOUT_SECONDS |
30 |
Launcher startup deadline in seconds |
COLORCRAFT_ALLOWED_ORIGINS |
Resolved web origin | Comma-separated exact CORS origins |
VITE_COLORCRAFT_API_URL |
Resolved API origin | API base URL that the frontend uses |
COLORCRAFT_ALLOW_LAN_ACCESS |
false |
Required opt-in for non-loopback hosts and origins |
Ports must be integers from 1 through 65535. The launcher checks both configured ports before it starts a child process.
Start ColorCraft when a default port is unavailable.
-
Open PowerShell in the repository root.
-
Set both port variables:
$env:COLORCRAFT_WEB_PORT = "5184" $env:COLORCRAFT_API_PORT = "4110"
-
Start the launcher:
.\backend\.venv311\Scripts\python.exe dev.py
The launcher prints the resolved web, API, health, readiness, and metadata URLs.
If a configured port is still unavailable, select unused port numbers and repeat the procedure.
Warning: ColorCraft does not provide authentication. Complete this procedure only on a trusted network with an appropriate firewall.
Example:
$env:COLORCRAFT_ALLOW_LAN_ACCESS = "true"
$env:COLORCRAFT_WEB_HOST = "0.0.0.0"
$env:COLORCRAFT_API_HOST = "0.0.0.0"
$env:COLORCRAFT_ALLOWED_ORIGINS = "http://192.168.1.20:5174"
$env:VITE_COLORCRAFT_API_URL = "http://192.168.1.20:4100"
.\backend\.venv311\Scripts\python.exe dev.pyReplace 192.168.1.20 with the computer's address on the trusted network. CORS
origins must include the exact scheme, host, and port. Wildcard origins are
rejected.
Source-image data travels from the browser to the configured API URL. Use HTTPS termination when the network requires transport encryption.
- Non-loopback bind hosts require
COLORCRAFT_ALLOW_LAN_ACCESS=true. - Non-loopback CORS origins require
COLORCRAFT_ALLOW_LAN_ACCESS=true. - An origin cannot contain credentials, a path other than
/, a query, or a fragment. - The launcher does not open a browser automatically.
VITE_COLORCRAFT_API_URLmust be reachable from the browser.- Environment variables override
runtime-config.json.
GET /metadata returns a machine-readable networkMode:
loopback: All resolved bind hosts and browser origins are loopback addresses.lan: At least one resolved bind host or browser origin is not loopback.
The application shell shows Loopback only or LAN enabled from this
field. Setting COLORCRAFT_ALLOW_LAN_ACCESS=true without a non-loopback host or
origin does not change the status to LAN enabled.
Static dashboard defaults are in app-manifest.json.
Dashboard consumers must use /metadata when they need runtime-resolved URLs.
See Dashboard manifest.