Deploy Agenta.ia
Agenta (open-source LLMOps) on Railway - 14-service OSS stack
supertokens
Just deployed
Just deployed
seaweedfs
Just deployed
Just deployed
worker-streams
Just deployed
Postgres
Just deployed
Just deployed
Just deployed
Just deployed
web-mobile
Just deployed
Just deployed
Just deployed
worker-queues
Just deployed
Just deployed
Deploy and Host Agenta on Railway
Agenta is an open-source LLMOps platform for building, evaluating and shipping LLM applications. This template deploys the complete Agenta OSS stack — 14 services behind a single HTTPS domain — pinned to Agenta v0.121.5.
About Hosting Agenta
Hosting Agenta on Railway gives you the full open-source platform as a managed multi-service stack: a Next.js studio, a FastAPI core with evaluations and tracing, a workflow/agent runtime, background workers, PostgreSQL, Redis, an S3-compatible object store and SuperTokens auth.
Only the nginx gateway is exposed publicly. Every other service is reached over Railway's private network, so your database, cache and object store are never internet-facing.
Deploying from this template means the topology, start commands, healthchecks, pinned image versions and generated secrets are already correct — you get a working instance instead of a build list.
Common Use Cases
- Prompt and version management — iterate on prompts in the studio and track every change.
- Evaluation and tracing — run datasets and evaluators, then inspect traces, scores and latency.
- Agent and workflow execution — the runner plus the services plane execute agent and workflow graphs.
- A self-hosted, vendor-neutral alternative to a proprietary LLM platform.
- Internal AI tooling for teams that need prompts, datasets and eval data to stay in their own infrastructure.
Dependencies for Agenta Hosting
- A Railway project — this template creates 14 services in it.
opensslandcoreutilsinside the wrapper images (already present in the base images).- A supported LLM provider key, added after deploy from the studio UI.
Deployment Dependencies
- Agenta release images
ghcr.io/agenta-ai/agenta-{api,web,web-mobile,services,runner}:v0.121.5 supertokens/supertokens-postgresql:11- Wrapper images from this repo:
gateway/(nginx edge),api/(durable object-store signing key plus ordered startup),postgres/(postgres:17with an initdb that creates the three Agenta databases),redis/(redis:8with a volume-safe/data) andseaweedfs/(chrislusf/seaweedfs:4.47with STS/IAM config rendered from env) - Dockerfiles and configuration: github.com/BURNI80/agenta-railway-template
Why Deploy Agenta on Railway?
Railway hosts the whole stack so you don't assemble it by hand. The 14 services, their private networking, the generated secrets, the healthchecks and the reverse proxy come pre-wired, and a single public domain serves the studio, the API and the services plane.
And it stays portable: every service is either a pinned public image or a small wrapper Dockerfile in this repo, so you can move the stack to another host later instead of being locked in.
What's included
| Service | Source | Public | Health | Purpose |
|---|---|---|---|---|
| gateway | gateway/Dockerfile | ✅ HTTPS | /healthz | Single nginx entrypoint: routes /, /m, /api/, /services/ |
| web | agenta-web:v0.121.5 | — | — | Next.js desktop studio |
| web-mobile | agenta-web-mobile:v0.121.5 | — | — | Mobile studio, served at /m |
| api | api/Dockerfile | — | /health | FastAPI core + JWKS for the object store |
| services | agenta-services:v0.121.5 | — | /health | Workflow and agent invocation runtime |
| runner | agenta-runner:v0.121.5 | — | — | Agent execution harness |
| worker-streams | agenta-api:v0.121.5 | — | — | Tracing / events / records consumers |
| worker-queues | agenta-api:v0.121.5 | — | — | Webhooks, triggers, interactions, evaluations |
| cron | agenta-api:v0.121.5 | — | — | Scheduled jobs (supercronic) |
| alembic | agenta-api:v0.121.5 | — | — | One-shot database bootstrap and migrations |
| supertokens | supertokens-postgresql:11 | — | — | Auth core (sessions, API keys) |
| Postgres | postgres/Dockerfile | — | — | agenta_oss_core, agenta_oss_tracing, agenta_oss_supertokens |
| redis | redis/Dockerfile | — | — | Cache / queues / streams, volume-backed |
| seaweedfs | seaweedfs/Dockerfile | — | — | Durable object store with STS/OIDC IAM |
Every secret is generated by Railway at deploy time and never stored in the repository:
AGENTA_AUTH_KEY, AGENTA_CRYPT_KEY, AGENTA_SERVICES_INTERNAL_KEY, AGENTA_RUNNER_TOKEN,
POSTGRES_PASSWORD, and SeaweedFS's AGENTA_STORE_ACCESS_KEY / AGENTA_STORE_SECRET_KEY /
AGENTA_STORE_SIGNING_KEY.
Deploy
- Click Deploy on Railway.
- Railway provisions the 14 services and generates every secret.
- Attach the four volumes (see below) — Railway's service filesystem is ephemeral.
- First deploy takes ~8–15 min: five small wrapper images are built and the Agenta images are
pulled cold.
alembiccreates and migrates the three databases;supertokens, the API and the workers wait for it (or retry until it finishes). - Open the gateway URL and create the first account — it becomes the instance admin.
Volumes
Anything that must survive a redeploy needs a volume. Create these four right after the first deploy, before storing real data:
| Service | Mount path | Why |
|---|---|---|
Postgres | /var/lib/postgresql/data | All Agenta data (core, tracing, supertokens schemas) |
redis | /data | Cache, queues and streams (AOF) |
seaweedfs | /data | Durable object store (assets, prompt artifacts) |
api | /var/lib/agenta | Durable RSA key for object-store mount URLs; without it the key is regenerated on every redeploy and previously signed URLs break |
Dashboard: open the service → Volumes → Add Volume. Or from the CLI:
railway volume --service Postgres add --mount-path /var/lib/postgresql/data
railway volume --service redis add --mount-path /data
railway volume --service seaweedfs add --mount-path /data
railway volume --service api add --mount-path /var/lib/agenta
Attaching a volume redeploys that service, so the stack bounces once; Postgres runs initdb on the
fresh volume and alembic re-applies the migrations.
Cost
A 14-service stack with four stateful services does not fit in Railway's $5/month Hobby
credit. Rough order of magnitude while idle:
| Component | Rough monthly |
|---|---|
| 8 always-on app services (api, services, runner, 2× web, 2× worker, cron) @ ~0.3–0.6 GB | ~$15–30 |
| Postgres + Redis + SeaweedFS + gateway + supertokens | ~$8–15 |
| Volumes | ~$1–2 |
| Total | ~$25–45 / month |
Railway bills per second of actual usage, so cost tracks traffic. To trim it, put web,
web-mobile, worker-* and runner on sleep mode (Serverless), drop web-mobile and runner
if unused, or lower the workers' resource limits.
Post-deploy
- Create the first user at the gateway URL (it becomes admin).
- Add a model provider key: Settings → Models / Providers. A self-hosted or OpenAI-compatible endpoint works too.
- (Optional)
COMPOSIO_API_KEYonapiandservicesenables Composio tools and triggers. - (Optional)
DAYTONA_API_KEYonrunnermoves sandboxes to Daytona; the default islocal. - (Optional)
SMTP_*orSENDGRID_API_KEYonwebenables signup emails.
Troubleshooting
Gateway returns 502/504 right after deploy. An upstream is still starting; the workers and
supertokens also restart a few times until Postgres and Redis are ready. Wait for the api and
services healthchecks to go green — the gateway re-resolves Railway private DNS every 5 s.
redis crash-loops with MISCONF ... unable to persist. The /data volume is root-owned. The
Redis wrapper chowns it on boot; keep RAILWAY_RUN_UID=0 and RAILWAY_RUN_GID=0 on redis.
Agent file writes are lost or mount signing returns 503. Check that
AGENTA_STORE_JWT_ISSUER on seaweedfs is http://api.railway.internal:8000/api and that api
is healthy (it serves /api/.well-known/jwks.json).
Start over. Delete the Postgres, redis, seaweedfs and api volumes, then redeploy.
Full documentation — repository layout, architecture rationale, upgrade path and template maintenance — lives in BURNI80/agenta-railway-template.
Live demo: gateway-production-0822.up.railway.app
Agenta is built and licensed by Agentatech UG (MIT outside ee/). This template ships no Agenta
source code — only deployment packaging and documentation. Not affiliated with or endorsed by
Agenta or Railway.
Template Content
supertokens
supertokens/supertokens-postgresql:11seaweedfs
BURNI80/agenta-railway-templateworker-streams
ghcr.io/agenta-ai/agenta-api:v0.121.5Postgres
BURNI80/agenta-railway-templateworker-queues
ghcr.io/agenta-ai/agenta-api:v0.121.5