# Self-host Promptfoo

> Test and compare prompts, models and agents with a local web UI for browsing evaluation results. Runs the viewer with results stored on a volume.

- Page: https://levelrail.com/templates/promptfoo/
- JSON: https://levelrail.com/templates/promptfoo.json
- Category: AI
- Licence: MIT (Permissive license)
- Source: https://github.com/promptfoo/promptfoo
- Upstream docs: https://www.promptfoo.dev/docs/

## Requirements
- Memory: about 256 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 0.125.1

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| promptfoo | ghcr.io/promptfoo/promptfoo | 0.125.1 | 3000 | data -> /home/promptfoo/.promptfoo |

## Deploy

### CLI

```bash
levelrail-cli templates deploy promptfoo --name my-promptfoo
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/promptfoo/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Open the address to browse evals. Run evaluations from the CLI with this server as the share target.

## Questions

### Can I deploy Promptfoo on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Promptfoo, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image ghcr.io/promptfoo/promptfoo:0.125.1 is what you deploy there.

Self-host Promptfoo, Promptfoo docker compose file, deploy Promptfoo on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
