Port Allocation¶
Status: Normative (Mandatory) · Implemented: Partial (since v0.1.0) — Database (5432), Controller (9100), Recorder health (9500) are AS-IS; all others TO-BE Scope: System-wide port scheme
All Silvasonic services use a consistent port scheme. Ports are configured via .env.
Port Table¶
| Service | Internal Port | Host Port (Dev) | .env Variable |
Status |
|---|---|---|---|---|
| TimescaleDB | 5432 | 5432 | SILVASONIC_DB_PORT |
✅ Implemented |
| Redis | 6379 | 6379 | SILVASONIC_REDIS_PORT |
✅ Implemented v0.2 |
| Controller | 9100 | 9100 | SILVASONIC_CONTROLLER_PORT |
✅ Implemented |
| Web-Mock (Dev UI) | 8001 | 8001 | SILVASONIC_WEB_MOCK_PORT |
✅ Implemented v0.2 |
| Web-Interface | 8000 | 8000 | SILVASONIC_WEBUI_PORT |
📋 Planned v0.8 |
| Processor | 9200 | 9200 | SILVASONIC_PROCESSOR_PORT |
✅ Implemented v0.5 |
| Recorder (Health) | 9500 | — | — (internal only) | ✅ Scaffold |
| BirdNET (Health) | 9500 | — | — (internal only) | 📋 Planned v1.1 |
| BatDetect (Health) | 9500 | — | — (internal only) | 📋 Planned v1.3 |
| Uploader (Health) | 9500 | — | — (internal only) | 📋 Planned v0.6 |
| Weather (Health) | 9500 | — | — (internal only) | 📋 Planned v1.2 |
| Gateway (Caddy) HTTP | 80 | 80 | SILVASONIC_GATEWAY_HTTP_PORT |
📋 Planned v0.7 |
| Gateway (Caddy) HTTPS | 443 | 443 | SILVASONIC_GATEWAY_HTTPS_PORT |
📋 Planned v0.7 |
| Icecast | 8080 | 8080 | SILVASONIC_ICECAST_PORT |
📋 Planned v0.9 |
Note: Tailscale creates a VPN overlay — no dedicated ports needed.
Principles¶
- Standard ports for well-known services (PostgreSQL 5432, Redis 6379, HTTP 80/443)
80XXrange for web-facing UIs (Web-Interface 8000, Web-Mock 8001, Icecast 8080)91XXrange for Silvasonic service APIs (Controller 9100, Processor 9200)9500unified internal health port for services without their own API- All host-exposed ports configurable via
.env - No internal port collisions — each service uses a unique internal port to avoid confusion
Health Port Convention¶
- Services with an API (Controller, Web-Interface): Health is a route on the API port (
/healthyon9100) - Services without an API (Recorder, BirdNET, BatDetect, Uploader, Weather): Use
silvasonic.core.healthon default port9500 - Compose health checks run inside the container — no host port needed
- Multiple recorder instances can all use
9500internally (container isolation)
Production vs. Development¶
- Production: Only Caddy exposes ports (80/443). All other services communicate via the internal
silvasonic-netPodman network. - Development: Controller (9100), Web-Mock (8001), Database (5432), Redis (6379) exposed on localhost for debugging. Recorder has no host port.