How to Configure the OpenEnv Web Interface for Debugging
Set the environment variable ENABLE_WEB_INTERFACE=true before launching your environment to enable the Gradio-based debugging UI at http://localhost:8000/web.
To configure the OpenEnv web interface for debugging, you activate a built-in visualization layer that runs directly in your browser. The Hugging Face OpenEnv repository provides this capability through a conditional environment variable that, when set, serves an interactive Gradio interface for inspecting observations, replaying actions, and validating environment state without writing custom scripts.
Enabling the Web Interface
The OpenEnv server checks for the ENABLE_WEB_INTERFACE environment variable during startup. When this value is set to true, the system automatically mounts a debugging dashboard at the /web endpoint on port 8000, allowing real-time interaction with your environment.
Local Development Setup
For debugging sessions on your local machine, export the flag before invoking the CLI entry point in src/openenv/cli/cli.py:
export ENABLE_WEB_INTERFACE=true
openenv run my_env
Once the server initializes, open your browser and navigate to http://localhost:8000/web to access the interactive debugging panel.
Docker Deployment
When containerizing your environment, pass the configuration as a build argument or runtime environment variable:
docker build -t my-env \
--build-arg ENABLE_WEB_INTERFACE=true \
-f Dockerfile .
docker run -p 8000:8000 -e ENABLE_WEB_INTERFACE=true my-env
The container will expose the web interface on port 8000, making the debugging tools available at the same /web path.
Disabling the Interface for API-Only Mode
If you require a headless deployment without the UI overhead, OpenEnv supports two methods to suppress the web interface. The CLI parser in src/openenv/cli/cli.py accepts the --no-interface flag, or you can explicitly set ENABLE_WEB_INTERFACE=false:
openenv run my_env --no-interface
This configuration launches the environment in API-only mode, eliminating the Gradio dependency and reducing resource consumption.
Environment Template Compatibility
The ENABLE_WEB_INTERFACE flag is respected across all official OpenEnv templates. According to envs/wildfire_env/README.md, the wildfire environment exposes the UI at /web when the flag is enabled. The envs/textarena_env/README.md and docs/source/environments/textarena.md files confirm that TextArena environments follow the same pattern, serving a Gradio interface for interactive debugging. Similarly, envs/snake_env/README.md documents this capability for snake environments, ensuring consistent debugging interfaces regardless of which template you deploy.
Summary
- Set
ENABLE_WEB_INTERFACE=trueto configure the debugging UI athttp://localhost:8000/web - Use
--no-interfaceorENABLE_WEB_INTERFACE=falsefor API-only deployments - All official templates (wildfire, textarena, snake, openapp) respect this configuration
- The CLI handler in
src/openenv/cli/cli.pyprocesses both the environment variable and command-line flags
Frequently Asked Questions
What URL and port does the OpenEnv web interface use?
The web interface mounts at the /web endpoint on port 8000 by default, making it accessible at http://localhost:8000/web during local development and at your Space URL followed by /web in Hugging Face deployments.
How do I disable the web interface when running OpenEnv?
You can disable the interface by passing the --no-interface flag to the openenv run command or by setting the environment variable ENABLE_WEB_INTERFACE=false before starting the server, as implemented in the CLI parser at src/openenv/cli/cli.py.
Is the web interface available for all OpenEnv environment templates?
Yes, all official environment templates—including wildfire, textarena, snake, and openapp—support the web interface when ENABLE_WEB_INTERFACE=true is set, with each template's README documenting the specific Gradio UI availability at the /web path.
Can I use the OpenEnv web interface in production Hugging Face Spaces?
Yes, configure your Space's environment variables to include ENABLE_WEB_INTERFACE=true or pass it as a build argument in your Dockerfile. The interface will be available at your Space's domain under /web, though you should implement appropriate access controls before exposing debugging tools in production environments.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →