Self-Hosted Container Setup
If you have already completed setup, proceed to the Phase 1: Performance documentation.
This is a streamlined setup guide. Detailed container and deployment documentation is available and contains information on configuring resources, environment variables, token limits, and deploying to Kubernetes.
Downloading Lakera Guard
The following steps require the use of the Docker command line interface (CLI).
Login to the private DockerHub repository to pull the latest Lakera Guard container. You will need credentials provided by Lakera to access the private registry.
Username and Password provided by Lakera.
After successfully logging in, run the following command to download the latest stable image locally.
Deploying Lakera Guard
Lakera Guard is designed to be highly flexible and can be integrated into any OCI compliant orchestration system, such as Kubernetes.
For complete documentation, including storage configuration, security configuration, and deployment files, refer to the Deploying to Kubernetes guide. Note that the Lakera Guard container does not support TLS. Requests to Lakera Guard should be sent using HTTP.
Export License key as an environment variable
To run the Lakera Guard container, make sure to have the license key ready and can be exported as an environment variable
The container will only load if the license key is found and not expired.
When a successful license key if found:
Example error messages
When no License key is found:
If the License key is expired:
When the License key is close to expiration:
This is a warning message, and the container will continue to boot.
Running the Lakera Guard Container Locally
The Lakera Guard container is bound to port 8000 by default. Set the PORT environment variable on the container to use a different port.
A self-hosted Lakera Guard container requires no authorization. Here is an example of using your self-hosted prompt-injection endpoint.