Documentation
Getting Started
Integrations
JavaScript
Python
LangChain
API
Others
Features
Observability
Prompts
Threads
Evaluations
Radars
Users
Feedback
Tags
More
Security
Concepts
Self-hosting
Self-hosting
Lunary was designed to be surprisingly simple to self-host, through a Helm Chart which include the frontend, the api and workers.
Note: The Kubernetes setup is available only for Self-hosted Advanced customers
Steps
1
Set up a PostgreSQL database
Set up a PostgreSQL database to store your Lunary data (version 15 or higher).
2
Log in to the private Docker Repository
Run the following command:
helm registry login registry-1.docker.io -u lunarycustomer -p <your_organization_access_token>
Your Organization's Access Token, will be provided by Lunary when your subscription is activated.
3
Download the Helm Chart
kubectl create ns lunaryhelm pull oci://registry-1.docker.io/lunary/lunary --untar --version '1.2.11' # versions are available here: https://github.com/lunary-ai/lunary/releases
4
Set up mandatory secrets
kubectl create secret -n lunary docker-registry regcred --docker-server=docker.io --docker-username=lunarycustomer --docker-password=<your_organization_access_token>kubectl create secret -n lunary generic db-connection --from-literal=url="postgres://<username>:<password>@<host>:5432/lunary"kubectl create secret -n lunary generic license-key --from-literal=LICENSE_KEY='<license_key>'kubectl create secret -n lunary generic jwt-secret --from-literal=JWT_SECRET='<jwt_secret>' # You can generate a random string using `openssl rand -base64 32`
Your License Key will be provided by Lunary when your subscription is activated.
The Organization Access Token is the same as the one you used to log in with helm login
.
5
(Optional) Set up API Keys
In order to use the Prompts, Radars and Evaluations features, you need to at least one of the following secrets:
kubectl create secret -n lunary generic api-keys \--from-literal=OPENAI_API_KEY='<your-openai-api-key>' \# Or if using Azure--from-literal=AZURE_OPENAI_API_KEY='<your-azure-openai-api-key>' \--from-literal=AZURE_OPENAI_RESOURCE_NAME='<your-azure-openai-resource-name>' \--from-literal=AZURE_OPENAI_DEPLOYMENT_ID='<your-azure-openai-deployment-id>' \--from-literal=ANTHROPIC_API_KEY='<your-anthropic-api-key>' \--from-literal=OPENROUTER_API_KEY='<your-openrouter-api-key>' \--from-literal=PALM_API_KEY='<your-palm-api-key>' \
Then, configure the corresponding values in values.yaml
, in the Helm Chart's root directory:
--global:...secrets:useOpenAI: falseuseAzureOpenAI: trueuseAnthropic: trueuseOpenRouter: trueusePalm: true...
6
Install the Helm Chart
Note: Before installing, please review at minimum the top-level values.yaml file. If you wish, it may be useful to also dive into the individual subcharts values.yaml files as well for more custom configuration.
cd lunaryhelm upgrade --install -n lunary lunary .
7
🎉 Done!
The Helm Chart should be installed and ready to go.
You can now set up a ingress controller to expose the services.