Skip to main content

Background

Keep is highly configurable through environment variables. This allows you to customize various aspects of both the backend and frontend components without modifying the code. Environment variables can be set in your deployment environment, such as in your Kubernetes configuration, Docker Compose file, or directly on your host system.

Backend Environment Variables

General

General configuration variables control the core behavior of the Keep server. These settings determine fundamental aspects such as the server’s host, port, and whether certain components like the scheduler and consumer are enabled.

Logging and Environment

Logging and environment configuration determines how Keep generates and formats log output. These settings are crucial for debugging, monitoring, and understanding the behavior of your Keep instance in different environments.

Database

Database configuration is crucial for Keep’s data persistence. Keep supports various database backends through SQLAlchemy, allowing flexibility in choosing and configuring your preferred database system.

Resource Provisioning

Resource provisioning settings control how Keep sets up initial resources. This configuration is particularly important for automating the setup process and ensuring that necessary resources are available when Keep starts.
To elaborate on resource provisioning and its configuration, please see provisioning docs.

Authentication

Authentication configuration determines how Keep verifies user identities and manages access control. These settings are essential for securing your Keep instance and integrating with various authentication providers.
For specific authentication type configuration, please see authentication docs.

Service Mesh (Internal Alert Ingestion)

These settings allow trusted services within the same Kubernetes cluster to POST alerts to Keep without requiring a Keep API key. This is intended for service-to-service communication where network-level authentication (e.g. Istio mTLS with AuthorizationPolicy) ensures only authorized callers can reach Keep’s alert ingestion endpoints.
When KEEP_ALLOW_MESH_ALERT_INGESTION is set to "true", requests to /alerts/event* that do not carry an API key or bearer token are accepted and authenticated as an internal service with the webhook role. Calling services can optionally set the X-Service-Name HTTP header to identify themselves in Keep’s logs and audit trail:
The authenticated entity will have:
  • email: service:<X-Service-Name header value> (defaults to service:unknown if the header is not set)
  • role: webhook (grants write:alert and write:incident scopes)
This feature bypasses API key authentication for the alert ingestion endpoints. You must pair it with network-level access control (such as Istio AuthorizationPolicy) to restrict which services can reach these endpoints. Without network-level enforcement, any client that can reach Keep’s backend can POST alerts.

Secrets Management

Secrets Management configuration specifies how Keep handles sensitive information. This is crucial for securely storing and accessing confidential data such as API keys and integrations credentials.

OpenTelemetry

OpenTelemetry configuration enables comprehensive observability for Keep. These settings allow you to integrate Keep with various monitoring and tracing systems, enhancing your ability to debug and optimize performance.

WebSocket Server (Pusher/Soketi)

WebSocket server configuration controls real-time communication capabilities in Keep. These settings are important for enabling features that require instant updates and notifications.

OpenAI

OpenAI configuration is used for integrating with OpenAI services. These settings are important if you’re utilizing OpenAI capabilities within Keep for tasks such as natural language processing or AI-assisted operations.
For various different LLM based features, we also require to set these environment variables for Keep’s frontend too.

Posthog

Posthog configuration controls Keep’s integration with the Posthog analytics platform. These settings are useful for tracking usage patterns and gathering insights about how your Keep instance is being used.

Sentry

Sentry configuration controls Keep’s integration with Sentry for error monitoring and reporting. These settings are important for maintaining the stability and reliability of your Keep instance.

Ngrok

Ngrok configuration enables secure tunneling to your Keep instance. These settings are particularly useful for development or when you need to expose your local Keep instance to the internet securely.

Elasticsearch

Elasticsearch configuration controls Keep’s integration with Elasticsearch for advanced search capabilities. These settings are important if you’re using Elasticsearch to enhance Keep’s search functionality and performance.

Redis

Redis configuration specifies the connection details for Keep’s Redis instance. Redis is used for various caching and queueing purposes, making these settings important for optimizing Keep’s performance and scalability.

Redis Sentinel

Redis sentinel configuration specifies the connection details for Keep’s Redis sentinel instance. Redis sentinel is used when you have a redis cluster and it acts as a broker.

ARQ

ARQ (Asynchronous Task Queue) configuration controls Keep’s background task processing. These settings are crucial for managing how Keep handles long-running or scheduled tasks, ensuring efficient resource utilization and responsiveness.

Rate Limiting

Rate limiting configuration controls how many requests can be made to Keep’s API endpoints within a specified time period. This helps prevent abuse and ensures system stability.
Currently, rate limiting is applied to the following endpoints:
  • POST /alerts/event - Generic event ingestion endpoint
  • POST /alerts/{provider_type} - Provider-specific event ingestion endpoints
These endpoints are rate-limited according to the KEEP_LIMIT_CONCURRENCY setting when KEEP_USE_LIMITER is enabled.

Maintenance Windows

The strategy enables the ability to manage how the alerts are handled in case of a match with the Maintenance Windows Rules.

Frontend Environment Variables

Frontend configuration variables control the behavior and features of Keep’s user interface. These settings are crucial for customizing the frontend’s appearance, functionality, and integration with the backend services.

General

Authentication

Authentication configuration determines how Keep verifies user identities and manages access control. These settings are essential for securing your Keep instance and integrating with various authentication providers.

Posthog

Pusher

Pusher configuration is essential for enabling real-time updates and communication in Keep’s frontend. These settings allow the frontend to establish a WebSocket connection with the Pusher server, facilitating instant updates and notifications.