Deploy AgenticOS
Self-hosted AI agents for teams: tools, knowledge bases, Slack, approvals
Just deployed
AgenticOS
Just deployed
Postgres
Just deployed
/var/lib/postgresql/data
Just deployed
Just deployed
Files
Bucket
Just deployed
Deploy and Host AgenticOS on Railway
AgenticOS is an open-source platform where a team builds and runs its AI agents together: agents with tools, knowledge bases and 4,700+ MCP servers, shared chat, routines that run on a schedule, approvals before risky actions, budgets, an audit trail, and connections to Slack, Mattermost, Telegram and more. It works with your own model keys (OpenAI, Anthropic, Google, OpenRouter and others) and is licensed Apache-2.0. This template runs AgenticOS 1.101.0 on Railway: the web app, the API, the background worker, Postgres with pgvector, Redis and a bucket for files, with your owner account ready on the first boot and sign-up closed to invitations.
This is a community template, not made or supported by the AgenticOS authors.
About Hosting AgenticOS
Before deploying, set ADMIN_EMAIL on the API service to your email. Optionally set BOOTSTRAP_API_KEY to a key for BOOTSTRAP_PROVIDER (openai by default; also anthropic, google or openrouter) so the demo agent answers straight away. Deploy and wait for the green checks: the first boot applies the database migrations and creates your account, which takes a few minutes. Then open the AgenticOS service's Railway domain and sign in with ADMIN_EMAIL and the generated ADMIN_PASSWORD from the API service's Variables tab. Change the password under your profile afterwards; the variable is only used on the first boot.
Plan: AgenticOS needs the Hobby plan or higher. At rest the API uses about 0.85 GB (up to 1.6 GB while its first boot migrates) and the worker about 1.2 GB, more than the Free (0.5 GB) and Trial (1 GB) plans allow a service. On those plans every service shows a page saying so instead of being killed for memory over and over; upgrade the workspace and redeploy.
Why sign-up is closed: AgenticOS lets anyone register by default, and on a public address that would admit strangers. The template switches it to invite only on the first boot. Invite your team from the Organization page; to change the policy, open Admin > Deployment > Access & accounts. The sign-in page still shows a Register link, but it refuses anyone without an invitation.
Model keys: if you skipped BOOTSTRAP_API_KEY, add one under Connections > Vault, then choose the model for each agent in its Agent Builder (the Architect and the AgenticOS assistant both start without one). Keys and tokens you store are encrypted with VAULT_MASTER_KEY. Keep that variable: if it is lost or changed, every stored key has to be entered again.
Your data: users, agents, chats, knowledge bases and their embeddings are in the Postgres service, on its volume. Uploaded documents, chat attachments and generated images live in the Files bucket, which the API and the worker both use. Redis only holds rate limits and live updates. Redeploys keep everything, and the API applies AgenticOS's migrations on every start, so a new image upgrades the database by itself.
Custom domains: add one to the AgenticOS service and one to the API service. Then on the API set FRONTEND_URL and PUBLIC_SITE_URL to the web address, add it to CORS_ORIGINS, and set PUBLIC_BASE_URL, PUBLIC_API_URL and PUBLIC_WS_URL (wss://) to the API address; on the AgenticOS service set PUBLIC_SITE_URL, PUBLIC_API_URL and PUBLIC_WS_URL to match. Redeploy all three app services.
Optional extras, added to the API and Worker services any time:
- Email for invitations and notifications:
SMTP_HOST,SMTP_PORT,SMTP_USER,SMTP_PASSWORD,EMAIL_FROM - Google, GitHub or OIDC sign-in: the variables in the configuration reference, then list the providers in
OAUTH_PROVIDERSon the AgenticOS service
What is not included: AgenticOS's code sandbox (sandboxd) and its private browser containers start throwaway Docker containers, which needs a Docker daemon that Railway does not give a service. Agents work without them; to give agents code execution, register a remote sandbox under Connections > Sandboxes.
Common Use Cases
- An internal AI assistant for a team, answering from its own knowledge base of your documents
- Agents that work in Slack, Mattermost or Telegram, asking for approval before risky actions
- Scheduled routines: weekly reports, inbox triage, research digests
- One place to build, test and share agents across a company, with budgets per team
- A self-hosted alternative to ChatGPT Enterprise or Grok Bot on your own model keys
Dependencies for AgenticOS Hosting
- Postgres 16 with pgvector, Redis (Valkey) and a Railway bucket (all included)
- An API key from a model provider: OpenAI, Anthropic, Google, OpenRouter or another
Deployment Dependencies
Implementation Details
- Services: AgenticOS (the web app, on the public domain), API (on its own public domain, which the browser, Slack and webhooks call), Worker (agent runs, schedules, document ingestion and syncs), Postgres 16 with pgvector 0.8.7, Redis (Valkey 8.1) and the Files bucket.
- Images: small wrappers over upstream's pinned
ghcr.io/vstorm-co/agenticos-backendandagenticos-frontend1.101.0, built ahead of time, so a deploy pulls them instead of building. One backend image serves the API and the worker;AGENTICOS_SERVICEpicks the role. - First boot: the API applies the migrations, closes sign-up to invitations, and runs AgenticOS's own
bootstrapto create the owner, the organization and the demo agent. It runs while no user exists, so it never repeats once you have signed in. The worker waits until the database is up to date before it starts. - Files in a bucket, not on a volume: a Railway volume attaches to one service, and the worker reads the documents the API receives, so uploads go to the Files bucket (
FILE_STORAGE_BACKEND=s3). - Never crash-looping on a variable: if a required variable is empty,
ADMIN_EMAILis not an email, the plan is too small, or the migrations keep failing, the API and the web app show a page saying what to fix instead of restarting over and over, and the deploy logs say the same. - Scaling:
UVICORN_WORKERSsets the API processes (1 by default, about 0.8 GB each) andWORKER_INGEST_CHILDRENthe document parsers (1, about 0.4 GB each). Raise them together with the services' memory for a busy deployment.
Why Deploy AgenticOS 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 AgenticOS 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.
Template Content
Postgres
pgvector/pgvector:0.8.7-pg16ADMIN_EMAIL
The email you sign in with. The owner account is created with it on the first boot.
Files
Bucket

