Production Setup Reference
This document serves as the authoritative production reference for running CollectorCtrl at enterprise scale: firewall rules, host prerequisites, server address advertisement, offline package mirroring, and PostgreSQL database setup.
If you are looking for interactive step-by-step walkthroughs, check out the dedicated guides:
- Quick Start with Docker — Local evaluation in 5 minutes
- Install on Windows Server — Native Windows Service setup
- Install on Linux — systemd installation script
1. Network & Firewall Port Requirements
Ensure host security groups, Kubernetes ingress rules, and corporate firewalls permit traffic on the following required ports:
| Port | Protocol | Direction | Description |
|---|---|---|---|
| 4320 | TCP / WS(S) | Inbound to Server | OpAMP Gateway: Core WebSocket channel for continuous Supervisor communication. |
| 4321 | TCP / HTTP(S) | Inbound to Server | Dashboard Console: Exposes Admin UI & REST API. Terminate TLS at Nginx / Caddy. |
| 13133 | TCP | Localhost only | OTel Health Check: Used by Supervisor agent for local health checks. |
| 5432 | TCP | Outbound from Server | PostgreSQL Store: Database server connection (production deployments). |
Supervisors establish an outbound persistent WebSocket connection to the Management Server (port 4320). No inbound firewall rules are ever needed on target nodes.
2. Target Host Prerequisites
Before deploying the Supervisor agent on target Linux or Windows hosts, verify:
1. Pre-installed OTel Collector Binary
Ensure an OpenTelemetry Collector binary is present on the target host:
- Windows default path:
C:\Program Files\otelcol\otelcol.exe - Linux default path:
/usr/bin/otelcol-contrib
2. Administrative Privileges
Root access (sudo) on Linux or Administrator privileges on Windows Server to install background system services (systemd or Windows Service Control Manager).
3. Outbound Network Connectivity
Target host must be able to reach the Management Server on port 4320 (OpAMP) and port 4321 (UI/API onboarding endpoints). Internet access is not required on nodes.
3. Server Address Advertisement
Agents resolve the Management Server address automatically via the /api/onboard/serverinfo endpoint. The server determines its advertise address in the following priority order:
1. Full Endpoint Override (COLLECTORCTRL_OPAMP_ENDPOINT)
Full WebSocket URL override. Recommended for Kubernetes Service DNS or proxied reverse proxy setups:
ws://collectorctrl-server.collectorctrl.svc.cluster.local:4320/v1/opamp
2. Host Override (COLLECTORCTRL_ADVERTISE_HOST)
Host IP or DNS domain name override. Recommended for NAT environments or load balancers:
collectorctrl.corp.internal
3. Auto-detected Primary Outbound IP
Automatic resolution of the primary network interface IP address on bare-metal and VM nodes.
If agents fail to connect because the onboarding script output displays localhost, set COLLECTORCTRL_ADVERTISE_HOST on the server environment and restart the server service.
4. Offline & Air-Gapped Fleets (Package Mirror)
For corporate environments without outbound internet access on worker nodes, CollectorCtrl includes built-in package mirroring:
- Automatic Mirroring: The server mirrors supervisor release binaries from GitHub on startup and syncs every 6 hours into
/packages/. - Zero-Internet Onboarding: Onboarding scripts query
http://YOUR_SERVER:4321/packages/first before falling back to external mirrors.
Environment Variable Overrides
| Variable | Default | Description |
|---|---|---|
COLLECTORCTRL_PACKAGE_SYNC | true | Set to false to disable automatic GitHub synchronization |
COLLECTORCTRL_PACKAGES_DIR | ./packages | Directory path for local mirrored package artifacts |
COLLECTORCTRL_PACKAGE_SYNC_REPO | CollectorCtrl/CollectorCtrl | Repository source for mirroring release builds |
5. Production Database: PostgreSQL Setup
While SQLite is configured by default for evaluation, enterprise deployments handling large fleets should use a high-concurrency PostgreSQL 14+ database.
Docker Compose Production Template
version: '3.8'
services:
collectorctrl-server:
image: ghcr.io/collectorctrl/collectorctrl-server:latest
ports:
- "4320:4320" # OpAMP WebSocket
- "4321:4321" # Web Dashboard UI & REST API
environment:
- COLLECTORCTRL_MODE=production
- COLLECTORCTRL_DB_TYPE=postgres
- COLLECTORCTRL_DB_DSN=host=postgres user=postgres password=postgres dbname=collectorctrl port=5432 sslmode=disable
- COLLECTORCTRL_JWT_SECRET=change_this_secret_in_production
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=collectorctrl
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:6. Dynamic Configuration Reconciliation Flow
When an administrator updates policy rules in the UI, the Supervisor executes a supervised configuration lifecycle:
1. Server Compile & Validation
The Management Server merges base policies with target overrides and validates final OpenTelemetry YAML syntax.
2. OpAMP Push Delivery
The compiled YAML payload is delivered over the persistent WebSocket to target Supervisors.
3. Fast Supervised Restart
The Supervisor writes the new configuration to disk and triggers a supervised collector process restart. If the new config triggers a crash loop, the Supervisor automatically reverts to the previous working configuration hash.
4. Hash Confirmation
The effective configuration hash is reported back to the Management Server via OpAMP heartbeats.
7. Logs & Troubleshooting Reference
| Platform | Component | Log File Location |
|---|---|---|
| Windows Server | Application Logs | C:\ProgramData\CollectorCtrl\logs\server.log |
| Windows Server | Supervisor Service | C:\ProgramData\CollectorCtrlSupervisor\supervisor.log |
| Linux Host | Server systemd Logs | sudo journalctl -u collectorctrl -n 100 --no-pager |
| Linux Host | Supervisor Logs | /var/log/collectorctrl/supervisor.log |
CollectorCtrl