Available environment variables
The environment variables have been grouped by bundles and for the Symfony framework itself.
Symfony variables
APP_ENV
Possible values: dev, prod, redis, dev, test
- Example
APP_ENV=dev
But there is 2 more possible values, specific to elasticms:
db: It's equivalent to aprodenvironment, but PHP sessions are persisted in the RDBMS (does not work with SQLite databases).redis: It's equivalent to aprodenvironment, but PHP sessions are saved in a Redis server.store_data: It's equivalent to aprodenvironment, but PHP sessions are saved in Store Data services.
APP_SECRET
A secret seed.
- Example
APP_SECRET=7b19a4a6e37b9303e4f6bca1dc6691ed
HTTP_CLIENT_MAX_CONNECTIONS
Define the max connections to the API client, when using async calls. By default it is set to 4.
LOG_OUTPUT
Default php://stdout for local development you can change to %kernel.logs_dir%/%kernel.environment%.log
Behind a Load Balancer or a Reverse Proxy
TRUSTED_PROXIES=127.0.0.1,127.0.0.2
TRUSTED_HOSTS=localhost,example.com
HTTP_CUSTOM_FORWARDED_PROTO=HTTP_X_COMPANY_FORWARDED_PROTO#Default value HTTP_X_FORWARDED_PROTO
HTTP_CUSTOM_FORWARDED_PORT=HTTP_X_COMPANY_FORWARDED_PORT#Default value HTTP_X_FORWARDED_PORT
HTTP_CUSTOM_FORWARDED_FOR=HTTP_X_COMPANY_FORWARDED_FOR#Default value HTTP_X_FORWARDED_FOR
HTTP_CUSTOM_FORWARDED_HOST=HTTP_X_COMPANY_FORWARDED_HOST#Default value HTTP_X_FORWARDED_HOSTIf the reverse proxy's IP change all the time:
TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
TRUSTED_HOSTS=localhost,example.com
HTTP_CUSTOM_FORWARDED_PROTO=HTTP_X_COMPANY_FORWARDED_PROTO#Default value HTTP_X_FORWARDED_PROTO
HTTP_CUSTOM_FORWARDED_PORT=HTTP_X_COMPANY_FORWARDED_PORT#Default value HTTP_X_FORWARDED_PORT
HTTP_CUSTOM_FORWARDED_FOR=HTTP_X_COMPANY_FORWARDED_FOR#Default value HTTP_CUSTOM_FORWARDED_FOR
HTTP_CUSTOM_FORWARDED_HOST=HTTP_X_COMPANY_FORWARDED_HOST#Default value HTTP_CUSTOM_FORWARDED_HOSTSymfony Messenger
Since version 6.4.0 we use symfony messenger bundle.
MESSENGER_TRANSPORT_DSN
Default redis://localhost:6379/messages.
Symfony Mercure
Since version 6.4.0 we use symfony mercure bundle.
MERCURE_URL
Default http://localhost:3000/.well-known/mercure, private url to mercure hub.
MERCURE_PUBLIC_URL
Default http://localhost:3000/.well-known/mercure, public url to mercure hub.
MERCURE_JWT_KEY
Use by the symfony mercure hub for publishing and subscribing messages. Use the following command for generating a JWT token:
openssl rand -base64 32Swift Mailer
MAILER_URL
Configure Swift Mailer
EMSCH_SEARCH_LIMIT
Specify the maximum number of expected document for template, translation and route content types. Default value 1000
Doctrine variables
Default values (sqlite):
DB_DRIVER='sqlite'
DB_USER='user'
DB_PASSWORD='user'
DB_PORT='1234'
DB_NAME='app.db'DB_HOST
DB's host.
- Default value:
127.0.0.1 - Example:
DB_DRIVER='db-server.tl'
DB_DRIVER
Driver (Type of the DB server). Accepted values are mysql, pgsql and sqlite
- Default value:
mysql - Example:
DB_DRIVER='pgsql'
DB_USER
- Default value
user - Example:
DB_USER='demo'
DB_PASSWORD
- Default value
user - Example:
DB_PASSWORD='password'
DB_PORT
For information the default mysql/mariadb port is 3306 and 5432 for Postgres
- Default value
3306 - Example:
DB_PORT='5432'
DB_NAME
- Default value
elasticms - Example:
DB_NAME='demo'
DB_SCHEMA
This variable is not used by Doctrine but by the dump script with postgres in the docker image of elasticms.
- Default value: not defined
- Example:
DB_SCEMA='schema_demo_adm'
DB_CONNECTION_TIMEOUT
Usefull when connecting to a string of multiple hosts. To reduce timeout when checking a second host if the first host fails. The minimum value is 2 https://pracucci.com/php-pdo-pgsql-connection-timeout.html
- Default value
30 - Example:
DB_CONNECTION_TIMEOUT=30
Redis
Should be defined only if Redis is defined as session manager.
REDIS_HOST=localhost
REDIS_PORT=6379Elasticms Core Bundle variables
EMSCO_TIKA_SERVER
Url of a Tika server (string).
- Default value: empty string
- Example
EMSCO_TIKA_SERVER=http://tika:9998
EMSCO_TIKA_DOWNLOAD_URL
Url or path to an Apache Tika jar file (string).
- Default value: http://apache.belnet.be/tika/tika-app-1.22.jar
- Example
EMSCO_TIKA_DOWNLOAD_URL=http://apache.belnet.be/tika/tika-app-1.22.jar'
Activate document signature
EMSCO_PUBLIC_KEY(mandatory): Path to a public key. The public key file needs to be in OpenSSH's format. It should look something like:ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110EMSCO_PRIVATE_KEY(mandatory): Path to a private key.
EMSCO_INSTANCE_ID
Used to prefix all elasticsearch indexes and aliases managed by the current instance of elasticms.
- Example
EMSCO_INSTANCE_ID=demo_v1_
EMSCO_NAME
HTML used as title in the interface
- Default
<i class="ems-icon-ball"></i> elastic<b>ms</b> - Example
EMSCO_NAME='<i class="ems-icon-ball"></i> My elasticms'
EMSCO_SHORTNAME
HTML used as short title in the interface
- Default
<i class="ems-icon-ball"></i><span class="sr-only">elasticms</span> - Example
EMSCO_SHORTNAME='My-ems'
EMSCO_SINGLE_TYPE_INDEX
If set to true an index will be created for each managed content types. You should avoid turning on this option as it will be deprecated soon.
- Default
false - Example
EMSCO_SINGLE_TYPE_INDEX=false
EMSCO_PAGING_SIZE
Define the number of result per page in the search pages.
- Default
20
EMSCO_THEME_COLOR
The color of the theme.
- Default
blue - Possible values:
blueindigopurplepinkredorangeyellowgreentealcyanwhitegrayblacklightbluenavyfuchsiamaroonlimeolive
EMSCO_DATE_TIME_FORMAT
Format used to display dates in the interface. See PHP datetime format for available options.
- Default
j/m/Y \a\t G:i
EMSCO_DATEPICKER_FORMAT
Format used to display date in date pickers (See Java Simple Date Format.
- Default
dd/mm/yyyy
EMSCO_DATEPICKER_WEEKSTART
First day of the week in date pickers. 0 for Sunday, 1 for Monday, ... and 6 for Saterday.
- Default
1
EMSCO_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED
Highlights some days of the week in date pickers. 0 for Sunday, 1 for Monday, ... and 6 for Saterday.
- Default
[0, 6]
From information for email sent
Default values:
EMSCO_FROM_EMAIL_ADDRESS='elasticms@example.com'
EMSCO_FROM_EMAIL_NAME='elasticms'EMSCO_ALLOW_USER_REGISTRATION
If set to true user can perform a self registration
- Default
false
EMSCO_ASSET_CONFIG
Used to defined multiple asset processor config.
- Default
[]
Example:
EMSCO_ASSET_CONFIG='{"preview":{"_config_type":"image","_width":300,"_height":200,"_resize":"fill","_radius":0,"_radius_geometry":["topleft","bottomright"]}}'EMSCO_PRE_GENERATED_OUUIDS
If set to true new documents will have a OUUID generated before calling post-processors at first document's finalization. If set to false new documents will have a OUUID generated by elasticsearch during first indexation. So OUUIDs are not available for post-processors at first document's finalization.
- Default
false
EMSCO_CIRCLES_OBJECT
Name of the content type used a circle.
- Default empty string (not defined)
- Example
EMSCO_CIRCLES_OBJECT=circle
EMSCO_TRIGGER_JOB_FROM_WEB
If set to false job initiated from the interface are executed on the spot. Use the ems:job:run command to run pending jobs. It's recommended to schedule an ems:job:run command and turn off this option.
- Default value
true - Example
EMSCO_TRIGGER_JOB_FROM_WEB=false
EMSCO_LOG_LEVEL
Define the level of logs that will be saved in the elasticsearch ems_internal_logger_alias daily index. Default value: INFO.
EMSCO_LOG_LEVEL=NOTICEEMSCO_LOG_BY_PASS
Define if the elastica logger must be turned off. Possible values are:
true: the elastica logger is turn offfalse: the elastic logger is active
EMSCO_LOG_BY_PASS=falseEMSCO_DEFAULT_BULK_SIZE
Define the default bulk size for commands such as the ems:environment:rebuild command. Default value: 500.
EMSCO_DEFAULT_BULK_SIZE=500EMSCO_DYNAMIC_MAPPING
Define the default dynamic mapping mode for the elasticsearch managed indexes. Default value: 'false'.
This parameter has been introduced in version 6.0.0. Prior version were then using the elasticsearch default value 'false'.
EMSCO_DYNAMIC_MAPPING='false'Possible values are:
true: New fields are added to the mapping.runtime: New fields are added to the mapping as runtime fields. These fields are not indexed, and are loaded from _source at query time.false: New fields are ignored. These fields will not be indexed or searchable, but will still appear in the _source field of returned hits. These fields will not be added to the mapping, and new fields must be added explicitly.strict: If new fields are detected, an exception is thrown and the document is rejected. New fields must be explicitly added to the mapping.
EMSCO_IMAGE_MAX_SIZE
Define the limit where a resized image, with that max limit, will be generated on the client side in order to limit the memory consumption. The resized image's hash will be available in a _image_resized_hash attribute in the file field array (in case of a file field). In a WYSIWYG field, the master file won't be uploaded, a resized image will be uploaded and directly used as src attribute in the IMG tag.
EMSCO_IMAGE_MAX_SIZE=2048EMSCO_FORGOT_PASSWORD_URL
For replace the value of href of the 'I forgot my password' link. When we don't have a mail server for the password request form, we can replace this link for example with a mailto.
EMSCO_FORGOT_PASSWORD_URL=mailto:project@site.be?subject=Password%20Reset&body=Hello%2C%0A%0AI%20am%20requesting%20to%20reset%20my%20password%20for%20my%20account%20%5BEnter%20Your%20User%20Name%5DEMSCO_URL_USER
Define the public url to the elasticms, default empty. This value is also used for mercure, for creating the topics.
EMS_BACKEND_URL
Define the url use by the user to access elasticms (in order to generate links in emails).
EMS_BACKEND_URL='http://admin.elasticms.local'Elasticms Client Helper Bundle variables
EMSCH_LOCALES
List of available locales supported by the client/channels i.e.: EMSCH_LOCALES=["en","fr","nl"]
EMSCH_INSTANCE_ID
Define the list of project's index prefixes, separated by a | i.e. ='demo_pgsql_v1_', By default it sets to the EMSCO_INSTANCE_ID value.
EMSCH_TRANSLATION_TYPE
Define the translation content type name. Default value label i.e. EMSCH_TRANSLATION_TYPE='label'
EMSCH_ROUTE_TYPE
Define the route content type name. Default value route i.e. EMSCH_ROUTE_TYPE='route'
EMSCH_TEMPLATES
Define the template content type structure. Default value {"template": {"name": "name","code": "body"}} i.e. EMSCH_TEMPLATES='{"template": {"name": "label","code": "body"}}'
EMSCH_ASSET_LOCAL_FOLDER
Specify a local folder (in the public folder) where to locate emsch assets. This is useful in development mode as the zip containing the assets is ignored. Example base template.
<link rel="stylesheet" href="{{ asset('css/app.css', 'emsch') }}">EMSCH_LOCAL_PATH
Overwrite the destination of the local files, by default emsch:local:* commands will search in local/%environment_alias% folder.
Example for locally loading the demo inside local elasticms-admin.
EMSCH_LOCAL_PATH='../demo/skeleton'Elasticms Common Bundle variables
EMS_LOG_LEVEL
Define the log level (integer) where logs will be saved in DB:
- Default value: EMS_LOG_LEVEL='250'
Possible values:
- DEBUG (100): detailed debug information
- INFO (200) : interesting events. Examples: User logs in, SQL logs
- NOTICE (250): normal but significant events
- WARNING (300): exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong
- ERROR (400): runtime errors that do not require immediate action but should typically be logged and monitored
- CRITICAL (500): critical conditions. Example: Application component unavailable, unexpected exception
- ALERT (550): action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger phone call or SMS alerts and wake you up
- EMERGENCY (600): emergency: system is unusable
EMS_ELASTICSEARCH_CONNECTION_POOL
Define the [elasticsearch sniffing strategy](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.17/connection_pool.html:
- Default value: EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SimpleConnectionPool' if the EMS_ELASTICSEARCH_HOSTS contains one and only one host configuration; in order to avoid sniffing requests on a cluster that is more likely behind a reverse proxy. Else it contains EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SniffingConnectionPool'.
- Possible values:
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SimpleConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\SniffingConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\StaticConnectionPool'
- EMS_ELASTICSEARCH_CONNECTION_POOL='Elasticsearch\ConnectionPool\StaticNoPingConnectionPool'
EMS_ELASTICSEARCH_HOSTS
Define the elasticsearch cluster as an array (JSON encoded) of hosts:
- Default value: EMS_ELASTICSEARCH_HOSTS='["http://localhost:9200"]'
If needed, this variable can also contain an elastica servers array:
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"elastic:fewl13@localhost","port":9200,"curl":{"64":false}}]'In this example the cluster contains only one host accessible via HTTPS on the port 9200. But with the CURL option "64": false the client doesn't check the validity of the host certificate
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"elastic:fewl13@localhost","port":9200,"curl":{"10065":"/opt/local/cacert.pem"}}]'Here the client uses the /opt/local/cacert.pem to validate the server certificate.
EMS_ELASTICSEARCH_HOSTS='[{"transport":"Https","host":"localhost","port":9200,"headers":{"Authorization":"Basic ZWxhc3RpYzpmZXdsMTM="},"curl":{"64":false}}]'Another example with an extra HTTP header.
All PHP CURL integer identifier can be found on GitHub. More info on PHP.net.
EMS_STORAGES
Used to define storage services. Elasticms supports multiple types of storage services.
- Default value:
EMS_STORAGES='[{"type":"fs","path":".\/var\/assets"},{"type":"s3","credentials":[],"bucket":""},{"type":"db","activate":false},{"type":"http","base-url":"","auth-key":""},{"type":"sftp","host":"","path":"","username":"","public-key-file":"","private-key-file":""}]' - Example:
EMS_STORAGES='[{"type":"fs","path":"./var/assets"},{"type":"fs","path":"/var/lib/elasticms"}]'
EMS_RUNNERS
Used to define ruuner services. See runners for more details.
- Default value:
EMS_RUNNERS='[]' - Example:
EMS_RUNNERS='[{"type":"openshift","tag":"toto","base-url":"https://api.my-paas.tld:6443/","auth-key":"sha256~my-priVAteAuthorization_kEy","namespace":"my-namesapce","image":"busybox"}]'
EMS_HASH_ALGO
Refers to the PHP hash_algos function. Specify the algorithms to used in order to hash and identify files. It's also used to hash the document indexed in elasticsearch.
- Default value: EMS_HASH_ALGO='sha1'
EMS_BACKEND_API_KEY
Define backend authentication token. The commonBundle coreApi instance becomes authenticated.
EMS_CORE_API_HEADERS
Define extra headers for the API client, helpful for adding cookie header for xdebug.
EMS_CORE_API_HEADERS='{"Cookie":"XDEBUG_SESSION=PHPSTORM"}'EMS_BACKEND_API_TIMEOUT
Adjust the API client's timeout. By default is set to 30 seconds, if you API request may take longueur (e.g. during migration) you can increase the timeout :
EMS_BACKEND_API_VERIFY
Define the verify_host and verify_peer for the api client, by default it is set to true.
EMS_CACHE
Define the ems cache type. Default value file_system. Allowed values: file_system, apc and redis.
EMS_CACHE_PREFIX
Unique required value per project, otherwise wipe storage will clear all cached values.
EMS_REDIS_HOST
Use a different redis host for the common cache service. Default REDIS_HOST env variable.
EMS_REDIS_PORT
Use a different redis port for the common cache service. Default REDIS_PORT env variable.
EMS_METRIC_ENABLED
Default value false, if true /metrics is added to the routes.
EMS_METRIC_HOST
Default value empty, symfony route host pattern for allow hosting on /metrics
EMS_METRIC_PORT
Default value null, if defined will check the SERVER_PORT and throw 404 if not matching
EMS_SLUG_SYMBOL_MAP
Specify replacement strings, per locale to symbols. E.g. if you want to replace the symbol @ by the string at in your slug in English and French : {"en":{"@":"at"},"fr":{"@":"at"}}. Default value ~ (rely on the default Symfony configuration)
EMS_STORE_DATA_SERVICES
Define (JSON format) the store data services, in the priority order. See the Stora Data documentation for more details. Default value [{"type":"db"}]
EMS_KEY_STORE
A JSON-formatted environment variable that stores API tokens or other credentials as key/value pairs. Used to centralize and securely manage secrets (e.g. API keys) needed across the application. Each key can be accessed by name via the KeyStore service.
EMS_TRUSTED_IPS
Define (JSON format) a range of allowed ip address. Example: ["127.0.0.1", "::1", "192.168.0.1/24"] Important the route /metrics is not filtered.
EMS_EXCLUDED_CONTENT_TYPES
Define (JSON format) a list of content type names to exclude from admin backup/restore commands. Example: ["route","template","template_ems","label"]. Default value []
EMS_VITE_DEV_SERVER
Only use this variable for local development with vite dev server.
EMS_VITE_DEV_SERVER=http://localhost:5173 #admin ui bundle
EMS_VITE_DEV_SERVER=http://localhost:5174 #demo viteElasticms Form Bundle variables
EMSF_HASHCASH_DIFFICULTY
Define the hashcash difficuty for the form bundle. Set to 16384 by default.
EMSF_ENDPOINTS
Define the endpoints for the form bundle. Set to [] by default.
EMSF_LOAD_FROMJSON
Define the load form JSON for the form bundle. Set to true by default.
EMSF_CACHEABLE
Define the cacheable for the form bundle. Set to true by default.
EMSF_TYPE
Define the type for the form bundle. Set to form_instance by default.
Elasticms Submission Bundle variables
EMSS_CONNECTIONS
Define the connections for the submission bundle. Set to [] by default.
EMSS_DEFAULT_TIMEOUT
Define the default timeout for the submission bundle. Set to 10 by default.
EMSCO_CUSTOM_USER_OPTIONS_FORM
If sets and refers to a Form entity, the corresponding form will be included in the User profile form (/user/edit/1). It's usefully in order to add extra parameters or attributes to a specific instance of elasticms. I.e. adding users working hours.
Deprecated variables
Since version 5.14.0
- EMS_WEBALIZE_REMOVABLE_REGEX : See EMS_SLUG_SYMBOL_MAP)
- EMS_WEBALIZE_DASHABLE_REGEX : See EMS_SLUG_SYMBOL_MAP)
Since version 1.14.3
- ELASTICSEARCH_CLUSTER : See EMS_ELASTICSEARCH_HOSTS
- ELASTICSEARCH_VERSION : This variable doesn't have any replacement, the value is directly get form the elasticsearch cluster itself.
- S3_BUCKET : See EMS_STORAGES
- S3_CREDENTIALS : See EMS_STORAGES
- STORAGE_FOLDER : See EMS_STORAGES
- EMS_SFTP_SERVEUR : See EMS_STORAGES
- EMS_SFTP_PATH : See EMS_STORAGES
- EMS_SFTP_USER : See EMS_STORAGES
- EMS_EMS_REMOTE_SERVER : See EMS_STORAGES
- EMS_EMS_REMOTE_AUTHKEY : See EMS_STORAGES
- EMS_SAVE_ASSETS_IN_DB : See EMS_STORAGES
- TIKA_SERVER : See EMSCO_TIKA_SERVER
- TIKA_DOWNLOAD_URL : See EMSCO_TIKA_DOWNLOAD_URL
- EMS_PRIVATE_KEY : See [EMSCO_PRIVATE_KEY](#Activate document signature)
- EMS_PUBLIC_KEY : See [EMSCO_PUBLIC_KEY](#Activate document signature)
- EMS_INSTANCE_ID : See EMSCO_INSTANCE_ID
- EMS_NAME : See EMSCO_NAME
- EMS_SHORTNAME : See EMSCO_SHORTNAME
- EMS_SINGLE_TYPE_INDEX : Not replaced
- EMSCO_SINGLE_TYPE_INDEX : Not replaced
- EMS_PAGING_SIZE : See EMSCO_PAGING_SIZE
- EMS_THEME_COLOR : See EMSCO_THEME_COLOR
- EMS_DATE_TIME_FORMAT : See EMSCO_DATE_TIME_FORMAT
- EMS_DATEPICKER_FORMAT : See EMSCO_DATEPICKER_FORMAT
- EMS_DATEPICKER_WEEKSTART : See EMSCO_DATEPICKER_WEEKSTART
- EMS_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED : See EMSCO_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED
- EMS_FROM_EMAIL_ADDRESS : See [EMSCO_FROM_EMAIL_ADDRESS](#From information for email sent)
- EMS_FROM_EMAIL_NAME : See [EMSCO_FROM_EMAIL_NAME](#From information for email sent)
- EMS_ALLOW_USER_REGISTRATION : See EMSCO_ALLOW_USER_REGISTRATION
- EMS_ASSET_CONFIG : See EMSCO_ASSET_CONFIG
- EMS_CIRCLES_OBJECT : See EMSCO_CIRCLES_OBJECT
- EMS_UPLOAD_FOLDER : Not replaced
- DATABASE_URL : See [Doctrine](#Doctrine variables))
- EMSCO_ASSET_CONFIG_TYPE : Not replaced
- EMSCO_ASSET_CONFIG_INDEX : Not replaced
