System Configuration Documentation

Introduction

Purpose

CitrineOS uses a configuration object, defined in the code as SystemConfig, to define its behavior. This document describes the structure of this object, how to access and modify it, and the meaning of each key-value pair.

Scope

The configuration object controls the host and port of all servers in the application as well as optional OCPP features and certain values which can be different from network to network (heartbeat interval, message timeout, etc). Where specific technologies can fill a role in CitrineOS, such as RabbitMQ for the message broker, the configuration object contains the information needed for those technologies.

Audience

This is a low-level document for engineers interested in learning more about how to use CitrineOS.

Configuration Overview

Configuration Management

By default, CitrineOS uses a typescript file to store system configuration, such as the files in Server/src/config.

Environment variables can also be used. They will override the fields in the typescript file when the application starts up. Prefix the variables with ‘CITRINEOS’, then separate each component of the path to the variable in camel case. Example: CITRINEOS_UTIL_DIRECTUS_HOST will override systemConfig.util.directus.host with its value.

Each module also supports GET and PUT for systemConfig in order to change it while CitrineOS is running. Not all values currently support being changed after application start-up. For example, adding a websocket server to the list after start-up does not currently create a new websocket server.


System Configuration

Central System

Modules

Certificates

Configuration

EVDriver

Monitoring

Reporting

SmartCharging

Transactions

Data

Sequelize

Util

Cache

Message Broker

Pubsub

Kafka

AMQP

Swagger

Directus

Network Connection

Websocket Servers

Certificate Authority

V2G CA

Charging Station CA