Deploy Agenta IA

Agenta (open-source LLMOps) on Railway - 14-service OSS stack (1 click)

Deploy Agenta IA

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.
  • openssl and coreutils inside 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:17 with an initdb that creates the three Agenta databases), redis/ (redis:8 with a volume-safe /data) and seaweedfs/ (chrislusf/seaweedfs:4.47 with 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

ServiceSourcePublicHealthPurpose
gatewaygateway/Dockerfile✅ HTTPS/healthzSingle nginx entrypoint: routes /, /m, /api/, /services/
webagenta-web:v0.121.5——Next.js desktop studio
web-mobileagenta-web-mobile:v0.121.5——Mobile studio, served at /m
apiapi/Dockerfile—/healthFastAPI core + JWKS for the object store
servicesagenta-services:v0.121.5—/healthWorkflow and agent invocation runtime
runneragenta-runner:v0.121.5——Agent execution harness
worker-streamsagenta-api:v0.121.5——Tracing / events / records consumers
worker-queuesagenta-api:v0.121.5——Webhooks, triggers, interactions, evaluations
cronagenta-api:v0.121.5——Scheduled jobs (supercronic)
alembicagenta-api:v0.121.5——One-shot database bootstrap and migrations
supertokenssupertokens-postgresql:11——Auth core (sessions, API keys)
Postgrespostgres/Dockerfile——agenta_oss_core, agenta_oss_tracing, agenta_oss_supertokens
redisredis/Dockerfile——Cache / queues / streams, volume-backed
seaweedfsseaweedfs/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

  1. Click Deploy on Railway.
  2. Railway provisions the 14 services and generates every secret.
  3. Attach the four volumes (see below) — Railway's service filesystem is ephemeral.
  4. First deploy takes ~8–15 min: five small wrapper images are built and the Agenta images are pulled cold. alembic creates and migrates the three databases; supertokens, the API and the workers wait for it (or retry until it finishes).
  5. 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:

ServiceMount pathWhy
Postgres/var/lib/postgresql/dataAll Agenta data (core, tracing, supertokens schemas)
redis/dataCache, queues and streams (AOF)
seaweedfs/dataDurable object store (assets, prompt artifacts)
api/var/lib/agentaDurable 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:

ComponentRough 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

  1. Create the first user at the gateway URL (it becomes admin).
  2. Add a model provider key: Settings → Models / Providers. A self-hosted or OpenAI-compatible endpoint works too.
  3. (Optional) COMPOSIO_API_KEY on api and services enables Composio tools and triggers.
  4. (Optional) DAYTONA_API_KEY on runner moves sandboxes to Daytona; the default is local.
  5. (Optional) SMTP_* or SENDGRID_API_KEY on web enables 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

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
7
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
82