Skip to main content
Feedback

Environment variables

The Environment Variables is essential for configuring the LLM Gateway. These variables allow you to define key settings such as port configurations, logging levels, and tenant information, tailoring the gateway to meet your deployment needs.

VariableK8S VariableDescriptionRequired?Default ValuePossible Values
LUNAR_API_KEYlunarAPIKeyAllow the Gateway to communicate with the Control PlaneNo--
TENANT_NAMEtenantNameConfigure the name for your organizationYes--The name of your organization, for example, AcmeGoogle
BIND_PORTservice.portConfigure the bind port LLM Gateway listens onNo8000Any accessible port
ENGINE_ADMIN_PORTservice.adminPortConfigure the admin port LLM Gateway listens on. Also responsible for the Interceptor handshakeNo8081Any accessible port
LUNAR_HEALTHCHECK_PORTservice.healthCheckPortConfigure the port LLM Gateway listens onNo8040Any accessible port
LOG_LEVELlogLevelConfigure the log levelNoERRORDEBUGINFOWARNERROR
ENVenvTo set the environments stageNoprodproddev
LUNAR_TELEMETRYtelemetryEnabledAllow the user to disable telemetry reportNotruetruefalse
LUNAR_ACCESS_LOGS_OUTPUT-Enable the output for access logs into the stdoutNostdoutstdoutNULL
TLS_CERT_PATH-Point to the mounted certificate file, for TLS communicationNo/etc/lunar-proxy/certs/gateway_cert.pemPath to the Relevant Certificate Path
REDIS_URL-Path to the Redis Instance that’s connected to the LLM Gateway Pro InstancesNoAny URL
REDIS_PREFIX-Prefix for Redis keysNolunarPrefix for Redis keys
REDIS_USE_CLUSTER-Enable the use of Redis ClusterNofalsetruefalse
REDIS_USE_CA_CERT-Enable the use of CA certificate for Redis mTLS connectionNofalsetruefalse
REDIS_CA_CERT_PATH-Path to the CA certificate file for Redis mTLS connectionNo/etc/redis/ca.crtPath to the CA certificate file
REDIS_USE_CLIENT_CERT-Enable the use of client certificate for Redis mTLS connectionNofalsetruefalse
REDIS_CLIENT_CERT_PATH-Path to the client certificate file for Redis mTLS connectionNo/etc/redis/client.crtPath to the client certificate file
REDIS_CLIENT_KEY_PATH-Path to the client key file for Redis mTLS connectionNo/etc/redis/client.keyPath to the client key file
note
  • Make sure the port you choose is accessible by the LLM Gateway Interceptor.
  • By default, the main port is set to 8000.
  • The handshake process uses port 8081 by default.
  • If you change ENGINE_ADMIN_PORT, remember to also update the Interceptor’s LUNAR_HANDSHAKE_PORT accordingly.
  • Similarly, if you change BIND_PORT, be sure to update the Interceptor’s LUNAR_PROXY_HOST to match.

Configuration examples

Docker

docker run -d --rm -e TENANT_NAME="Acme Corp." -e LOG_LEVEL=DEBUG -e BIND_PORT=8000 -e ENGINE_ADMIN_PORT=8081 -e LUNAR_HEALTHCHECK_PORT=8040 -p 8000:8000 -p 8081:8081 -p 8040:8040 --name lunar-proxy lunarapi/lunar-proxy:latest

K8S

helm install lunar-proxy lunar/lunar-proxy --set service.port=8000 --set service.adminPort=8081 --set service.healthCheckPort=8040 --set logLevel=DEBUG --set tenantName="Acme Corp."

Local

export BIND_PORT="8000"
export ENGINE_ADMIN_PORT="8081"
export LUNAR_HEALTHCHECK_PORT="8040"
export LOG_LEVEL="DEBUG"
export TENANT_NAME="Acme Corp."
On this Page