Public Custom Component Environment Variable not working?
Bug Description
After updating my langflowai/langflow docker to the current latest version (which points to 1.13.3 at the time of this report) shared playgrounds that worked fine before, now throw a
HTTP 400: {"detail": "This flow cannot be executed."}
error. The flow in question uses custom components that previously were allowed in the shared playground via the
LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS=true
environment variable. I have confirmed, that the docker still has the flag set to true - but any workflow containing a custom component seems to refuse running in a shared playground now. The documentation of 1.13.x (https://docs.langflow.org/deployment-block-custom-components#public-flow-custom-components) still mentions this environment variable - but it seems to currently not work.
I confirmed that all other flows using only standard components seem to work fine in shared playgrounds.
Reproduction
Create any flow with chat input / output, any LLM and a custom component hooked to the flow on Version 1.13.3 - hosted in a docker with environment setting
-e LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS=true
Open in shared playground view. Write any prompt as chat input. Error 400 should occur as stated.
Expected behavior
The environment variable should override for custom components to be allowed nonetheless.
Who can help?
No response
Operating System
Containers hosted on both ubuntu 26.04.1 LTS (AMD64 docker image) and ubuntu 24.04.5 LTS on the DGX Spark (ARM64 docker image).
Langflow Version
1.13.3
Python Version
None
Screenshot
No response
Flow File
No response
I think this comes from the admin-only default that shipped in 1.13.2, not from LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS being ignored.
Since 1.13.2, custom_component_admin_only defaults to True (lfx/services/settings/groups/security.py), and an upgrade applies it to existing installs as well. In prepare_public_flow_build (lfx/utils/flow_validation.py), the public opt-in path checks that first:
if settings.allow_public_custom_components and _admin_only_build_required(settings, is_superuser=False):
# Public execution never carries an administrator entitlement.
prepared = await prepare_flow_build_for_user(sanitized, is_superuser=False)
A shared-playground visitor never counts as a superuser, so the flow is prepared as if a regular user were running it. Saved custom source that doesn't match a server template gets rejected there. The endpoint (api/v1/chat.py) turns that CustomComponentValidationError into the generic 400 "This flow cannot be executed.". The actual reason only goes to the server log, as Public flow validation failed: ..., so docker logs should show which component it refused.
Two ways to get it working again:
- Recommended: put the component's
.pyin a directory and pointLANGFLOW_COMPONENTS_PATHat it (mounted into the container). The server then knows the component as a trusted template, so the public build runs the server's copy. This works even withLANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTSback atfalse. - Restore the pre-1.13.2 behaviour with
LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY=false, alongside your existing flag. Note that this lets every regular user run arbitrary Python on the server again, so only do it if all flow authors are trusted.
Also, the table under "Custom components in publicly shared flows" in the docs only lists ALLOW_CUSTOM_COMPONENTS × ALLOW_PUBLIC_CUSTOM_COMPONENTS. It doesn't mention that the admin-only default now overrides the true/true row, which is probably why this looks like a regression.
I tested it here and with LANGFLOW_ALLOW_PUBLIC_CUSTOM_COMPONENTS=true a normal custom component runs fine on the shared playground, so the 400 is likely coming from something specific. To confirm, can you send the flow file (or the component's class name), the LANGFLOW_ALLOW_CUSTOM_COMPONENTS and LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY vars, and the log line next to the 400 (with LANGFLOW_LOG_LEVEL=debug)? That log shows which rule blocked it.