---
title: "Deploy DocsGPT"
description: "Chat with your documents and build AI agents; pgvector, no API key needed"
category: "AI/ML"
url: https://railway.com/deploy/docsgpt
---

# Deploy DocsGPT

Chat with your documents and build AI agents; pgvector, no API key needed

**[Deploy DocsGPT on Railway](https://railway.com/template/docsgpt)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/docsgpt/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### DocsGPT https://raw.githubusercontent.com/arc53/DocsGPT/1.1.0/frontend/public/web-app-manifest-512x512.png

- **Source:** https://github.com/aalfath/docsgpt-railway-template
- **Health check:** /api/health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host DocsGPT on Railway

DocsGPT is an open-source AI assistant that answers from your own documents. You upload files or add websites, then chat with answers that cite their sources. It also builds agents with tools and schedules, and serves them through a chat widget, a REST API and an OpenAI-compatible endpoint.

## About Hosting DocsGPT

DocsGPT needs its API (which also serves the web UI), a Celery worker for ingestion and scheduled jobs, PostgreSQL with pgvector, and Redis. This template runs the official `arc53/docsgpt:1.1.0` image, pinned by digest and built from a public GitHub repo, with the API and the worker in one service that shares a volume for uploaded files. Railway's Postgres holds users, chats, agents and vectors; Railway's Redis holds the task queue. All secrets are generated, sign-in is on, and the hosted DocsGPT model works without an API key. Nothing to fill in at deploy.

## Common Use Cases

* A documentation assistant that answers from product docs, wikis and PDFs, with citations
* Private search over a team's internal documents
* A support chat widget or an OpenAI-compatible endpoint backed by your own sources

## Dependencies for DocsGPT Hosting

* PostgreSQL with pgvector (Railway's Postgres, included)
* Redis (Railway's Redis, included)
* An LLM: the hosted DocsGPT model by default, or your own OpenAI, Anthropic, Google, Groq or OpenRouter key

### Deployment Dependencies

* [DocsGPT on GitHub](https://github.com/arc53/DocsGPT) and its [1.1.0 release](https://github.com/arc53/DocsGPT/releases/tag/1.1.0)
* [DocsGPT Docker deployment guide](https://docs.docsgpt.cloud/Deploying/Docker-Deploying)
* [DocsGPT security checklist](https://docs.docsgpt.cloud/Deploying/Security)
* [Template repo: aalfath/docsgpt-railway-template](https://github.com/aalfath/docsgpt-railway-template)

### Implementation Details

**After deploy:** wait until DocsGPT, Postgres and Redis are green. Open the DocsGPT service's deploy logs, find `Generated Simple JWT Token:` and copy the token after it. Open the public domain and paste the token when asked. Then add a source (upload a file or add a website) and ask a question.

**Sign-in:** upstream ships with no sign-in. This template sets `AUTH_TYPE=simple_jwt`, one shared access token. Keep it private; set a new `JWT_SECRET_KEY` to revoke it. For one account per person, set `AUTH_TYPE=oidc` with `OIDC_ISSUER`, `OIDC_CLIENT_ID` and `OIDC_FRONTEND_URL`.

**Your own model:** add `LLM_PROVIDER` (for example `openai`) and `API_KEY` to the DocsGPT service, optionally `LLM_NAME`, and redeploy.

**Data:** uploaded files on the DocsGPT volume (`/data`), everything else in Postgres. Don't change `ENCRYPTION_SECRET_KEY` after you connect tools or services, or their stored credentials become unreadable. Update `API_URL` when you add a custom domain.

**Memory:** ingestion runs the embedding model on the CPU and needs about 1.5 GB of RAM, so use the Hobby plan or higher.

**Updates:** the DocsGPT service builds from [aalfath/docsgpt-railway-template](https://github.com/aalfath/docsgpt-railway-template). When we bump the pinned version, Railway shows you an update notice and you choose when to apply it. Read the repo's CHANGELOG first and back up Postgres before a major upgrade; migrations run on start.

## Why Deploy DocsGPT 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 DocsGPT 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.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/docsgpt
