2.0.1

This page covers installing center-server 2.0.1, including hardware selection, firewall configuration, quick installation, and details.

Hardware Selection

  • Operating system: Ubuntu Server 22.04 LTS is the recommended OS and has been extensively tested. Other operating systems can be supported as a customized engagement and should be fully tested before production use.
  • Minimum specs: at least 4 CPU cores and 8 GB of memory, with more than 50 GB of free disk space (excluding recordings). A full cold start of all services requires about 6.5 GB of memory; configurations below 4 cores / 8 GB cannot run stably.
  • Network bandwidth: 100 Mbps as a baseline (control plane plus light talkback); for large-screen watch-keeping or many concurrent viewers, reserve uplink bandwidth according to actual concurrency.
  • Port-conflict check: verify whether other services already installed on the server occupy any of the ports listed in "Firewall Configuration" below; see "Details → Special Case 1" for handling.

Sizing Quick Reference

Choose server specs based on "online devices × online users":

Online devices Online users Recommended specs
50 – 500 5 – 25 4 cores / 8 GB
500 – 3000 25 – 150 4 cores / 16 GB (recommended)
3000 – 10000 150 – 500 8 cores / 32 GB

The figures above are engineering estimates and should be calibrated against real load tests after go-live.

Firewall Configuration

Before installation, open the following ports in the server firewall or cloud security group and ensure traffic can pass through. On first deployment, make sure to open all "Required" ports to avoid deployment or access failures caused by missing ports.

Required Ports

Port Protocol Service Purpose
80 TCP Nginx HTTP (auto-redirected to HTTPS)
443 TCP Nginx HTTPS, the unified client entry point
3478 TCP/UDP COTURN STUN/TURN signaling
20000-39999 TCP/UDP COTURN TURN relay port range
1883 TCP EMQX MQTT
8883 TCP EMQX MQTT over TLS
8083 TCP EMQX WebSocket
8084 TCP EMQX WebSocket Secure
40000-59999 UDP Janus RTP media-stream port range
8088 TCP Janus HTTP
8188 TCP Janus WebSocket
7088 TCP Janus Admin HTTP
7188 TCP Janus Admin WebSocket
61616 TCP ActiveMQ Artemis Message queue TCP
8161 TCP ActiveMQ Artemis Admin console
84 TCP Main service (main-service) HTTP API
86 TCP Device service (device-service) HTTP API
89 TCP Web app (web-app) Front-end UI
8066 TCP Agent Agent interface
7700 TCP Meilisearch Search engine
8959 TCP Nacos HTTP API / console
9959 TCP Nacos gRPC
10959 TCP Nacos Console

On-Demand Ports (normally closed; open only for remote troubleshooting)

The following ports involve databases, caches, and operations-management privileges and carry higher risk, so keep them closed by default; open them temporarily only when remote troubleshooting is required.

Port Protocol Service Purpose
5543 TCP PostgreSQL / Pgpool Database entry
6379 TCP Redis Cache
18083 TCP EMQX Admin console

Quick Installation

Installation command
1# Create the installer extraction directory. You can adjust this path as needed:
2sudo mkdir -p /tmp/es-center-server-install-app
3
4# Extract the downloaded installer package into the extraction directory:
5sudo tar -xzvf es-center-server-install-app-2.0.1-cn-1-202608121404.tar.gz -C /tmp/es-center-server-install-app
6
7# Switch to the installer extraction directory
8cd /tmp/es-center-server-install-app
9
10# Install the service. Parameter descriptions:
11# `service-root-dir`: installation directory of the service.
12# `data-root-dir`: data storage directory for data generated during runtime (logs, database mounts, etc.).
13# `internal-eth-name`: name of the internal network interface.
14# `internal-ip`: internal IP address.
15# `external-ip`: public IP address; if there is none, set it to the internal IP.
16# `domain-name`: domain name; if no domain is registered, set it to the internal or public IP.
17sudo ./cli install-server \
18--service-root-dir /opt/es-center-server-service \
19--data-root-dir /var/lib/es-center-server-data \
20--internal-eth-name eth0 \
21--internal-ip 172.16.8.178 \
22--external-ip 120.26.124.232 \
23--domain-name zxs.netbodycamera.com

