
Deploy AutoGPT
AutoGPT provides accessible AI tools to build and automate tasks.
Just deployed
/app/autogpt_platform/backend/workspaces
redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Just deployed
rabbitmq
Just deployed
/var/lib/rabbitmq
Deploy and Host AutoGPT on Railway
AutoGPT Platform is a no-code AI agent builder for creating, running, and scheduling autonomous agents. It provides a visual editor for connecting agent blocks, LLMs, tools, and integrations, with support for scheduled and triggered executions, live execution monitoring, user-managed credentials, and self-hosted deployments.
About Hosting AutoGPT
Hosting AutoGPT on Railway deploys the complete self-hosted platform as five coordinated services: the frontend, backend, PostgreSQL, Redis, and RabbitMQ. The frontend provides the web interface, while the backend runs the REST API, websocket server, agent executor, scheduler, and notification workers. PostgreSQL with pgvector stores persistent application data and vector information, Redis provides caching and event handling, and RabbitMQ handles the execution queue.
The template uses prebuilt Docker images, so no application build process is required. Database migrations run automatically when the backend starts. Railway private networking connects the backend to PostgreSQL, Redis, and RabbitMQ, while the frontend is exposed through Railway's public networking. Persistent volumes retain PostgreSQL, RabbitMQ, and agent workspace data across deployments.
Common Use Cases
- Personal AI Agent Workbench: Build agents that research, summarize information, interact with connected services, and execute tasks on schedules or triggers.
- Team AI Automation: Give users separate accounts and credentials so teams can create and operate their own agents and workflows.
- Private Self-Hosted Agent Platform: Run AutoGPT on Railway instead of relying on a hosted agent service, while keeping application data and agent workspace files within your Railway infrastructure.
Dependencies for AutoGPT Hosting
- AutoGPT Frontend:
ghcr.io/hmseeb/autogpt-railway-frontend:autogpt-platform-beta-v0.7.0 - AutoGPT Backend:
ghcr.io/hmseeb/autogpt-railway-backend:autogpt-platform-beta-v0.7.0 - PostgreSQL with pgvector:
pgvector/pgvector:pg15 - Redis:
redis:7 - RabbitMQ:
rabbitmq:4.1.4 - Persistent Storage: Volumes are required for PostgreSQL data, RabbitMQ data, and the backend's agent workspace files.
- LLM Provider: An OpenRouter API key is recommended for the built-in chat assistant. Anthropic, Claude Pro/Max, or OpenAI-compatible endpoints can also be configured for assistant responses.
- Per-user LLM Credentials: Users add their own provider credentials inside AutoGPT for the agents they create.
- Optional Integrations: OAuth credentials, API keys, and other credentials may be required for external integrations.
Deployment Dependencies
- AutoGPT Website
- AutoGPT GitHub Repository
- AutoGPT Self-Hosting Documentation
- AutoGPT Railway Frontend Image
- AutoGPT Railway Backend Image
- PostgreSQL pgvector Image
- Redis Docker Image
- RabbitMQ Docker Image
Implementation Details
The Railway template consists of the following services:
| Service | Docker Image | Purpose |
|---|---|---|
| Frontend | ghcr.io/hmseeb/autogpt-railway-frontend:autogpt-platform-beta-v0.7.0 | AutoGPT web interface |
| Backend | ghcr.io/hmseeb/autogpt-railway-backend:autogpt-platform-beta-v0.7.0 | REST API, websockets, agent execution, scheduler, and workers |
| PostgreSQL | pgvector/pgvector:pg15 | Application database and vector search |
| Redis | redis:7 | Caching and application events |
| RabbitMQ | rabbitmq:4.1.4 | Agent execution queue |
The backend workspace is persisted at:
/app/autogpt_platform/backend/workspaces
PostgreSQL persists its data at:
/var/lib/postgresql/data
RabbitMQ persists its data at:
/var/lib/rabbitmq
Redis uses its standard data directory:
/data
The PostgreSQL, Redis, and RabbitMQ services should remain private. Only the application-facing service that needs public access should receive a Railway public domain.
Backend Configuration
The backend runs the core AutoGPT Platform processes in a single container. It includes the API, websocket server, agent executor, scheduler, and notification workers.
Database migrations are applied automatically when the backend starts, so no manual migration command is required after deployment.
The backend also needs to trust the Railway frontend domain so browser-based requests from the frontend can communicate with the backend correctly. Use the frontend's generated Railway domain in the corresponding backend configuration.
AI Provider Configuration
An OpenRouter API key is recommended when deploying the template because it provides the broadest built-in assistant functionality, including assistant responses, web search, and marketplace search.
Alternative model providers can be configured for the built-in assistant, including:
- Anthropic
- Claude Pro or Max subscription
- OpenAI-compatible endpoints
- Self-hosted models
Users can also configure their own LLM credentials inside the application for the blocks used by their agents.
Leaving all assistant provider credentials empty does not prevent the stack from deploying, but the chat assistant will report the missing configuration when used.
Persistent Storage
Create the required Railway volumes for the persistent services and backend workspace.
PostgreSQL
/var/lib/postgresql/data
Stores the application's persistent relational and vector database data.
RabbitMQ
/var/lib/rabbitmq
Stores RabbitMQ's persistent broker data.
Backend Workspace
/app/autogpt_platform/backend/workspaces
Stores persistent workspace files used by agents.
Redis is configured as a single-node cluster because the backend cache client communicates using the Redis cluster protocol.
Public Networking
The frontend and backend communicate through the Railway deployment's configured public/private networking. REST API and websocket traffic use the same backend endpoint, with websocket requests routed by path.
Generate the required Railway domain from the service's Settings → Networking section. Use the resulting domain when configuring the backend's trusted frontend origin and any external OAuth callback URLs.
Railway handles TLS termination, so the application does not need a separate reverse proxy or certificate-management service.
Optional OAuth Integrations
AutoGPT supports integrations that can authenticate through OAuth, including services such as GitHub, Google, Notion, Reddit, Discord, X, Linear, Todoist, Airtable, and WordPress.
For an OAuth integration:
- Create an OAuth application with the external provider.
- Configure the provider's callback URL using your deployed AutoGPT address.
- Add the required client ID and client secret to the backend configuration.
- Complete the connection from the AutoGPT interface.
Integrations that support direct API keys do not require OAuth credentials; users can provide their API keys through the application.
Optional ClamAV
Virus scanning for uploaded files is disabled by default.
If upload scanning is required, enable:
CLAMAV_SERVICE_ENABLED=true
and add a ClamAV service to the Railway project according to the AutoGPT configuration requirements.
Deployment Flow
The recommended deployment architecture is:
Railway
|
+-------------+-------------+
| |
Frontend Backend
| |
| +------------+------------+
| | | |
| PostgreSQL Redis RabbitMQ
| | | |
| +------------+------------+
|
Public Web UI
Once all services are deployed, configure the required backend credentials, generate the public domain, create an account, and add LLM credentials inside the application before building agents.
Why Deploy AutoGPT 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 AutoGPT 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
CHAT_API_KEY
The key for the endpoint in CHAT_BASE_URL. Only needed if you set that.
CHAT_BASE_URL
Optional. Any OpenAI-compatible endpoint that should write the replies, including OpenAI itself (https://api.openai.com/v1) or your own Ollama or vLLM server. Pair with CHAT_API_KEY. Covers the conversation only.
ANTHROPIC_API_KEY
Optional. Use Anthropic to write the replies instead of OpenRouter. Covers the conversation only, so pair it with an OpenRouter key above if you also want web search.
OPEN_ROUTER_API_KEY
RECOMMENDED, and the only single credential that gives a complete assistant. Get one at openrouter.ai/keys. The assistant's web search and the marketplace search both run through OpenRouter no matter which model writes the replies, so without this they report themselves unavailable.
CLAUDE_CODE_OAUTH_TOKEN
Optional. Use your own Claude Pro or Max subscription to write the replies: run 'claude setup-token' on a machine signed in to Claude Code and paste the result. Covers the conversation only, so pair it with an OpenRouter key above if you also want web search. Personal instances only, a consumer subscription is not licensed to serve other people.
redis
redis:8.2.1rabbitmq
rabbitmq:4.1.4