Environments
The Phoenix app can be run in various environments such as Colab and SageMaker notebooks, as well as be served via the terminal or a docker container.
If you are set up, see Quickstarts to start using Phoenix in your preferred environment.
Phoenix Cloud
Phoenix Cloud provides free-to-use Phoenix instances that are preconfigured for you with 10GBs of storage space. Phoenix Cloud instances are a great starting point, however if you need more storage or more control over your instance, self-hosting options could be a better fit.
If you're using Phoenix Cloud, be sure to set the proper environment variables to connect to your instance:
import os
# Add Phoenix API Key for tracing
os.environ["PHOENIX_API_KEY"] = "ADD YOUR PHOENIX API KEY"
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "ADD YOUR PHOENIX HOSTNAME"
# If you created your Phoenix Cloud instance before June 24th, 2025,
# you also need to set the API key as a header
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={os.getenv('PHOENIX_API_KEY')}"
Container
See Self-Hosting.
Notebooks
To start phoenix in a notebook environment, run:
import phoenix as px
session = px.launch_app()
This will start a local Phoenix server. You can initialize the phoenix server with various kinds of data (traces, inferences).
Terminal
If you want to start a phoenix server to collect traces, you can also run phoenix directly from the command line:
phoenix serve
This will start the phoenix server on port 6006. If you are running your instrumented notebook or application on the same machine, traces should automatically be exported to http://127.0.0.1:6006
so no additional configuration is needed. However if the server is running remotely, you will have to modify the environment variable PHOENIX_COLLECTOR_ENDPOINT
to point to that machine (e.g. http://<my-remote-machine>:<port>
)
Last updated
Was this helpful?