Deploy & Host AutoGPT | Railway

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

Dependencies for AutoGPT Hosting

Deployment Dependencies

Dependency Link
AutoGPT Website Visit
AutoGPT GitHub Repository Visit
AutoGPT Self-Hosting Documentation Visit
AutoGPT Railway Frontend Image Visit
AutoGPT Railway Backend Image Visit
PostgreSQL pgvector Image Visit
Redis Docker Image Visit
RabbitMQ Docker Image Visit

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:

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.