ENVIRONMENT VARIABLES
PLAN-R is configured through environment variables. This section describes the settings controlled by each variable.
Connecting to a Database
DB_URL — A URI connection string for the PostgreSQL database.
# Database connection
DB_URL=postgresql://planr:planr@postgres/planr
Connecting to a Message Broker
RABBIT_URL — A URI connection string for the RabbitMQ message broker.
# Message broker connection
RABBIT_URL=amqp://planr:planr@rabbitmq/planr
Connecting to the Redis Cache
REDIS_PASSWORD — The password for Redis authentication.
## Redis connection password
REDIS_PASSWORD=redis_password
REDIS_URL — A URI connection string for the Redis data cache.
# Redis cache connection
REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
Configuring the FACT-R Service
FACTR_ENABLED — A Boolean variable that enables or disables the FACT-R service.
Allowed values:
- true — enables the service.
- false — disables the service (default).
# Enable the **FACT-R** service.
FACTR_ENABLED=true
FACTR_SYSTEM_SITE — A string specifying the FQDN at which the FACT-R service is available.
# **FACT-R** service address.
FACTR_SYSTEM_SITE=factr.my-domain
PLANR_URL — A string specifying the address or FQDN of the server hosting the PLAN-R service to connect to.
# Address or FQDN of the PLAN-R server to connect to (default: https://plan-r.ru).
PLANR_URL=https://plan-r.ru
FACTR_CERT_PATH — A string specifying the path to a .pem file containing the certificate and private key. Required when SSL/TLS is enabled (PROXY_SSL_ENABLED=true).
# Path to the **FACT-R** certificate.
FACTR_CERT_PATH=/etc/ssl/certs/factr.pem
FACTR_AUTH — A string specifying the authentication methods available in the FACT-R application.
Allowed values:
- local — enables local authentication (default);
- ldap — enables LDAP authentication;
- openid — enables authentication through an OpenID provider.
Attention! Before using authentication for PLAN-R, make sure the corresponding authentication methods are enabled and configured. See Authentication Methods.
# Authentication methods available in the FACT-R application.
# Enable LDAP and OpenID authentication.
FACTR_AUTH=ldap,openid
Authentication Methods
LOCAL_AUTH_ENABLED — A Boolean variable that enables or disables local user authentication.
Allowed values:
- true — local authentication is enabled (default);
- false — local authentication is disabled.
# Enable local user authentication.
LOCAL_AUTH_ENABLED=true
LDAP_AUTH_ENABLED — A Boolean variable that enables or disables user authentication through LDAP (Active Directory).
Allowed values:
- true — authentication is enabled.
- false — authentication is disabled (default).
# Enable user authentication through LDAP (Active Directory).
LDAP_AUTH_ENABLED=true
KERBEROS_ENABLED — A Boolean variable that enables or disables user authentication through Kerberos.
Allowed values:
- true — authentication is enabled;
- false — authentication is disabled (default).
# Enable user authentication through Kerberos.
KERBEROS_ENABLED=true
KERBEROS_CONF_PATH — The path to the kr5.conf configuration file on the server.
## Path to the Kerberos configuration file.
KERBEROS_CONF_PATH=./krb5.conf
KERBEROS_KEYTAB_PATH — The path to the generated keytab file on the server.
## Path to the generated keytab file.
KERBEROS_KEYTAB_PATH=./planr.keytab
KERBEROS_LOG_LEVEL — Enables Kerberos logging.
# Enable Kerberos logging.
# KERBEROS_LOG_LEVEL=debug
SYSTEM_SITE — A string containing the address or FQDN of the host running the PLAN-R services.
## FQDN of the host running PLAN-R services.
SYSTEM_SITE=localhost
API_KEY_AUTH_ENABLED — A Boolean variable that enables or disables token-based authentication for access by third-party applications.
Allowed values:
- true — authentication is enabled.
- false — authentication is disabled (default).
# Enable token-based authentication.
API_KEY_AUTH_ENABLED=true
OpenID
To enable OpenID authentication, set the environment variables that control its authentication settings.
There are two sets of OpenID authentication variables: general variables configure the web client, while variables with the ADMIN prefix configure the web administration console. Variables with the ADMIN prefix override the general values.
The example values below use Keycloak SSO.
# Client authentication realm.
OPENID_ISSUER=https://OIDC.DOMAIN.COM/realms/REALMNAME
# Authentication endpoint.
OPENID_AUTHORIZATIONURL=https://OIDC.DOMAIN.COM/realms/REALMNAME/protocol/openid-connect/auth
# Endpoint for obtaining a user token.
OPENID_TOKENURL=https://OIDC.DOMAIN.COM/realms/REALMNAME/protocol/openid-connect/token
# Endpoint for obtaining user information.
OPENID_USERINFOURL=https://OIDC.DOMAIN.COM/realms/REALMNAME/protocol/openid-connect/userinfo
# JWT claim used to obtain the user login.
OPENID_USERNAMEFIELD=email
# Additional scopes for requesting user information.
OPENID_SCOPES=phone,email
# Client identifier.
OPENID_CLIENTID=planrclient
# Client secret.
OPENID_CLIENTSECRET=lzkfjhFGwo3587hna3fh
# Callback URL invoked after authentication is complete.
OPENID_CALLBACKURL=http://localhost:41000/api/v1/auth/openid
# URL to redirect to after the user signs out.
# {id_token_hint} is replaced with the user's ID token.
# {post_logout_redirect_uri} is replaced with the URL to open after the user signs out.
# These parameters are optional.
OPENID_END_SESSION_URL=http://OIDC.DOMAIN.COM/realms/REALMNAME/protocol/openid-connect/logout?id_token_hint={id_token_hint}&post_logout_redirect_uri={post_logout_redirect_uri}
# Client authentication realm.
ADMIN_OPENID_ISSUER=https://OIDC.DOMAIN.COM/realms/ADMINREALMNAME
# Authentication endpoint.
ADMIN_OPENID_AUTHORIZATIONURL=https://OIDC.DOMAIN.COM/realms/ADMINREALMNAME/protocol/openid-connect/auth
# Endpoint for obtaining a user token.
ADMIN_OPENID_TOKENURL=https://OIDC.DOMAIN.COM/realms/ADMINREALMNAME/protocol/openid-connect/token
# Endpoint for obtaining user information.
ADMIN_OPENID_USERINFOURL=https://OIDC.DOMAIN.COM/realms/ADMINREALMNAME/protocol/openid-connect/userinfo
# JWT claim used to obtain the user login.
ADMIN_OPENID_USERNAMEFIELD=email
# Additional scopes for requesting user information.
ADMIN_OPENID_SCOPES=phone,email
# Client identifier.
ADMIN_OPENID_CLIENTID=planradmin
# Client secret.
ADMIN_OPENID_CLIENTSECRET=lzkfjhFGwo3587hju3fh
# Callback URL invoked after authentication is complete.
ADMIN_OPENID_CALLBACKURL=http://localhost:41000/admin/api/v1/auth/openid
# URL to redirect to after the administrator signs out.
# {id_token_hint} is replaced with the administrator's ID token.
# {post_logout_redirect_uri} is replaced with the URL to open after the administrator signs out.
# These parameters are optional.
ADMIN_OPENID_END_SESSION_URL=http://OIDC.DOMAIN.COM/realms/ADMINREALMNAME/protocol/openid-connect/logout?id_token_hint={id_token_hint}&post_logout_redirect_uri={post_logout_redirect_uri}
Configuring the Proxy
# External server port for accessing the main PLAN-R application.
PROXY_PORT=80
# External server port for accessing the administration console.
PROXY_ADMIN_PORT=81
# External server port for accessing PLAN-R over HTTPS.
PROXY_SSL_PORT=443
# Enable or disable HTTPS access. PROXY_CERT_PATH must point to a file containing the certificate
# and private key. Disabling this setting is recommended when using an external proxy server.
PROXY_SSL_ENABLED=false
# Certificate path (if PROXY_SSL_ENABLED=true).
PROXY_CERT_PATH=/ssl/cert.pem
# Enable or disable API access at FQDN/public-api.
PROXY_API_ENABLED=true
# Enable or disable Swagger access at FQDN/swagger.
PROXY_SWAGGER_ENABLED=true
# Maximum time to wait for client activity.
PROXY_TIMEOUT_CLIENT=60
# Maximum time to establish a connection to the backend server.
PROXY_TIMEOUT_CONNECT=120
# Maximum time to wait for backend server activity.
PROXY_TIMEOUT_SERVER=120
# Maximum time to wait for data in tunneled connections, such as TCP tunnels
# (for example, when using HTTPS or WebSocket).
PROXY_TIMEOUT_TUNNEL=3600
# Maximum time the server can keep a connection open
# with the client in HTTP Keep-Alive mode.
PROXY_TIMEOUT_HTTP_KEEP_ALIVE=1
# Maximum time to receive a complete HTTP request from the client.
PROXY_TIMEOUT_HTTP_REQUEST=120
# Maximum time a request can remain queued for processing.
PROXY_TIMEOUT_QUEUE=30
# Time HAProxy delays connections from clients
# that behave incorrectly or suspiciously, for example during attempted DoS attacks.
PROXY_TIMEOUT_TARPIT=60
Trusted Service Certificates
NODE_EXTRA_CA_CERTS — A string used to add trusted CA certificates for services. Specifies the path to a root certificate file on the host in .pem format.
## Path to the root certificate on the host.
NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca.pem
For details on adding trusted root certificates for services, see Adding a Root Certificate to PLAN-R.
NODE_TLS_REJECT_UNAUTHORIZED — An environment variable that disables certificate verification between services.
## Disable certificate verification between services.
NODE_TLS_REJECT_UNAUTHORIZED=0
Data Encryption and Signing
Sensitive data stored by the system in the database or data cache is encrypted using AES-512. The following data is encrypted:
- User passwords;
- Mail server connection settings;
- File storage connection settings;
- Active Directory connection settings.
SECRET_SALT — An initialization vector passed to the encryption algorithm as a string.
SECRET_SALT=VS29L0duMK0DTf6wrqfOvg2h0nHOsjBWJdumehfI
SECRET_KEY — A key passed to the encryption algorithm as a string.
SECRET_KEY=0nveAxy5GiIiFFDPstfe7jFlCnb0DL6zJoAJCTy9
Attention! SECRET_SALT and SECRET_KEY must be changed before the system is started for the first time and must not be changed while the system is in use.
JWT_SECRET — A string used to sign JWT authentication tokens.
JWT_SECRET=0ehUQ3RXFiq19827BywlAt8ZifiVE1Dr
Attention! JWT_SECRET must be changed before the system is started for the first time.
JWT_EXPIRESIN — The lifetime of a JWT authentication token. The default is 7 days.
JWT_EXPIRESIN=7d
FILE_TOKEN_SECRET — A string used to sign JWT tokens for downloading files from the system. For security, users receive a download token so they can download only files requested as part of an operation, such as exporting a schedule. The token allows the user to download the generated file within the lifetime specified by FILE_TOKEN_EXPIRESIN.
FILE_TOKEN_SECRET=qxowf545VL7hivuDL2XF5TdQz8pAp95o
Attention! FILE_TOKEN_SECRET must be changed before the system is started for the first time.
FILE_TOKEN_EXPIRESIN — The lifetime of a JWT file download token. The default is 1 day.
FILE_TOKEN_EXPIRESIN=1d
User Inactivity Timeout
USER_AFK_TIME — Configures automatic sign-out from the web client and web administration console when a user is inactive. The inactivity period is specified in minutes. If the value is omitted or set to 0, user inactivity is not tracked. The default is 0.
# User inactivity timeout.
USER_AFK_TIME=15
Logging
LOGS_EXTEND — A Boolean variable that adds fields used internally by commands to system event logs. The default is false.
Attention! Enabling this feature significantly increases log volume. Enable it only for system debugging.
# Include additional information in event logs.
LOGS_EXTEND=true
LOGS_DEVICE_VENDOR — A string specifying the application vendor. Used to include vendor information in logs.
# Include vendor information in event logs.
LOGS_DEVICE_VENDOR=dppm
LOGS_DEVICE_PRODUCT — A string specifying the application name. Used to include product information in logs.
# Include the application name in event logs.
LOGS_DEVICE_PRODUCT=planr
LOGS_DEVICE_VERSION — A string specifying the application version. Defaults to the application build version. Used to include application version information in logs.
# Include the application version in event logs.
LOGS_DEVICE_VERSION=602.0
LOGS_SECURITY_SPLIT — A Boolean variable that sends information security logs to a separate stream. These logs cover commands for managing users, user roles, system access, and Active Directory integration. Logs are forwarded to a remote server over UDP or TCP. The default is false.
# Send security logs to a separate stream.
LOGS_SECURITY_SPLIT=true
LOGS_SECURITY_SERVER_ADDRESS — A string specifying the IP address or FQDN of the security log collection server.
# Set the log collection server address.
LOGS_SECURITY_SERVER_ADDRESS=127.0.0.1
LOGS_SECURITY_SERVER_PORT — A numeric variable specifying the security log collection server port. The default is 514.
# Set the log collection server port.
LOGS_SECURITY_SERVER_PORT=514
LOGS_SECURITY_SERVER_PROTOCOL — A string specifying the network protocol for sending security logs. UDP or TCP can be used. The default is udp.
# Set the log transport protocol.
LOGS_SECURITY_SERVER_PROTOCOL=udp
LOGS_SECURITY_SERVER_TCP_RECONNECT — A Boolean variable that enables automatic reconnection to the log server when using TCP. The default is false.
# Enable automatic reconnection to the log server over TCP.
LOGS_SECURITY_SERVER_TCP_RECONNECT=true
LOGS_SECURITY_ADD_DEVICE_INFO — A Boolean variable that adds vendor information specified by the LOGS_DEVICE_* environment variables to security logs. The default is false.
# Include vendor information in security logs.
LOGS_SECURITY_ADD_DEVICE_INFO=true
LOGS_SECURITY_CEF_ENABLED — A Boolean variable that enables security log output in CEF format as defined in Implementing ArcSight Common Event Format (CEF) - Version 26. The default is false.
# Enable security log output in CEF format.
LOGS_SECURITY_CEF_ENABLED=true
LOGS_SECURITY_CEF_DATE_FORMAT — A string specifying the date format for CEF output. The default is MMM DD YYYY HH:mm:ss.SSS zzz.
Date formats recommended in the CEF developer documentation:
- MMM dd HH:mm:ss.SSS zzz
- MMM dd HH:mm:sss.SSS
- MMM dd HH:mm:ss zzz
- MMM dd HH:mm:ss
- MMM dd yyyy HH:mm:ss.SSS zzz
- MMM dd yyyy HH:mm:ss.SSS
- MMM dd yyyy HH:mm:ss zzz
- MMM dd yyyy HH:mm:ss
# Set the date format for CEF security logs.
LOGS_SECURITY_CEF_DATE_FORMAT=MMM DD YYYY HH:mm:ss.SSS z
Available Profiles
COMPOSE_PROFILES — Controls which services are started.
## Enabled profile.
COMPOSE_PROFILES=all
For example, when using an external PostgreSQL database, exclude its profile by setting the variable as follows:
## Enabled profile.
COMPOSE_PROFILES=main,redis,rabbitmq,logging
Allowed values:
- all — Starts the application with all services included in the distribution, using the full configuration.
- main — Starts only the main PLAN-R application, without external services. You must provide connections to the required PostgreSQL, Redis, RabbitMQ, and/or logging services.
- postgres — Starts the PostgreSQL database included in the distribution.
- rabbitmq — Starts the RabbitMQ message broker included in the distribution.
- redis — Starts the Redis data cache included in the distribution.
- logging — Starts the logging system (Fluent Bit -> Loki -> Grafana).
Scaling the Application
You can increase the number of container replicas to improve system performance and responsiveness.
# Configure the number of container replicas.
MAIN_REPLICA=1
ADMIN_REPLICA=1
DOCS_REPLICA=1
API_REPLICA=1
KERBEROS_REPLICA=1
PLANR_WORKER_REPLICA=8
IMPEX_WORKER_REPLICA=8
SCHEDULE_WORKER_REPLICA=1
NOTICE_WORKER_REPLICA=1
STORAGE_WORKER_REPLICA=1
COSTR_WORKER_REPLICA=2
CSHARP_WORKER_REPLICA=1
Application Version
TAG — Specifies the version of the PLAN-R application to use.
TAG=602.5