Guides v2.x

# Configuring Kuzzle

The Kuzzle configuration is stored in a kuzzlerc file found in the root folder of your Kuzzle installation.

Kuzzle uses rc to override its default configuration by either:

  • loading parameters from a .kuzzlerc file (sample file) ;
  • loading parameters from environment variables with a kuzzle_ prefix.

# Example 1: configuring Kuzzle using a custom .kuzzlerc file

You can write your custom config parameters in a .kuzzlerc and store it in $HOME/.kuzzlerc or one of these locations:

Copied to clipboard!
  "services": {
    "storageEngine": {
      "client": {
        "host": "http://localhost:9200",
        "apiVersion": "5.4"

# Example 2: configuring Kuzzle using Environment Variables

The name of the environment variable must match the path of the configuration parameter in the .kuzzlerc file. To set the name of the environment variable:

  • Use the prefix kuzzle_,
  • then append the parameter path (as defined in the .kuzzlerc file) by using a double underscore __ to separate each level of its hierarchy.

For example, the .kuzzlerc parameter in example 1, is represented by the environment variable kuzzle_services__storageEngine__host:

Copied to clipboard!
export kuzzle_services__storageEngine__host="<DB_HOST>"

Environment variables are particularly handy when running Kuzzle in a Docker container. Using Docker Compose, they can easily be configured in the environment section of the docker-compose.yml file. For example, here's how we pass environment variables to Kuzzle in our default docker-compose file:

Copied to clipboard!
version: '3'

    image: kuzzleio/kuzzle
      - SYS_PTRACE
      - redis
      - elasticsearch
      - kuzzle_services__storageEngine__client__host=http://elasticsearch:9200
      - kuzzle_services__internalCache__node__host=redis
      - kuzzle_services__memoryStorage__node__host=redis
      - NODE_ENV=production

    image: redis:5

    image: kuzzleio/elasticsearch:5.6.10
      nofile: 65536
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"

For an exhaustive list of configuration parameters, please refer to the kuzzlerc sample file.