Railway

Deploy AutoGPT

AutoGPT provides accessible AI tools to build and automate tasks.

Deploy AutoGPT

/app/autogpt_platform/backend/workspaces

Just deployed

/data

/var/lib/postgresql/data

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

Implementation Details

The Railway template consists of the following services:

ServiceDocker ImagePurpose
Frontendghcr.io/hmseeb/autogpt-railway-frontend:autogpt-platform-beta-v0.7.0AutoGPT web interface
Backendghcr.io/hmseeb/autogpt-railway-backend:autogpt-platform-beta-v0.7.0REST API, websockets, agent execution, scheduler, and workers
PostgreSQLpgvector/pgvector:pg15Application database and vector search
Redisredis:7Caching and application events
RabbitMQrabbitmq:4.1.4Agent 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:

  1. Create an OAuth application with the external provider.
  2. Configure the provider's callback URL using your deployed AutoGPT address.
  3. Add the required client ID and client secret to the backend configuration.
  4. 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
[Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL

codestorm
68
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
870