Deploy a13n
Deploy a13n on Railway. Run and manage AI agents. Always latest.
Redis
Just deployed
/data
Just deployed
/app/var
Just deployed
/var/lib/postgresql/data
Deploy and Host a13n on Railway
a13n Service is an open-source runtime for managing and running AI agents on your own infrastructure. Use Console to configure an agent, try it in a conversation, and debug its tool calls, then call that same agent from your application through the HTTP API or a Python, TypeScript, Go, or Rust SDK. Service handles execution and recovery for those requests.
About Hosting a13n
Hosting a13n takes the official image (ghcr.io/converge-ai-labs/a13n-service:latest), PostgreSQL, Redis, and one volume at /app/var. A new deploy or rebuild pulls the newest release. The process listens on port 8000 and serves Console and the API from one origin: open the public domain for Console; the API is under /api/v1. The schema migrates automatically on startup, and on first start the service generates an encryption key at /app/var/encryption.key. Railway mounts volumes as root, so this template starts the container as root and hands /app/var to the image's app user before the service starts. No Docker socket is mounted, so a Docker sandbox is not provisioned automatically; model-only conversations still work, and you can add a cloud sandbox provider later in Console.
Common Use Cases
- Configure agents in Console, try them in a conversation, and inspect tool calls
- Call the same agents from an app through the HTTP API or the Python, TypeScript, Go, or Rust SDKs
- Keep long-running tasks going after a client disconnects, and resume interrupted runs from checkpoints
- Connect your own model providers (OpenAI, Anthropic, Gemini, or an OpenAI-compatible server)
- Invite a team into a workspace, then inspect usage and cost in Console
Dependencies for a13n Hosting
- Official image
ghcr.io/converge-ai-labs/a13n-service:latest(linux/amd64 and linux/arm64) - PostgreSQL (durable state). The connection URL must use the
postgresql+psycopg://scheme - Redis (live streams, wakeups, rate limits, and monitoring coordination)
- One persistent volume at
/app/var(encryption key plus local object storage) - Your own model-provider API keys, added in Console after deploy
- Optional: a sandbox provider configured in Console (E2B, Daytona, Modal, and others) if agents need files or a shell
- Optional: SMTP (
A13N_AUTH__MAILas a JSON object) for invitations, password resets, and email-change links
Deployment Dependencies
Implementation Details
Environment variables:
| Variable | Value | Notes |
|---|---|---|
PORT | 8000 | Port the service listens on. Railway uses it for routing and the health check. |
RAILWAY_RUN_UID | 0 | Runs the container as root so the start command can hand the /app/var volume to the app user. |
A13N_SERVER__PUBLIC_URL | https://${{RAILWAY_PUBLIC_DOMAIN}} | External HTTPS origin. Browser auth uses this origin. |
A13N_DATABASE__URL | postgresql+psycopg://${{Postgres.PGUSER}}:${{Postgres.PGPASSWORD}}@${{Postgres.PGHOST}}:${{Postgres.PGPORT}}/${{Postgres.PGDATABASE}} | Must use the postgresql+psycopg:// scheme. |
A13N_REDIS__URL | ${{Redis.REDIS_URL}} | Redis connection URL. |
A13N_ENCRYPTION__KEY_FILE | /app/var/encryption.key | Generated on first start if missing. Back it up with the database: stored credentials cannot be read without it. |
A13N_PROVIDERS__RETURN_URLS | ["https://${{RAILWAY_PUBLIC_DOMAIN}}/connections/callback"] | JSON array, so app-connection OAuth callbacks return to this origin. |
Optional mail goes in A13N_AUTH__MAIL as one JSON object (smtp_host, smtp_port, smtp_security, smtp_username, smtp_password, sender).
Start command:
sh -c "chown -R app:app /app/var && exec a13n-entrypoint a13n-service --config /app/service.toml run"
It fixes the volume owner as root, then runs the image's own entrypoint, which drops to the app user.
Volume: /app/var on the a13n service.
Health check: GET /readyz on port 8000. The first boot runs migrations, so it can take a moment.
First run:
- Wait until the service is healthy (the first boot may take a moment while migrations run).
- Open the public domain right away and register with your email and a password of at least 8 characters. There is no default administrator: the first person to register becomes the administrator.
- Open Models → Add model, connect a provider with your API key, and add a model.
- Open Agents → Create manually, attach that model, then Try agent to send a message.
- On the same agent, choose Connect to app for the Service URL, agent ID, and an API key.
Why Deploy a13n 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 a13n 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.
This template uses the official latest tag, PostgreSQL, Redis, and a single /app/var volume.
Template Author
Created and maintained by Douglas Rubim.
GitHub: https://github.com/douglasrubims
Template Content

