Deploy Open Agent Connector
Self-hosted gateway for AI agents to run app actions over MCP or REST
Just deployed
/app/data
Just deployed
Deploy and Host Open Agent Connector on Railway
Open Agent Connector is an open-source, self-hosted integration gateway for AI agents, an open alternative to Composio. You connect app accounts (API keys or OAuth) once, and agents discover and run actions from a catalogue of about 260 providers and 8,500 actions over MCP or a REST API, with scoped, revocable tokens.
About Hosting Open Agent Connector
Hosting Open Agent Connector means running two parts: a FastAPI backend that stores connections, encrypted credentials, runtime tokens and run logs in SQLite, and a Next.js console. They have to be served on one origin, with API paths routed to the backend. The backend needs a stable admin token and a stable encryption key, because a lost key makes every stored credential unreadable. Its data must sit on persistent storage. For OAuth providers, the public URL must be known so the callback URLs are correct. This template builds both parts from a pinned upstream commit, generates the token and key, and wires everything over Railway's private network.
Common Use Cases
- Give Claude, Cursor or another MCP client access to GitHub, Slack, Notion, Google and hundreds of other apps through one authenticated MCP endpoint
- Keep third-party API keys and OAuth tokens on your own server and hand agents only scoped, revocable runtime tokens
- Run app actions from scripts or backends through one REST API, with a run log of every call
Dependencies for Open Agent Connector Hosting
- The
apiservice (FastAPI backend, SQLite on a Railway volume) - The
webservice (Next.js console behind Caddy, which routes/api,/v1,/mcpand/docstoapi)
Deployment Dependencies
- Open Agent Connector source: https://github.com/Anil-matcha/open-agent-connector
- Template repo (Dockerfiles, start scripts, changelog): https://github.com/aalfath/open-agent-connector-railway-template
Implementation Details
Services. web is the only public service and serves the console and the API on one domain. api is private; its SQLite database lives on a volume at /app/data. Both build from our template repo, which pins upstream commit 3cde269 (upstream has no release tags or images).
After deploy. Nothing to fill in: the admin token and encryption key are generated. Open the api service's Variables tab, copy CONNECTOR_ADMIN_TOKEN, and sign in at your web domain. Add a connection on Connections, then create a scoped runtime token on Tokens for your agent. The console and the MCP gateway always need a token; anonymous access is switched off.
MCP client. Replace the domain and token:
{
"mcpServers": {
"open-agent-connector": {
"url": "https://YOUR-DOMAIN/mcp",
"headers": { "Authorization": "Bearer YOUR-RUNTIME-TOKEN" }
}
}
}
REST: POST https://YOUR-DOMAIN/v1/actions/ACTION-ID with the same header. API docs are at https://YOUR-DOMAIN/docs.
OAuth providers (optional). Register an OAuth app with the provider and use https://YOUR-DOMAIN/api/oauth/SERVICE/callback as its redirect URL. API-key providers need no extra setup.
Keep the key. Never change CONNECTOR_ENCRYPTION_KEY: stored credentials can't be decrypted without it. Back up the volume and the key together.
Resources. Each service fits Railway's 0.5 GB RAM limit: api uses about 275 MB after boot and stayed under 380 MB under load in our test, web about 60 MB. The template uses one volume.
Updates. When we move the pin to a newer upstream commit, Railway shows you an "update available" notice; read the changelog in the template repo and apply it when you choose. Your data, token and key are kept.
Why Deploy Open Agent Connector 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 Open Agent Connector 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

