---
title: "Deploy Agenta"
description: "Open-source LLMOps: prompt playground, evaluations and LLM observability"
category: "AI/ML"
url: https://railway.com/deploy/agenta
---

# Deploy Agenta

Open-source LLMOps: prompt playground, evaluations and LLM observability

**[Deploy Agenta on Railway](https://railway.com/template/agenta)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/agenta/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### supertokens https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template
- **Health check:** /hello

### api https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template
- **Health check:** /health

### services https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template
- **Health check:** /health

### gateway https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

### cron https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template

### web https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template

### worker-streams https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template

### worker-queues https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### web-mobile https://cdn.jsdelivr.net/gh/Agenta-AI/agenta@v0.131.0/web/oss/public/assets/logos/Agenta-symbol-dark-accent.svg

- **Source:** https://github.com/aalfath/agenta-railway-template

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Agenta on Railway

Agenta is an open-source LLMOps platform (MIT) for teams building LLM apps. It gives you a prompt playground across many model providers, versioned prompt management with environments, evaluations with built-in and custom evaluators, human annotation, and LLM observability through OpenTelemetry tracing. This template runs Agenta v0.131.0, the open-source edition.

## About Hosting Agenta

Agenta runs as several services: a FastAPI backend that owns the database and migrations, two background workers (trace ingestion, evaluations), a cron runner, a playground runtime, a desktop and a mobile Next.js app, and SuperTokens for sign-in. They share Postgres and Redis, and an nginx gateway puts them behind one URL. This template wires all of it over Railway's private network. On first boot the API creates its databases, runs migrations and creates your owner account, so nobody else can take over the instance. Each service fits in 0.5 GB RAM. Updates arrive as Railway update notices when we bump the pinned version.

## Common Use Cases

* Compare prompts and models side by side in a playground, then version the winner and ship it to production by environment
* Run evaluations on test sets with LLM-as-a-judge, exact match, JSON or custom code evaluators before you change a prompt
* Trace your LLM app or agent in production with the Agenta SDK or any OpenTelemetry exporter, and annotate traces with your team

## Dependencies for Agenta Hosting

* PostgreSQL (Railway Postgres): Agenta core, tracing and SuperTokens data
* Redis (Railway Redis): caches, streams and task queues
* An API key for at least one LLM provider (OpenAI, Anthropic, Gemini, Mistral, Groq, any OpenAI-compatible endpoint…), added in the app

### Deployment Dependencies

* Agenta source and images: https://github.com/Agenta-AI/agenta (release v0.131.0)
* Template repo (Dockerfiles, start scripts, changelog): https://github.com/aalfath/agenta-railway-template
* Agenta self-hosting docs: https://agenta.ai/docs/self-host/quick-start

### Implementation Details

**Services**

* `gateway`: nginx, the public URL. `/` web app, `/m` mobile app, `/api` API, `/services` playground runtime
* `api`: FastAPI backend; runs migrations under a Postgres lock and creates the owner account on first boot
* `worker-streams`, `worker-queues`: trace ingestion and evaluation workers
* `cron`: scheduled evaluation and trigger refreshes
* `services`: playground and workflow runtime that calls your LLM provider
* `web`, `web-mobile`: the desktop and mobile web apps
* `supertokens`: sign-in backend
* `Postgres`, `Redis`: Railway databases with volumes

**After deploy**

1. Enter your email in `AGENTA_ADMIN_EMAIL` when you deploy. It becomes the owner account, and only it may create organisations.
2. Open the `gateway` URL and sign in with that email and the generated `AGENTA_ADMIN_PASSWORD` (in the `api` service's Variables tab).
3. Add your LLM provider key under Settings → Model hub, then open the playground.
4. Send traces with the Agenta SDK: `ag.init(host="https://YOUR-DOMAIN", api_key="YOUR-AGENTA-API-KEY")`. Create the key under Settings → API keys.

**Notes**

* Not included: the agent runner (its 4.9 GB image is above the 4 GB image limit of Railway's Free and Trial plans, and its file mounts need FUSE) and the SeaweedFS store that only the runner uses. Prompts, evaluations and observability don't need them.
* Analytics to Agenta's PostHog are off unless you set `POSTHOG_API_KEY`. Email (SMTP or SendGrid) and Google/GitHub sign-in are optional: set upstream's variables on `api`, `web` and `web-mobile`.
* Updates: we bump the pinned images in the template repo and Railway shows you an update notice. Read the repo's CHANGELOG, then apply it. The API runs new migrations on start.

## Why Deploy Agenta on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Agenta on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/agenta
