Skip to content

Appendix 2. Settings of «.env» file#

Parameter Description Values Default values ER
General settings
STREAM_HOSTNAME Address of the server with CARS Stream installed - stream1 – if CARS Stream is installed locally; stream1
- – address of the server with CARS Stream installed
API_HOSTNAME Address of the server with CARS API installed - api-nginx – if CARS API is installed locally api-nginx
- – address of the server with CARS API installed
ANALYTICS_HOSTNAME Address of the server with CARS Analytics frontend installed - front – if CARS Analytics is installed locally; front
- – address of the server with CARS Analytics installed (frontend)
ANALYTICS_BACKEND_HOSTNAME Address of the server with CARS Analytics backend installed - back – if CARS Analytics is installed locally; back
- – address of the server with CARS Analytics installed (backend)
HASP license settings
HASP_LICENCE_SERVER Specifies the path to the server with available network product license. It is set locally without a network license IP address of the server with HASP installed localhost
HASP_WAIT_TIME Sets the time to wait for a response from the HASP licensing server (sec) 10...100 30
HASP_LICENSE_FILE Specifies the path to the license file that the installer accesses Path to the license file ./empty
STREAM_LICENSE_FILE Directory for hosting the license file for human and animal detectors Path to the license file ./extras/ license_files/ license_example.conf
Account settings for distribution download
DOCKER_REGISTRY The address of the VisionLabs server from which docker images will be downloaded. The address is requested from the VisionLabs manager IP-адрес registry dockerhub. visionlabs.ru /cars
DOWNLOAD_USER This variable specifies the username for downloading distributions. To get a login, contact the VisionLabs manager. If the distribution kits are supposed to be downloaded within the VisionLabs network, leave this value blank Users login -
DOWNLOAD_PASSWORD This variable specifies the user's password for downloading distributions. To get a login, contact the VisionLabs manager. If the distribution kits are supposed to be downloaded within the VisionLabs network, leave this value blank Users password -
LUNA CARS components versions settings
API_PLATFORM Selecting CARS API operating mode - gpu – work on the GPU architecture; cpu
- cpu – work on the architecture of the central processor without support for AVX2 instructions
API_VERSION This variable is automatically set to the version of the CARS API distributio Available CARS API versions. v.2.0.4
STREAM_VERSION This variable is automatically set to the version of CARS Stream distribution Available versions of CARS Stream v.2.0.54
ANALYTICS_BACKEND_VERSION This variable is automatically set to the version of the CARS Analytics backend component distribution Available versions of CARS Analytics backend v.3.1.21-v1.0.27
ANALYTICS_BACKEND_VEHICLE_PLUGIN_VERSION Specifies the distribution version of the CARS Analytics script plugin. By default, the current version is set. Available versions of the CARS Analytics plugin v1.0.27
ANALYTICS_FRONTEND_VERSION This variable automatically specifies the version of the CARS Analytics frontend distribution kit Available versions of frontend CARS Analytics v2.0.39
CORS_SITE Determines whether a part of the LUNA CARS web interface can be used inside another site. To provide this feature, you must specify the hostname of the site where the web interface will be used Site hostname “ “
DEBUG_STREAM CARS Stream debug mode - True – on; False
- False – off
DEBUG_ANALYTICS CARS Analytics debug mode - True – on; False
- False – off
CARS Stream settings
STREAM_PLATFORM1 Selecting CARS Stream first instance operating mode - gpu – work on the GPU architecture; cpu
- cpu – work on the architecture of the central processor without support for AVX2 instructions
STREAM_PLATFORM2 Selecting CARS Stream additional instance operating mode - gpu – work on the GPU architecture; cpu
- cpu – work on the architecture of the central processor without support for AVX2 instructions
STREAM_PLATFORM3 Selecting CARS Stream additional instance operating mode - gpu – work on the GPU architecture; cpu
- cpu – work on the architecture of the central processor without support for AVX2 instructions
STREAM_PLATFORM4 Selecting CARS Stream additional instance operating mode - gpu – work on the GPU architecture; cpu
- cpu – work on the architecture of the central processor without support for AVX2 instructions
STREAM_PORT1 Port of the first instance of CARS Stream Available ports 34569
STREAM_PORT2 Port of the additional instance of CARS Stream Available ports 34570
STREAM_PORT3 Port of the additional instance of CARS Stream Available ports 34571
STREAM_PORT4 Port of the additional instance of CARS Stream Available ports 34572
STREAM_GPU1 The number of the GPU for processing requests of the first instance of CARS Stream. The countdown starts from 0 0…Number of GPU 0
STREAM_GPU2 The number of the GPU for processing requests of the additional instance of CARS Stream. The countdown starts from 0 0…Number of GPU 1
STREAM_GPU3 The number of the GPU for processing requests of the additional instance of CARS Stream. The countdown starts from 0 0…Number of GPU 2
STREAM_GPU4 The number of the GPU for processing requests of the additional instance of CARS Stream. The countdown starts from 0 0…Number of GPU 3
STREAM_HASP_PORT1 Port of the license utility of the first instance of CARS Stream Available ports 1948
STREAM_HASP_PORT2 Port of the license utility of additional instance of CARS Stream Available ports 1949
STREAM_HASP_PORT3 Port of the license utility of additional instance of CARS Stream Available ports 1950
STREAM_HASP_PORT4 Port of the license utility of additional instance of CARS Stream Available ports 1951
HEALTH_CHECK_MAX_ERROR_COUNT Limit of errors when reading the frame source for a specified period. If the limit is exceeded, CarsStream closes the source and stops receiving frames from it 1...1000 200
STREAM_VIDEO_DIR Directory for placing video files for further processing. /tmp/stream/video/ /tmp/stream/ video/
ENABLE_BODY_DETECTOR Flag for activating the human detector - 0 – on
- 1 – off 1
ENABLE_ANIMAL_DETECTOR Flag for activating the animal detector - 0 – on
- 1 – off 1
CARS API settings
API_PORT Range port for connecting to multiple CARS API instances Available ports 8100
API_CPU_NT The number of CPU threads on which the CARS API will run. The countdown starts from 1 1…Number of CPU threads 6
API_CPU_COUNT The number of the СPU stream on which the CARS API will be launched. The countdown starts from 0 1…Number of CPU threads 8
API_GPU_NUMBER The number of the GPU stream on which the CARS API will be launched. The countdown starts from 0 0…Number of GPU 0
API_COUNT Initial CARS API port range 1…Number of CARS API copies in use 2
API_HASP_PORT_START Initial HASP Port Range Available ports 1952
API_HASP_PORT_END Last HASP port. Depends on the number of copies of the CARS API in use Available ports 1953
API_WITH_SLR Using a python module to check if a vehicle crosses a solid line - True – use; False
- False – do not use
API_PLATE_ESTIMATOR_TYPE Version of the algorithm for evaluating the accuracy of the LP recognition. The difference between the versions is to improve the quality of work and expand the list of recognized countries in the updated version 2 - V1; V2
- V2
API_SYMBOL_THRESHOLD The threshold for the accuracy of character recognition. Characters whose recognition accuracy is determined below the set threshold are not displayed in the UI 0…1 0.8
API_USE_LATIN_CHARACTERS Using Latin characters when displaying LP symbols ГРЗ - True – use latin; False
- False – use cyrillic
API_LOG_LEVEL Selecting the CARS API logging level - 0 – INFO (logging of information messages); 2
- 1 – WARNING (logging of warning messages);
- 2 – ERROR (error logging);
- 3 – FATAL (logging critical errors)
Stream ANPR settings
STREAM_ANPR_PORT Port ANPR Stream Available ports 34568
CARS Analytics settings
ANALYTICS_FRONTEND_PORT Port for connecting to the CARS Analytics frontend component with HTTP Available ports 8080
ANALYTICS_FRONTEND_SSL_PORT Port for connecting to the CARS Analytics frontend component with HTTPS Available ports 443
ANALYTICS_BACKEND_PORT Port for connecting to the CARS Analytics backend component Available ports 8000
ANALYTICS_BACKEND_CONCURRENCY Distribution of workload of CARS Analytics on several threads. Depends on the number of CPU cores 1…8 1
ANALYTICS_BACKEND_HANDLER_CONCURRENCY Distribution of workload of CARS Analytics handlers on several threads. Depends on the number of CPU cores 1…8 8
ANALYTICS_MEDIA_ROOT_FOLDER The folder where all images will be saved. The images are sorted in folders by the date the event was received. The path must be the same for all running copies /var/lib/luna/cars/ docker/volumes/media/ /var/lib/luna/ cars/docker/ volumes/media/
ANALYTICS_PSQL_FOLDER The folder in which information from the database will be stored. The path must be the same for all running copies /var/lib/luna/cars/ docker/volumes/ psql2-data/ /var/lib/luna/ cars/docker/ volumes/psql2-data/
ENABLED_UNICODE_INPUT Using Unicode characters when searching for LP by characters in CARS Analytics - True – use; False
- False – do not use
AGGREGATE_WITH_WORKERS Use of additional resources (workers) for aggregation of detection and recognition results. When this option is enabled, workers are used to aggregate results, not an aggregator in the CARS Analytics BACKEND. The number of created workers is unlimited, the load is evenly distributed between them and events are processed in parallel. This parameter improves the performance of the system, in particular when connecting multiple cameras. When the parameter is disabled, the aggregation of results occurs only through the aggregator and takes longer - True – use; True
- False – do not use
AGGREGATOR_COUNT The number of instances of the aggregator service. The service is used to aggregate detection and recognition results. The use of multiple instances is necessary for the uniform distribution of multiple events. The number of instances used should not exceed the number of cameras used in the system 1…n 1
SEND_UPDATES_TO_WEB_SOCKET Determines whether to send an update after receiving the end of the track to WebSocket - True – send; True
- False – do not send
ANALYTICS_DB_CONN_MAX_AGE Lifetime of connection of CARS Analytics to database 0...3600 60
Localization settings
LANGUAGE_CODE CARS Analytics interface language - en-us – english; ru-ru
- ru-ru – russian
Mail service settings
EMAIL_USE_SSL Secure Sockets Layer (SSL) data protection protocol. The security protocol depends on the selected SMTP server. You must use one of the connection protocols (SSL or TLS) - True – use SSL; False
- False – do not use SSL
EMAIL_USE_TLS Specifies whether to use TLS (transport layer security) connection with the SMTP server. Used for explicit TLS connection - True – use TLS; True
- False – do not use TLS
EMAIL_PORT Specifies the port to use when connecting to the SMTP server The values of connection parameters to the STMP server are taken from open sources 2525
EMAIL_HOST Specifies the name of the SMTP server used to send emails The values of connection parameters to the STMP server are taken from open sources smtp.domain_name.ru
EMAIL_HOST_USER Specifies the username used when connecting to the SMTP server specified in EMAIL_HOST Email address created in the domain of the selected SMTP server test_email@domain_name.ru
SERVER_EMAIL Specifies the email address used as the sender's address Email address created in the domain of the selected SMTP server test_email@domain_name.ru
DEFAULT_FROM_EMAIL Sets the Email address used when sending various automatic mailings Email address created in the domain of the selected SMTP server test_email@domain_name.ru
EMAIL_HOST_PASSWORD Sets the password for connecting to the SMTP server specified in EMAIL_HOST. This setting is used in conjunction with EMAIL_HOST_USER for authorization when connecting to an SMTP server Password created in the domain of the selected SMTP server your_password
Image saving settings
XLSX_SAVE_IMAGES Saving the event image to a .xlsx file when generating reports - True – save; False
- False – do not save
Celery settings
CELERY_LOG_LEVEL Celery logging mode status - ERROR – errors logging; INFO
- INFO – messages logging;
- DEBUG – debug logging
CARS Analytics work settings
GLUE_BY_TRACKEND Glue mode for duplicate events after receiving the trackend, if the LP or the brand and model of the vehicle matched. It is recommended to use it with frequent tracks breaks (e.g., if there is a partial overlap of the detected zone in the frame). Performance may be reduced when used - True – on; False
- False – off
GLUE_TRACKEND_TIMEDELTA Time delta where events are searched for gluing duplicate events (in seconds). It is recommended to use it with frequent tracks breaks (e.g., if there is a partial overlap of the detected zone in the frame). Performance may be reduced when used 1...60 5
SHOW_ALL_FULL_FRAMES Show all full frames in CARS Analytics. If the value is set to False, only the full frames of the start and end of the track and of one bestshot will be displayed. This parameter is supporting for testing and debugging the product and is not used by users when working with the product - True – on; False
- False – off
USE_OLD_AGGREGATION Usage of the old aggregation, i.e., the system for selecting the best values of recognition parameters. In the latest versions of the product, the new aggregation is used by default, this parameter is supporting for testing and debugging the product. Aggregations’ difference is in the algorithms used for selecting parameters - True – use; False
- False – do not use
EVENT_LIFETIME Event lifetime in days. After the set value expires, the event will be automatically deleted. Values 0 - keep always 0…- 0
INCIDENT_LIFETIME Incident lifetime in days. After the set value expires, the incident will be automatically deleted. Values 0 - keep always 0…- 0
FULL_FRAME_LIFETIME Full frame lifetime in hours. After the set value expires, full frame will be automatically deleted. The parameter values are not limited, however, it is not recommended to set high values in order to prevent the server memory from filling up 1…- 24
ENABLED_VEHICLE_CLASSIFIERS Enabled vehicle classifiers See Admin Manual CARS API for classifiers full list "bestshot": ["car_brand_model_v2","vehicle_type","vehicle_emergency_type","vehicle_color","vehicle_descriptor","public_transport_type","special_transport_type","vehicle_axles",],"vehicle_plate":["grz_all_countries",]
SEND_TRACKEND_UPDATE Sending messages by the trackend. Used for event types with a barrier. In cases when messages about trackend are received late (the car remains in the frame, or the track is dropped to another object, etc.), disabling this parameter will help avoid reopening the barrier - True – on; True
- False – off
MAX_SYMBOLS_BELOW_THRESHOLD The maximum number of errors when searching for CARGO (in the number of characters). That is, by how many characters is an acceptable error of the System possible when searching for LP (e.g. when comparing with a list of numbers) 0...10 2
TIME_ZONE Sets the timezone of containers. Adjustment of the time zone is necessary so that all containers work in the same time zone. The LUNA CARS time zone must match the location of the LUNA CARS servers. The value of this parameter can be any of the values available in the timezone database. Information about time zones can be found here Europe/ Moscow
PostgreSQL settings
POSTGRES_DB Database name ‘luna_cars_analytics’ ‘luna_cars_analytics’
POSTGRES_PASSWORD Sets the password for accessing the database ‘password’ ‘password’
POSTGRES_PORT PostgreSQL port Available ports 5432
POSTGRES_HOSTNAME Address of the server with PostgreSQL installed Имя хоста БД psql
POSTGRES_USER Sets the login of the database user ‘postgres’ ‘postgres’
POSTGRES_ROLE LUNA CARS clustering - master – основная БД; none
- slave – DB sub-server;
- none – no clustering
POSTGRES_MASTER_PORT Main PostgreSQL server port Available ports master-port
POSTGRES_MASTER_HOSTNAME Address of the main server with PostgreSQL DB host name master-host
Redis settings
REDIS_HOST Address of the server with PostgreSQL installed IP адрес сервера Redis redis
REDIS_PORT Redis server port Available ports 6379
Nginx settings
UPLOAD_USER User login for the portal http://localhost:8080/nginx-upload. The portal is used for testing purposes, not intended for standard operation User login -
UPLOAD_PASSWORD User password for the portal http://localhost:8080/nginx-upload. The portal is used for testing purposes, not intended for standard operation User password -