Configuration

How to configure Phoenix for your needs

Ports

Phoenix is an all-in-one solution that has a tracing UI as well as a trace collector over both HTTP and gRPC. By default, the container exposes the following ports:

PortProtocolEndpointFunctionEnv Var

6006

HTTP

/

User interface (UI) of the web application.

PHOENIX_PORT

6006

HTTP

/v1/traces

Accepts traces in OpenTelemetry OTLP formatโ€‰ (Protobuf).

PHOENIX_PORT

4317

gRPC

n/a

Accepts traces in OpenTelemetry OTLP formatโ€‰ (Protobuf).

PHOENIX_GRPC_PORT

If the above ports need to be modified, consult the Environment Variables section below.

Environment Variables

Phoenix uses environment variables to control how data is sent, received, and stored. Here is the comprehensive list:

Server Configuration

The following environment variables will control how your phoenix server runs.

  • PHOENIX_PORT: The port to run the phoenix web server. Defaults to 6006.

  • PHOENIX_GRPC_PORT: The port to run the gRPC OTLP trace collector. Defaults to 4317.

  • PHOENIX_HOST: The host to run the phoenix server. Defaults to 0.0.0.0

  • PHOENIX_WORKING_DIR: The directory in which to save, load, and export data. This directory must be accessible by both the Phoenix server and the notebook environment. Defaults to ~/.phoenix/

  • PHOENIX_SQL_DATABASE_URL: The SQL database URL to use when logging traces and evals. if you plan on using SQLite, it's advised to to use a persistent volume and simply point the PHOENIX_WORKING_DIR to that volume. If URL is not specified, by default Phoenix starts with a file-based SQLite database in a temporary folder, the location of which will be shown at startup. Phoenix also supports PostgresSQL as shown below:

    • PostgreSQL, e.g. postgresql://@host/dbname?user=user&password=password or postgresql://user:password@host/dbname

    • SQLite, e.g. sqlite:///path/to/database.db

  • PHOENIX_ENABLE_PROMETHEUS: Whether to enable Prometheus metrics at port 9090. Defaults to false.

  • PHOENIX_SERVER_INSTRUMENTATION_OTLP_TRACE_COLLECTOR_HTTP_ENDPOINT: Specifies an HTTP endpoint for the OTLP trace collector. Specifying this variable enables the OpenTelemetry tracer and exporter for the Phoenix server.

  • PHOENIX_SERVER_INSTRUMENTATION_OTLP_TRACE_COLLECTOR_GRPC_ENDPOINT: Specifies an gRPC endpoint for the OTLP trace collector. Specifying this variable enables the OpenTelemetry tracer and exporter for the Phoenix server.

Notebook Configuration

The following environment variables will control your notebook environment.

  • PHOENIX_NOTEBOOK_ENV: The notebook environment. Typically you do not need to set this but it can be set explicitly (e.x. sagemaker)

  • PHOENIX_COLLECTOR_ENDPOINT: The endpoint traces and evals are sent to. This must be set if the Phoenix server is running on a remote instance. For example if phoenix is running at http://125.2.3.5:4040 , this environment variable must be set where your LLM application is running and being traced. Note that the endpoint should not contain trailing slashes or slugs.

  • PHOENIX_PROJECT_NAME: The project under which traces will be sent. See projects.

Last updated