Skip to content

Server Environment Variables

kaiobendrauf edited this page Oct 10, 2026 · 5 revisions

This page details the environment variables that can be used to configure the Krampus server at runtime.

General Environment Variables

Environment Variable Default Value Description
SYNC_SECRET n/a A secret string that clients must provide as the value for the Krampus-Auth HTTP header. If unset, no authentication is required for syncing.
CTL_SECRET n/a A secret string that krampusctl must provide as the value for the Krampus-Auth HTTP header. If unset, no authentication is required for updating rules via the API.
MIN_CLEAN_SYNC_DAYS n/a When choosing when a host will next perform a clean sync, Krampus pick randomly selects a number of days between the minimum value, and a maximum value. This environment variable sets the minimum value.
MAX_CLEAN_SYNC_DAYS n/a When choosing when a host will next perform a clean sync, Krampus pick randomly selects a number of days between the minimum value, and a maximum value. This environment variable sets the maximum value.
BATCH_SIZE 50 Krampus sends rules to clients in batches, of BATCH_SIZE size at a time. If this environment variable is not set, Krampus will default to a batch size of 50 rules.

Database Environment Variables

Postgres-specific Environment Variables

Environment Variable Default Value Description
POSTGRES_HOST n/a FQDN/IP address of your Postgres instance.
DB_NAME n/a The name of your database within your Postgres instance.
POSTGRES_PORT 5432 The port number for your Postgres connection.
POSTGRES_USER n/a The Postgres username that Krampus should use.
POSTGRES_PW n/a The Postgres password that Krampus should use.

MySQL-specific Environment Variables

Environment Variable Default Value Description
MYSQL_HOST n/a FQDN/IP address of your MySQL instance.
DB_NAME n/a The name of your database within your MySQL instance.
MYSQL_PORT 3306 The port number for your MySQL connection.
MYSQL_USER n/a The MySQL username that Krampus should use.
MYSQL_PW n/a The MySQL password that Krampus should use.

Firestore-specific Environment Variables

Important

The Firestore library handles authentication for Krampus. It assumes you are using Application Default Credentials.

Environment Variable Default Value Description
GCP_PROJ_ID n/a The name of the Google Cloud project that your Firestore database is in.
DB_NAME n/a The name of the Firestore database you want to use with Krampus.

Event Handler Environment Variables

Pub/Sub-specific Environment Variables

Important

The Pub/Sub library handles authentication for Krampus. It assumes you are using Application Default Credentials.

Environment Variable Default Value Description
PUB_SUB_TOPIC_ID n/a Google Cloud Pub/Sub topic name to forward client events to. Defaults to empty.
PUB_SUB_PROJ_ID n/a Name of the Google Cloud project that your Pub/Sub topic is in.

Database Event Handling-specifc Environment Variables

Some database integrations allow events to be handled directly by Krampus, and stored in the existing database.

Environment Variable Default Value Description
KRAMPUS_EVENT_HANDLER_FULL n/a Whether or not to store a full event in the events table. Full events are quite large - only store these if you intend to process them.
KRAMPUS_EVENT_HANDLER_SUMMARY n/a Whether or not to store a summary of the event in the events table.

The below table summarises which database backends support storing which kinds of event summaries:

Database Stores Full Events Stores Event Summaries
Postgres no yes
MySQL no yes
Firestore yes yes