> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140-claude-release-notes-2026-07-29.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

<Columns cols={2}>
  <Card title="From the Terminal" img="https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/96785dbd-image.jpeg" href="/docs/phoenix/environments#terminal">
    Run Phoenix via the CLI on your local machine
  </Card>

  <Card title="As a Container" img="https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/09a1b0fb-image.jpeg" href="/docs/phoenix/self-hosting">
    Self-host your own Phoenix
  </Card>

  <Card title="In a Notebook" img="https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/bac66bfa-image.jpeg" href="/docs/phoenix/environments#notebooks">
    Run Phoenix in the notebook as you run experiments
  </Card>
</Columns>

<Check>
  If you are set up, see [Quickstarts](/docs/phoenix/get-started) to start using Phoenix in your preferred environment.
</Check>

### Remote deployments

Any Phoenix instance that isn't running on the same machine as your app — a container, a Kubernetes deployment, or a managed host — is reached the same way: point `PHOENIX_COLLECTOR_ENDPOINT` at its hostname, and supply an API key if it has [authentication](/docs/phoenix/self-hosting/features/authentication) enabled.

```python theme={null}
import os

os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "https://your-phoenix.example.com"

# Only if the deployment has authentication enabled
os.environ["PHOENIX_API_KEY"] = "ADD YOUR PHOENIX API KEY"
```

### Container

See [Self-Hosting](/docs/phoenix/self-hosting).

### Notebooks

To start phoenix in a notebook environment, run:

```python theme={null}
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).

<Info>
  By default, Phoenix does not persist your data when run in a notebook.
</Info>

### Terminal

If you want to start a phoenix server to collect traces, you can also run phoenix directly from the command line:

```sh theme={null}
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>`)

## Configuration & environment variables

Phoenix reads its connection settings from environment variables. Three of them are easy to confuse, so it's worth being precise about what each one is for:

| Variable | What it is | When to set it |
| - | - | - |
| `PHOENIX_COLLECTOR_ENDPOINT` | The base URL of the Phoenix server that **receives your traces** (the OTel collector). Set the base URL only — e.g. `http://localhost:6006` or `https://your-phoenix.example.com` — not a full `/v1/traces` path. | Whenever your app and the Phoenix server are not on the same machine. This is the variable the tracing SDKs (`register()`) use. |
| `PHOENIX_API_KEY` | The credential used to **authenticate** to a Phoenix instance that has [authentication](/docs/phoenix/self-hosting/features/authentication) enabled. | When connecting to any authenticated deployment. A local `phoenix serve` needs none. |
| `PHOENIX_CLIENT_HEADERS` | Extra headers (JSON) sent with every request, e.g. `api_key=...`. | Only when a deployment requires custom headers. |

<Warning>
  Point `PHOENIX_COLLECTOR_ENDPOINT` at the server's **base URL**. Setting it (or the legacy `PHOENIX_HOST`) to a full endpoint path such as `.../v1/traces` will misconfigure the exporter and your traces will not arrive.
</Warning>

### Choosing a project

`PHOENIX_PROJECT` selects the project that project-scoped operations write to and read from. `PHOENIX_PROJECT_NAME` is a supported alias for the same setting. When both are set, `PHOENIX_PROJECT` wins and Phoenix logs a one-time conflict warning. If neither is set, the project defaults to `"default"`.

```python theme={null}
import os

os.environ["PHOENIX_PROJECT"] = "my-app"   # canonical
# PHOENIX_PROJECT_NAME is accepted as an alias for the same value
```

### Credential file discovery (`.env.phoenix`)

Instead of exporting variables in every shell, you can drop `PHOENIX_`-prefixed settings into a `.env.phoenix` file. The Phoenix SDKs and CLI auto-discover it: starting from the current working directory they walk **up** toward the filesystem root and load the first `.env.phoenix` they find (dotenv format).

```bash theme={null}
# .env.phoenix
PHOENIX_COLLECTOR_ENDPOINT=http://localhost:6006
PHOENIX_API_KEY=your-api-key
PHOENIX_PROJECT=my-app
```

A few rules worth knowing:

* **The process environment always wins.** A value already set in the environment is never overridden by the file.
* **The filename is `.env.phoenix`**, not `.env`.
* **Add it to your ignore rules** before storing credentials in it — the Phoenix repository already git-ignores `.env.phoenix`.
* **Opt out** by setting `PHOENIX_DISCOVER_CONFIG=false` (also accepts `0`, `no`, `off`), which disables file discovery entirely.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.