frequently-asked-questions.md•3.39 kB
## FAQs
### Permission denied writing to disc
Some phoenix containers run as nonroot and therefore must be granted explicit write permissions to the mounted disc (see [https://kubernetes.io/docs/tasks/configure-pod-container/security-context/](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)). Phoenix 4.1.3 and above run as root by default to avoid this. However there are `debug` and `nonroot` variants of the image as well.
### How do I configure Phoenix for air-gapped deployments?
For air-gapped environments where external network access is restricted, you should disable external resource loading to improve UI performance. This prevents Phoenix from attempting to load external resources like Google Fonts, which can cause UI loading delays (10-20 seconds) in environments without internet access.
Set the `PHOENIX_ALLOW_EXTERNAL_RESOURCES` environment variable to `false`:
**Docker Example:**
```yaml
services:
phoenix:
image: arizephoenix/phoenix:latest # Must be version 11.15.0 or later
ports:
- 6006:6006
- 4317:4317
environment:
- PHOENIX_ALLOW_EXTERNAL_RESOURCES=false
```
**Environment Variable:**
```bash
export PHOENIX_ALLOW_EXTERNAL_RESOURCES=false
```
{% hint style="info" %}
The `PHOENIX_ALLOW_EXTERNAL_RESOURCES` environment variable was added in Phoenix version 11.15.0. It defaults to `true` and only needs to be set to `false` in air-gapped deployments where external network access is not available.
{% endhint %}
### How do I configure automatic trace retention and cleanup?
Phoenix supports automatic trace retention policies to help manage storage and comply with data retention requirements. You can configure the default retention policy at deployment time using the `PHOENIX_DEFAULT_RETENTION_POLICY_DAYS` environment variable.
**Basic Configuration:**
Set the environment variable to the number of days you want to retain traces:
```bash
# Keep traces for 30 days
export PHOENIX_DEFAULT_RETENTION_POLICY_DAYS=30
# Keep traces for 7 days
export PHOENIX_DEFAULT_RETENTION_POLICY_DAYS=7
# Infinite retention (default)
export PHOENIX_DEFAULT_RETENTION_POLICY_DAYS=0
```
**Docker Example:**
```yaml
services:
phoenix:
image: arizephoenix/phoenix:latest
ports:
- 6006:6006
- 4317:4317
environment:
- PHOENIX_DEFAULT_RETENTION_POLICY_DAYS=30
```
**Kubernetes/Helm Example:**
```yaml
# values.yaml
database:
defaultRetentionPolicyDays: 30
```
**Key Points:**
- **Default value is 0** (infinite retention) - no traces are automatically deleted
- **Applies to all projects** by default, but individual projects can override this through the Phoenix UI
- **Cleanup runs weekly** according to the configured schedule (Sunday at midnight by default)
- **Only affects the default policy** - you can still create custom retention policies for specific projects
- **Changes to this setting** will update the default policy but won't affect existing project-specific policies
For more advanced retention policy configurations and per-project settings, see the [data retention documentation](../../settings/data-retention.md).
{% hint style="warning" %}
Be careful when setting retention policies in production. Once traces are deleted, they cannot be recovered. Always test your retention policy configuration in a non-production environment first.
{% endhint %}