Local Quickstart
Use this path to evaluate a first self-hosted install on a local or test Kubernetes cluster. It uses the Helm chart’s values.dev.yaml file, which deploys development-grade PostgreSQL, MinIO, and MailDev in the cluster.
- A Kubernetes cluster, such as Kind, Minikube, or Docker Desktop.
- Helm.
- The Logfire image pull key from Pydantic.
Create the namespace and image pull secret:
kubectl create namespace logfire
kubectl -n logfire create secret docker-registry logfire-image-key \
--docker-server=us-docker.pkg.dev \
--docker-username=_json_key \
--docker-password="$(cat key.json)" \
--docker-email=YOUR-EMAIL@example.com
Install the chart with the development values file:
helm repo add pydantic https://charts.pydantic.dev/
helm repo update
helm pull pydantic/logfire --untar
helm upgrade --install logfire ./logfire \
-f ./logfire/values.dev.yaml \
--namespace logfire
Port-forward Logfire:
kubectl -n logfire port-forward svc/logfire-service 8080:8080
Open Logfire at http://localhost:8080.
On first install, the chart creates the logfire-meta organization and stores its frontend access token in a Kubernetes Secret:
kubectl -n logfire get secret logfire-meta-frontend-token \
-o "jsonpath={.data.logfire-meta-frontend-token}" | base64 -d
Open the meta project with the token:
http://localhost:8080/logfire-meta/logfire-meta#token=LOGFIRE_META_FRONTEND_TOKEN
After you have access, create an invite link from Settings > Invite and assign the Admin organization role.
Create a project and write token, then configure the SDK to use your local endpoint:
import logfire
logfire.configure(
token='YOUR_LOGFIRE_WRITE_TOKEN',
advanced=logfire.AdvancedOptions(base_url='http://localhost:8080'),
)
logfire.info('Hello, {place}!', place='World')
Delete the local cluster or uninstall the release:
helm -n logfire uninstall logfire