Deploy GPT Researcher with Auth Gateway
GPT Researcher deep research agent and UI behind a password gateway
gpt-researcher
Just deployed
gpt-researcher-gateway
Just deployed
gpt-researcher-ui
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 settingFAST_LLM,SMART_LLM,STRATEGIC_LLMandEMBEDDING, orOPENAI_BASE_URLfor a compatible endpoint - A web search key: Tavily by default (
TAVILY_API_KEY). SetRETRIEVER=duckduckgoto search without a key
Neither key is needed for the stack to boot. Research runs fail until both are configured.
Deployment Dependencies
- GPT Researcher Docker guide
- Configuration reference
- Security policy
- GPT Researcher GitHub repository
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:
- Copy
UI_USERNAMEandUI_PASSWORDfrom thegpt-researcher-gatewayservice variables. - Open the gateway's public domain and sign in.
- Set
OPENAI_API_KEYandTAVILY_API_KEYon thegpt-researcherservice and redeploy it. - 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
gpt-researcher
ghcr.io/assafelovic/gpt-researcher:3.8.0gpt-researcher-gateway
caddy:2.11-alpinegpt-researcher-ui
ghcr.io/assafelovic/gpt-researcher-frontend-nextjs:3.8.0
