Deploy GPT Researcher with Auth Gateway

GPT Researcher deep research agent and UI behind a password gateway

Deploy GPT Researcher with Auth Gateway

Just deployed

gpt-researcher-gateway

caddy:2.11-alpine

Just deployed

Deploy and Host GPT Researcher on Railway

GPT Researcher is an open source deep research agent. Give it a question and it plans the sub queries, searches the web, reads and filters the sources, and writes a long, cited report that you can export as Markdown, PDF or Word. It can also research your own uploaded documents and chat with you about a finished report.

About Hosting GPT Researcher

Hosting GPT Researcher means running two containers: the FastAPI backend, which runs the research and streams progress over a websocket, and the Next.js web UI. The app has no login of its own and it fetches arbitrary URLs, so it must never face the internet directly. This template keeps both services private and puts a small Caddy gateway in front as the only public service. The gateway asks for a username and a generated password, then routes the API, websocket and report file paths to the backend and everything else to the UI on a single origin. Official release images are pinned to 3.8.0, and a volume on the backend keeps your research history, generated reports and uploaded documents across redeploys.

Common Use Cases

  • Market and competitor research: a cited report from dozens of sources in a few minutes
  • Literature and technical reviews: summaries across papers, docs and blog posts with references
  • Research over your own files: upload PDFs, Word or text documents and combine them with web sources
  • A private research tool for a small team: one shared login, your own LLM key, your own data

Dependencies for GPT Researcher Hosting

  • An LLM API key: OpenAI by default (OPENAI_API_KEY). Other providers work by setting FAST_LLM, SMART_LLM, STRATEGIC_LLM and EMBEDDING, or OPENAI_BASE_URL for a compatible endpoint
  • A web search key: Tavily by default (TAVILY_API_KEY). Set RETRIEVER=duckduckgo to search without a key

Neither key is needed for the stack to boot. Research runs fail until both are configured.

Deployment Dependencies

Implementation Details

Three services: gpt-researcher (port 8000, volume at /data), gpt-researcher-ui (port 3000) and gpt-researcher-gateway (port 8080, the public domain). Key variables:

# gpt-researcher-gateway
UI_USERNAME=admin
UI_PASSWORD=${{secret(24)}}
SESSION_TOKEN=${{secret(48)}}
BACKEND_UPSTREAM=${{gpt-researcher.RAILWAY_PRIVATE_DOMAIN}}:8000
FRONTEND_UPSTREAM=${{gpt-researcher-ui.RAILWAY_PRIVATE_DOMAIN}}:3000

# gpt-researcher
OPENAI_API_KEY=
TAVILY_API_KEY=
REPORT_STORE_PATH=/data/reports.json
DOC_PATH=/data/my-docs
RAILWAY_RUN_UID=0

First steps after deploy:

  1. Copy UI_USERNAME and UI_PASSWORD from the gpt-researcher-gateway service variables.
  2. Open the gateway's public domain and sign in.
  3. Set OPENAI_API_KEY and TAVILY_API_KEY on the gpt-researcher service and redeploy it.
  4. Ask your first question.

Anyone with the gateway password is a fully trusted operator: GPT Researcher lets its users configure MCP servers, which run commands inside the backend container. Share the password accordingly, and never give the backend or the UI a public domain of their own.

The backend image is about 2.85 GB unpacked, so the first deploy takes a few minutes. A Hobby plan or higher is recommended.

Why Deploy GPT Researcher 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 GPT Researcher 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
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1