Run sudo docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}" to inspect the Docker containers. Below is an example of the containers after a successful installation:

Example
1NAMES                               IMAGE                                                 STATUS
2es-center-server-emqx               emqx:5.8.8                                            Up About an hour
3es-center-server-nginx              nginx:1.29.4-alpine                                   Up About an hour
4es-center-server-launcher           docker:cli                                            Up About an hour
5es-center-server-meilisearch        getmeili/meilisearch:v1.28.1                          Up About an hour
6es-center-server-janus              gt-janus-gateway:1.4.1                                Up About an hour
7es-center-server-web-app            es-center-server-web-app:2.0.1-cn-1-20260812          Up About an hour
8es-center-server-device-service     es-center-server-device-service:2.0.1-cn-1-20260812   Up About an hour
9es-center-server-main-service       es-center-server-main-service:2.0.1-cn-1-20260812     Up 2 hours
10es-center-server-nacos              qingpan/rnacos:v0.8.3-alpine                          Up 2 hours
11es-center-server-coturn             coturn/coturn:4.7.0-alpine                            Up 2 hours
12es-center-server-activemq-artemis   apache/activemq-artemis:2.44.0-alpine                 Up 2 hours
13es-center-server-redis              bitnami/redis:7.4.3                                   Up 2 hours
14es-center-server-pg                 bitnamilegacy/pgpool:4.6.3                            Up 2 hours (healthy)
15es-center-server-pg-1               bitnami/postgresql-repmgr:16.3.0                      Up 2 hours
16es-center-server-pg-0               bitnami/postgresql-repmgr:16.3.0                      Up 2 hours

Details

Update or Apply for an SSL Certificate

Update or apply for an SSL certificate
1# Switch to the service installation directory
2cd /opt/es-center-server-service
3
4# Note: if `domain-name` was set to an internal or public IP during installation, the `update-server-ssl` command will report an error.
5sudo ./cli update-server-ssl

Special Case 1: Port Conflict

If other services are already installed on the server and occupy any of the following ports — 3478, 1883, 8883, 8083, 8084, 18083, 61616, 8161, 80, 443, 8088, 8188, 7088, 7188, 84, 86, 89, 8066, 7700, 8959, 9959, 10959, 5543, 6379, as well as the port ranges 20000-39999 and 40000-59999 — edit the corresponding ports in the .env configuration file inside the installer extraction directory, then run the installation command again.

Edit the configuration file and run the installation command
1# Edit the configuration file in the installer extraction directory
2sudo nano /tmp/es-center-server-install-app/es-center-server-service/.env
3
4# Switch to the installer extraction directory
5cd /tmp/es-center-server-install-app
6
7# Install the service. Parameter descriptions:
8# `service-root-dir`: installation directory of the service.
9# `data-root-dir`: data storage directory for data generated during runtime (logs, database mounts, etc.).
10# `internal-eth-name`: name of the internal network interface.
11# `internal-ip`: internal IP address.
12# `external-ip`: public IP address; if there is none, set it to the internal IP.
13# `domain-name`: domain name; if no domain is registered, set it to the internal or public IP.
14sudo ./cli install-server \
15--service-root-dir /opt/es-center-server-service \
16--data-root-dir /var/lib/es-center-server-data \
17--internal-eth-name eth0 \
18--internal-ip 172.16.8.178 \
19--external-ip 120.26.124.232 \
20--domain-name zxs.netbodycamera.com
21
22# To view the currently running Docker instances, run:
23sudo docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}"

If you discover a port conflict after installation, resolve it by editing the .env file in the service installation directory, then run the following command in that directory to update the service:

