Standalone self-hosted installations require
langsmith Helm chart version 0.19.0-rc.2 or later and LangSmith backend and frontend images 0.19.2rc1 or later.
Deployments assigned to a remote listener (
source_config.listener_id) and scale-to-zero deployments do not support deployment namespaces.
Prerequisites
On standalone self-hosted installations, setimages.backendImage.tag and images.frontendImage.tag to 0.19.2rc1 or later. Chart releases through 0.19.0-rc.6 default to 0.18.29rc1, which does not support this configuration on standalone installations.
Prepare your cluster and Helm values before you continue:
- Agent Server hosting enabled: Set
config.deployment.enabled: truein your Helm values. See Enable Agent Server hosting. - Gateway API or Istio Gateway: Enable
gateway.enabled: true(Gateway API) oristioGateway.enabled: true(Istio Gateway). The shared Kubernetes Ingress (ingress.enabled: truealone) does not support deployment namespaces. - Cross-namespace route allowance (Gateway API): When using
gateway.enabled: true, configure your KubernetesGatewaylistener to allowHTTPRouteresources from the target namespaces. For example, setallowedRoutes.namespaces.from: Allor a matching labelSelector. - Pre-existing namespaces: Create every target Kubernetes namespace before upgrading the chart. The chart does not create namespaces.
- Image pull secrets in each target namespace: When
images.imagePullSecretsoroperator.templates.deploymentspecifies pull secrets, create matchingSecretobjects in every target namespace. Kubernetes resolves pull secrets in the pod’s own namespace, and the chart does not create or copy them. See Configure authentication for private registries. - Workspace IDs: Gather the UUID of each LangSmith workspace that receives allowed namespaces.
Configure allowed namespaces
Map each workspace UUID to its allowed Kubernetes namespaces underconfig.deployment.namespaces in your langsmith_config.yaml file.
To configure deployment namespaces:
1
Create target namespaces and pull secrets
Create each target namespace in your cluster. If your installation uses
images.imagePullSecrets, create matching pull secrets in each target namespace.2
Add config.deployment.namespaces to your Helm values
Add the workspace-to-namespace map and image tags alongside
config.deployment.enabled: true and either gateway.enabled: true or istioGateway.enabled: true. Replace the workspace ID and Gateway name and namespace with your values:3
Upgrade the LangSmith Helm release
Apply the updated values to your LangSmith release. Replace
<version> and <namespace> with your chart version and installation namespace:Review Helm chart configuration
Whenconfig.deployment.enabled is true and config.deployment.namespaces is non-empty, the chart creates and updates the following resources:
- Allowlist environment variable: Sets
HOST_DEPLOYMENT_NAMESPACESas a JSON object in the shared ConfigMap read byhost-backendand the in-cluster deployment worker (listener). For backward compatibility,host-backendalso readsHOST_BYOC_DEPLOYMENT_NAMESPACESas a fallback alias;HOST_DEPLOYMENT_NAMESPACEStakes precedence when both are set. - Control plane and worker RBAC: When
hostBackend.rbac.createistrue(default), the chart creates aClusterRolenamed<release-fullname>-<release-namespace>-deployment-namespaces. It also creates aRoleBindingin each listed namespace outside the release namespace, binding both thehost-backendandlistenerServiceAccounts from the release namespace. The chart skips the release namespace because both ServiceAccounts already have access there. - Operator watch scope: When
operator.watchNamespacesis a non-empty comma-separated list, the chart appends the deduplicated namespaces fromconfig.deployment.namespacestoWATCH_NAMESPACE. Whenoperator.rbac.createistrue, it also creates per-namespaceRoleandRoleBindingresources for the operator in each watched namespace. Whenoperator.watchNamespacesis empty (default),WATCH_NAMESPACEremains empty and the operator watches all namespaces cluster-wide.
ClusterRole grants the following namespace-scoped permissions through each RoleBinding:
If you set
hostBackend.rbac.create: false, create equivalent RoleBinding grants in every target namespace for both the host-backend and listener ServiceAccounts before creating deployments.
Check namespace constraints
The Helm chart andhost-backend enforce the following constraints. Chart validation runs even when config.skipValidation is true.
- Valid workspace UUIDs: Every key in
config.deployment.namespacesmust be a valid workspace UUID. - One workspace per namespace: Each namespace belongs to at most one workspace. Helm template rendering fails if the same namespace appears under more than one workspace. At runtime,
host-backendrejects deployments into any namespace listed under multiple workspaces inHOST_DEPLOYMENT_NAMESPACESfor all of them. - Reserved system namespaces: Both the chart and
host-backendreject namespaces starting withkube-,gke-, orgmp-. They also rejectdefault,crossplane-system,istio-system,istio-ingress,buildkit-system,cert-manager,external-secrets,gatekeeper-system,keda,karpenter,observability,sandbox, andsandbox-workloads. - Valid DNS label: Namespace names passed to the API must match
^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$and contain at most 63 characters. - Cross-workspace conflict check: Creating a deployment in a namespace fails with
409if another workspace still has any deployment there. This includes deployments currently being deleted. - Immutable after creation: A deployment’s namespace is fixed at creation time and cannot be changed later.
Understand workload and build placement
Selecting a deployment namespace changes where runtime resources run, while image builds stay in the LangSmith installation namespace:- Runtime resources: The selected namespace runs the
LGPcustom resource, API server and queue worker pods, and managed PostgreSQL and Redis pods. Services, Secrets, PersistentVolumeClaims, andHTTPRouteorVirtualServiceobjects also live there. - Build jobs: When builds are configured on your installation, build jobs still run in the LangSmith installation namespace rather than the selected deployment namespace.
- Runtime logs:
host-backendreads deployment pod logs directly from the selected namespace using the RBAC bindings configured by the chart.
Select a namespace
Users with deployment creation permissions can choose from the namespaces allowed for their workspace through the LangSmith UI or the control plane API.Use the LangSmith UI
When your workspace has allowed namespaces, the deployment creation form shows a Kubernetes namespace dropdown. It appears for Docker image deployments and, when GitHub builds are enabled, GitHub repository deployments. To place a new deployment in an allowed namespace:- In LangSmith, open the deployment creation form for your workspace.
- Select an allowed namespace from Kubernetes namespace. Leave it unset to use the installation namespace. To clear a selection, select the same namespace again.
- Complete the remaining deployment settings and submit.
Use the control plane API
For standalone self-hosted installations, usehttps://<host>/api-host as the control plane API base URL. For BYOC, use your data plane endpoint with the same /api-host prefix. Include X-Api-Key and X-Tenant-Id headers on every request.
List allowed namespaces
CallGET /v2/deployments/namespaces to retrieve the namespaces allowed for the workspace, sorted alphabetically by name:
items array when no namespaces are allowed for the workspace, on LangSmith Cloud, or on listener-backed installations.
Create a deployment in a namespace
Setsource_config.k8s_namespace on POST /v2/deployments. Omit the field or pass null to place the deployment in the installation namespace:
host-backend runs a Kubernetes SelfSubjectAccessReview check in the target namespace. That check confirms host-backend can list pods, read pod logs, and get deployments there. During deployment, the worker checks that the namespace is still in HOST_DEPLOYMENT_NAMESPACES for the workspace. It then runs a SelfSubjectAccessReview for the full set of deployment permissions.
GET /v2/deployments/{deployment_id} returns the selected namespace in source_config.k8s_namespace, or null when the deployment runs in the installation namespace.
Sending a non-null source_config.k8s_namespace on PATCH /v2/deployments/{deployment_id} returns 400 ('source_config.k8s_namespace' cannot be updated.). To move a deployment to another namespace, create a new deployment in the target namespace and delete the old deployment.
Remove or reassign a namespace
Delete all deployments in a namespace before removing it fromconfig.deployment.namespaces or reassigning it to another workspace.
Removing a namespace while deployments still run there has the following effects:
- New revisions fail: The deployment worker rejects namespaces no longer listed for that workspace in
HOST_DEPLOYMENT_NAMESPACESwithout retrying. - Scoped operator stops reconciling: When
operator.watchNamespacesis set, removing the namespace drops it fromWATCH_NAMESPACE. The upgrade also deletes the operator’sRoleandRoleBindingin that namespace. - Reassignment conflicts: If deployments from the previous workspace remain (including deployments being deleted), calls to
POST /v2/deploymentsin the new workspace return409.
Verify the configuration
Run these commands after upgrading the Helm release to confirm the allowlist, RBAC bindings, and API endpoint are active. Replace<fullname> with the chart’s full release name (for example, langsmith when the release name contains langsmith, or <release>-langsmith otherwise):
<target-namespace>, confirm its custom resource and pods land in that namespace:
Troubleshoot
See also
- Enable Agent Server hosting
- Create an Ingress for installations (Kubernetes)
- Self-hosted platform features
- Control plane API
Connect these docs to your agent of choice via MCP for real-time answers.

