> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.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="Phoenix Cloud" img="https://storage.googleapis.com/arize-phoenix-assets/assets/images/phoenix-docs-images/e9f91420-image.jpeg" href="https://app.phoenix.arize.com/login">
    Connect to a pre-configured, managed Phoenix instance
  </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>

  <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>
</Columns>

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

### Phoenix Cloud

[Phoenix Cloud](https://app.phoenix.arize.com/) 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:

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