camera

Server deployment, ports, and environment

Build and run

The Dockerfile builds the Vue UI, installs the Python backend, and serves all HTTP surfaces through one TLS listener.

docker build -t cammycam:local .
docker run --rm --name cammycam \
  --env-file .env \
  -p 443:443/tcp \
  -v cammycam-data:/data \
  cammycam:local

Open https://<host>/. GraphQL uses /graphql. MCP Streamable HTTP uses /mcp/ with Authorization: Bearer <CAMMY_MCP_API_KEY>. REST uses /api and camera streams use /ws; all share TCP 443.

Ports

Port Protocol Required Purpose
443 TCP Yes UI, REST, GraphQL, MCP, WebSocket, firmware downloads
5353 UDP Optional mDNS discovery when CAMMY_ENABLE_MDNS=true
1883 or 8883 TCP outbound Optional External MQTT broker, plain or TLS

Do not publish database, firmware-storage, or reset-delivery files as ports. For container mDNS, host networking is usually required because multicast does not cross standard Docker bridge networking reliably.

Environment contract

Required production values:

Storage and runtime:

MQTT integration uses CAMMY_MQTT_HOST, CAMMY_MQTT_PORT, CAMMY_MQTT_USER, CAMMY_MQTT_PASSWORD, and CAMMY_MQTT_TLS. CAMMY_ALLOW_DEFAULT_ADMIN and CAMMY_ALLOW_INSECURE_MCP are development-only.

Activity interfaces

MCP tools are search_activity and summarize_activity. Filters include camera, event kind, object label, time range, confidence, and result limit.

Example MCP client settings:

{
  "url": "https://cammy.example/mcp/",
  "headers": { "Authorization": "Bearer ${CAMMY_MCP_API_KEY}" }
}

Example GraphQL query:

query RecentBirds {
  activities(label: "bird", minConfidence: 0.8, limit: 25) {
    cameraId
    label
    confidence
    timestamp
  }
}

Supply a regular CammyCam access token as the GraphQL bearer token. Generated container certificates use an internal local CA; mount trusted certificate files under CAMMY_CERT_DIR for production hostnames.