Guides v1.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

Configuring Kuzzle #

The Kuzzle configuration is stored in a kuzzlerc file (opens new window) found in the root folder of your Kuzzle installation.

Kuzzle uses rc (opens new window) to override its default configuration by either:

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 (opens new window):

Copied to clipboard!
  "services": {
    "db": {
      "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__db__host:

Copied to clipboard!
export kuzzle_services__db__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__db__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 (opens new window).