BetaFree-to-use OpAMP fleet management for Windows & LinuxDownload →

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.

Step-by-Step Installation Guides

If you are looking for interactive step-by-step walkthroughs, check out the dedicated guides:


1. Network & Firewall Port Requirements

Ensure host security groups, Kubernetes ingress rules, and corporate firewalls permit traffic on the following required ports:

PortProtocolDirectionDescription
4320TCP / WS(S)Inbound to ServerOpAMP Gateway: Core WebSocket channel for continuous Supervisor communication.
4321TCP / HTTP(S)Inbound to ServerDashboard Console: Exposes Admin UI & REST API. Terminate TLS at Nginx / Caddy.
13133TCPLocalhost onlyOTel Health Check: Used by Supervisor agent for local health checks.
5432TCPOutbound from ServerPostgreSQL Store: Database server connection (production deployments).
No Inbound Ports Needed on Target Nodes

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

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

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

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

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

2. Host Override (COLLECTORCTRL_ADVERTISE_HOST)

Host IP or DNS domain name override. Recommended for NAT environments or load balancers: collectorctrl.corp.internal

3

3. Auto-detected Primary Outbound IP

Automatic resolution of the primary network interface IP address on bare-metal and VM nodes.

Fixing Localhost Onboarding Warnings

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

VariableDefaultDescription
COLLECTORCTRL_PACKAGE_SYNCtrueSet to false to disable automatic GitHub synchronization
COLLECTORCTRL_PACKAGES_DIR./packagesDirectory path for local mirrored package artifacts
COLLECTORCTRL_PACKAGE_SYNC_REPOCollectorCtrl/CollectorCtrlRepository 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

docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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

1. Server Compile & Validation

The Management Server merges base policies with target overrides and validates final OpenTelemetry YAML syntax.

2

2. OpAMP Push Delivery

The compiled YAML payload is delivered over the persistent WebSocket to target Supervisors.

3

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

4. Hash Confirmation

The effective configuration hash is reported back to the Management Server via OpAMP heartbeats.


7. Logs & Troubleshooting Reference

PlatformComponentLog File Location
Windows ServerApplication LogsC:\ProgramData\CollectorCtrl\logs\server.log
Windows ServerSupervisor ServiceC:\ProgramData\CollectorCtrlSupervisor\supervisor.log
Linux HostServer systemd Logssudo journalctl -u collectorctrl -n 100 --no-pager
Linux HostSupervisor Logs/var/log/collectorctrl/supervisor.log