1# Edit the `.env` configuration file in the service installation directory
2sudo nano /opt/es-center-server-service/.env
3
4# Switch to the service installation directory
5cd /opt/es-center-server-service
6
7# Apply the `.env` configuration to update the service's config files and restart services in order
8sudo ./cli update-server

Special Case 2: Performance Parameter Tuning

The default configuration targets the recommended tier (4 cores / 16 GB). If your server is more or less powerful, you can tune the performance parameters in .env, such as ES_CENTER_SERVER_MAIN_SERVICE_JAVA_OPTS and ES_CENTER_SERVER_DEVICE_SERVICE_JAVA_OPTS (ActiveProcessorCount defaults to 2 and can be raised according to the cores allocated to the service).

Edit the configuration file and run the update command
1# Edit the `.env` configuration file in the service installation directory
2sudo nano /opt/es-center-server-service/.env
3
4# Switch to the service installation directory
5cd /opt/es-center-server-service
6
7# Apply the `.env` configuration to update the service's config files and restart services in order
8sudo ./cli update-server

.env File Contents

Below is the full contents of the installer configuration file .env (sensitive credentials are masked with xxx). In real deployments, refer to the .env inside the installer package.

.env
1# ####################################
2# ### es-center-server Basic Configuration
3# ####################################
4# Root directory for the es-center-server service
5ES_CENTER_SERVER_SERVICE_ROOT_DIR=/opt/es-center-server-service
6# Data root directory for the es-center-server
7ES_CENTER_SERVER_DATA_ROOT_DIR=/var/lib/es-center-server-data
8# Internal IP address of the es-center-server
9ES_CENTER_SERVER_INTERNAL_IP=192.168.0.1
10# External IP address of the es-center-server
11ES_CENTER_SERVER_EXTERNAL_IP=192.168.0.1
12# Domain name of the es-center-server
13ES_CENTER_SERVER_DOMAIN_NAME=example.com
14
15# ####################################
16# ### es-center-server-coturn WebRTC Traversal Service Configuration
17# ####################################
18# Docker image tag for the COTURN service
19ES_CENTER_SERVER_COTURN_DOCKER_IMAGE_TAG=4.7.0-alpine
20# Domain name for the COTURN service
21ES_CENTER_SERVER_COTURN_DOMAIN_NAME=example.com
22# Internal Ethernet interface name for the COTURN service
23ES_CENTER_SERVER_COTURN_INTERNAL_ETH_NAME=eth0
24# Internal IP address of the COTURN service
25ES_CENTER_SERVER_COTURN_INTERNAL_IP=192.168.0.1
26# External IP address of the COTURN service
27ES_CENTER_SERVER_COTURN_EXTERNAL_IP=192.168.0.1
28# Specifies the main listening port for the COTURN service. 
29# This is the port on which the COTURN server listens for incoming connections.
30ES_CENTER_SERVER_COTURN_LISTENING_PORT=3478
31# Defines the minimum port number within the range used by the COTURN service. 
32# COTURN may allocate ports starting from this value for certain operations.
33ES_CENTER_SERVER_COTURN_MIN_PORT=20000
34# Defines the maximum port number within the range used by the COTURN service. 
35# COTURN will not allocate ports beyond this value for relevant operations.
36ES_CENTER_SERVER_COTURN_MAX_PORT=39999
37# TURN username for the COTURN service
38ES_CENTER_SERVER_COTURN_TURN_USERNAME=webrtc-1
39# TURN credential for the COTURN service
40ES_CENTER_SERVER_COTURN_TURN_CREDENTIAL=xxx
41
42# ####################################
43# ### es-center-server-janus WebRTC Gateway Configuration
44# ####################################
45# Docker image tag for the Janus service
46ES_CENTER_SERVER_JANUS_DOCKER_IMAGE_TAG=1.4.1
47# Identifier for the Janus instance
48ES_CENTER_SERVER_JANUS_NO=janus-1
49# Internal Ethernet interface name for the Janus service
50ES_CENTER_SERVER_JANUS_INTERNAL_ETH_NAME=eth0
51# Internal IP address of the Janus service
52ES_CENTER_SERVER_JANUS_INTERNAL_IP=192.168.0.1
53# External IP address of the Janus service
54ES_CENTER_SERVER_JANUS_EXTERNAL_IP=192.168.0.1
55# Defines the range of ports that the Janus service will use for Real Time Transport Protocol (RTP) traffic.
56# RTP is responsible for the actual transmission of audio and video data. 
57# The Janus service will allocate ports from 40000 to 59999 for handling RTP streams during media communication.
58ES_CENTER_SERVER_JANUS_RTP_PORT_RANGE=40000-59999
59# Http port for the Janus service
60ES_CENTER_SERVER_JANUS_HTTP_PORT=8088
61# Http socket port for the Janus service
62ES_CENTER_SERVER_JANUS_ADMIN_HTTP_PORT=7088
63# Web socket port for the Janus service
64ES_CENTER_SERVER_JANUS_WS_PORT=8188
65# Admin web socket port for the Janus service
66ES_CENTER_SERVER_JANUS_ADMIN_WS_PORT=7188
67# Admin secret port for the Janus service
68ES_CENTER_SERVER_JANUS_ADMIN_SECRET=xxx
69
70# ####################################
71# ### es-center-server-activemq-artemis Message Queue Configuration
72# ####################################
73# Docker image tag for the ActiveMQ Artemis service
74ES_CENTER_SERVER_ACTIVEMQ_ARTEMIS_DOCKER_IMAGE_TAG=2.44.0-alpine
75# Username for the ActiveMQ Artemis service
76ES_CENTER_SERVER_ACTIVEMQ_ARTEMIS_USER=artemis
77# Password for the ActiveMQ Artemis service
78ES_CENTER_SERVER_ACTIVEMQ_ARTEMIS_PASSWORD=xxx
79# TCP port for the ActiveMQ Artemis service
80ES_CENTER_SERVER_ACTIVEMQ_ARTEMIS_TCP_PORT=61616
81# HTTP port for the ActiveMQ Artemis service
82ES_CENTER_SERVER_ACTIVEMQ_ARTEMIS_HTTP_PORT=8161
83
84# ####################################
85# ### es-center-server-emqx MQTT Message Broker Configuration
86# ####################################
87# Docker image tag for the EMQX service
88ES_CENTER_SERVER_EMQX_DOCKER_IMAGE_TAG=5.8.8
89# HTTP port for the EMQX service
90ES_CENTER_SERVER_EMQX_HTTP_PORT=18083
91# SSL port for the EMQX service
92ES_CENTER_SERVER_EMQX_SSL_PORT=8883
93# TCP port for the EMQX service
94ES_CENTER_SERVER_EMQX_TCP_PORT=1883
95# WebSocket port for the EMQX service
96ES_CENTER_SERVER_EMQX_WS_PORT=8083
97# Secure WebSocket port for the EMQX service
98ES_CENTER_SERVER_EMQX_WSS_PORT=8084
99# IP address of the EMQX service
100ES_CENTER_SERVER_EMQX_IP=192.168.0.1
101# API username for the EMQX service
102ES_CENTER_SERVER_EMQX_API_KEY=api-key
103# API credential for the EMQX service
104ES_CENTER_SERVER_EMQX_API_SECRET=xxx
105
106# ####################################
107# ### es-center-server-nginx Reverse Proxy Configuration
108# ####################################
109# Docker image tag for the Nginx service
110ES_CENTER_SERVER_NGINX_DOCKER_IMAGE_TAG=1.29.4-alpine
111# HTTP port for the Nginx service
112ES_CENTER_SERVER_NGINX_HTTP_PORT=80
113# HTTPS port for the Nginx service
114ES_CENTER_SERVER_NGINX_HTTPS_PORT=443
115
116# ####################################
117# ### es-center-server-pg Database Cluster Configuration
118# ####################################
119# Docker image tag for PostgreSQL instance 0
120ES_CENTER_SERVER_PG_0_DOCKER_IMAGE_TAG=16.3.0
121# Docker image tag for PostgreSQL instance 1
122ES_CENTER_SERVER_PG_1_DOCKER_IMAGE_TAG=16.3.0
123# Docker image tag for Pgpool service
124ES_CENTER_SERVER_PG_PGPOOL_DOCKER_IMAGE_TAG=4.6.3
125# Username for Repmgr in PostgreSQL
126ES_CENTER_SERVER_PG_REPMGR_USERNAME=repmgr
127# Password for Repmgr in PostgreSQL
128ES_CENTER_SERVER_PG_REPMGR_PASSWORD=xxx
129# Extra flags for PostgreSQL
130ES_CENTER_SERVER_PG_POSTGRESQL_EXTRA_FLAGS=-c wal_level=logical -c max_wal_senders=10 -c max_replication_slots=10 -c max_slot_wal_keep_size=10GB -c wal_keep_size=4GB
131# Password for the 'postgres' user in PostgreSQL
132ES_CENTER_SERVER_PG_POSTGRESQL_POSTGRES_PASSWORD=xxx
133# Username for the application in PostgreSQL
134ES_CENTER_SERVER_PG_POSTGRESQL_USERNAME=es
135# Password for the application in PostgreSQL
136ES_CENTER_SERVER_PG_POSTGRESQL_PASSWORD=xxx
137# Username for SR check in Pgpool
138ES_CENTER_SERVER_PG_PGPOOL_SR_CHECK_USER=repmgr
139# Password for SR check in Pgpool
140ES_CENTER_SERVER_PG_PGPOOL_SR_CHECK_PASSWORD=xxx
141# Username for the 'postgres' user in Pgpool
142ES_CENTER_SERVER_PG_PGPOOL_POSTGRES_USERNAME=postgres
143# Password for the 'postgres' user in Pgpool
144ES_CENTER_SERVER_PG_PGPOOL_POSTGRES_PASSWORD=xxx
145# Admin username for Pgpool
146ES_CENTER_SERVER_PG_PGPOOL_ADMIN_USERNAME=admin
147# Admin password for Pgpool
148ES_CENTER_SERVER_PG_PGPOOL_ADMIN_PASSWORD=xxx
149# Custom usernames for PostgreSQL in Pgpool
150ES_CENTER_SERVER_PG_PGPOOL_POSTGRES_CUSTOM_USERS=es
151# Custom passwords for PostgreSQL in Pgpool
152ES_CENTER_SERVER_PG_PGPOOL_POSTGRES_CUSTOM_PASSWORDS=xxx
153# Port for the PostgreSQL service
154ES_CENTER_SERVER_PG_PORT=5543
155
156# ####################################
157# ### es-center-server-redis Cache Service Configuration
158# ####################################
159# Docker image tag for the Redis service
160ES_CENTER_SERVER_REDIS_DOCKER_IMAGE_TAG=7.4.3
161# Port for the Redis service
162ES_CENTER_SERVER_REDIS_PORT=6379
163# Password for the Redis service
164ES_CENTER_SERVER_REDIS_PASSWORD=xxx
165# Maximum memory limit for the Redis service
166ES_CENTER_SERVER_REDIS_MAXMEMORY=200mb
167# Memory eviction policy for the Redis service, using LRU
168ES_CENTER_SERVER_REDIS_MAXMEMORY_POLICY=allkeys-lru 
169
170# ####################################
171# ### es-center-server-main-service Main Service Configuration
172# ####################################
173# Docker image tag for the main service
174ES_CENTER_SERVER_MAIN_SERVICE_DOCKER_IMAGE_TAG=2.0.1-cn-1-20260812
175# Java options for the main service, setting memory limits
176ES_CENTER_SERVER_MAIN_SERVICE_JAVA_OPTS=-XX:InitialRAMPercentage=20 -XX:MaxRAMPercentage=45 -XX:MaxDirectMemorySize=64m -XX:ActiveProcessorCount=2 -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError
177# Commented-out alternative Java options for the main service with different memory limits
178# ES_CENTER_SERVER_MAIN_SERVICE_JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=64m -XX:+UseSerialGC -XX:CICompilerCount=2 -XX:+TieredCompilation -XX:TieredStopAtLevel=1
179# HTTP port for the main service
180ES_CENTER_SERVER_MAIN_SERVICE_HTTP_PORT=84
181
182# ####################################
183# ### es-center-server-device-service Device Service Configuration
184# ####################################
185# Docker image tag for the device service
186ES_CENTER_SERVER_DEVICE_SERVICE_DOCKER_IMAGE_TAG=2.0.1-cn-1-20260812
187# Java options for the device service, setting memory limits
188ES_CENTER_SERVER_DEVICE_SERVICE_JAVA_OPTS=-XX:InitialRAMPercentage=20 -XX:MaxRAMPercentage=45 -XX:MaxDirectMemorySize=64m -XX:ActiveProcessorCount=2 -XX:+UseStringDeduplication -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError
189# Commented-out alternative Java options for the device service with different memory limits
190# ES_CENTER_SERVER_DEVICE_SERVICE_JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=64m -XX:+UseSerialGC -XX:CICompilerCount=2 -XX:+TieredCompilation -XX:TieredStopAtLevel=1
191# HTTP port for the device service
192ES_CENTER_SERVER_DEVICE_SERVICE_HTTP_PORT=86
193
194# ####################################
195# ### es-center-server-web-app Configuration
196# ####################################
197# Docker image tag for the web application
198ES_CENTER_SERVER_WEB_APP_DOCKER_IMAGE_TAG=2.0.1-cn-1-20260812
199# HTTP port for the web application
200ES_CENTER_SERVER_WEB_APP_HTTP_PORT=89
201
202# ####################################
203# ### es-center-server-meilisearch Configuration
204# ####################################
205# Docker image tag for the meilisearch
206ES_CENTER_SERVER_MEILISEARCH_DOCKER_IMAGE_TAG=v1.28.1
207# HTTP port for the meilisearch
208ES_CENTER_SERVER_MEILISEARCH_HTTP_PORT=7700
209# master key for the meilisearch 
210ES_CENTER_SERVER_MEILISEARCH_API_KEY=xxx
211
212# ####################################
213# ### es-center-server-agent Configuration
214# ####################################
215# Port for the agent service
216ES_CENTER_SERVER_AGENT_PORT=8066
217
218# ####################################
219# ### es-center-server-nacos Service Discovery & Configuration Center Configuration
220# ####################################
221# Docker image tag for the Nacos service
222ES_CENTER_SERVER_NACOS_DOCKER_IMAGE_TAG=v0.8.3-alpine
223# HTTP port for the Nacos service console and RESTful API access
224ES_CENTER_SERVER_NACOS_HTTP_PORT=8959
225# gRPC communication port for Nacos cluster internal node interaction and client connection
226ES_CENTER_SERVER_NACOS_GRPC_PORT=9959
227# Http console port for Nacos cluster leader election and data consistency synchronization
228ES_CENTER_SERVER_NACOS_HTTP_CONSOLE_PORT=10959
229# Administrator username for the Nacos service management console
230ES_CENTER_SERVER_NACOS_ADMIN_USERNAME=admin
231# Administrator password for the Nacos service management console
232ES_CENTER_SERVER_NACOS_ADMIN_PASSWORD=xxx
233# Complete connection address (IP:Port) for the Nacos service, used for all microservice clients to access the Nacos server
234ES_CENTER_SERVER_NACOS_ADDR=es-center-server-nacos:8848
235# Nacos service authentication username for microservice client connection
236ES_CENTER_SERVER_NACOS_USERNAME=admin
237# Nacos service authentication password for microservice client connection
238ES_CENTER_SERVER_NACOS_PASSWORD=xxx