Configuring Kuzzle

The complete default configuration of Kuzzle is stored in the kuzzlerc file at the root of the installation directory.

Kuzzle uses rc to override its default configuration. The most common ways to do it is:

  • via a .kuzzlerc file (example here);
  • via environment variables prefixed with kuzzle_.

Example 1: configuring Kuzzle via a custom .kuzzlerc file

You can write your custom config in $HOME/.kuzzlerc or any other valid location:

  "services": {
    "db": {
      "host": "<ES_HOST>",
      "port": "<ES_PORT>"

Example 2: configuring Kuzzle via Environment Variables

The name of the environment variables must mimic the structure of the configuration object to override:

  • the variable needs to be prefixed with kuzzle_,
  • the __ correspond to the levels of nesting in the configuration object (e.g. kuzzle_services__db__host corresponds to

kuzzle_services__db__host="<DB_HOST>" node bin/kuzzle start

Environment variables are particularly handy to set your custom configuration through a Docker container. It is very easy to pass environment variables via the environment section of a docker-compose.yml file. Take a look at how we pass environment variables to Kuzzle in our default docker-compose file:

version: '2'

    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:3.2

      # disable xpack
      - xpack.monitoring.enabled=false
      - xpack.graph.enabled=false
      - xpack.watcher.enabled=false