Deploy LangChain Apps
LangChain research, summaries, news & doc chat with OpenAI and pgvector
pgvector
Just deployed
langchain
Just deployed
Deploy and Host LangChain Apps on Railway
LangChain is an open-source framework for building applications with large language models. This template deploys a single Streamlit app with four practical LangChain tools, backed by OpenAI models, your choice of web search API, and Postgres with pgvector.
About Hosting LangChain Apps
The app is built from the root of the alphasecio/langchain-examples repository and runs alongside a pgvector-enabled Postgres database on Railway's private network. The vector table is created automatically on first use, and uploaded documents persist on the database volume. Set OPENAI_API_KEY and at least one search provider key (Tavily, Exa, Firecrawl, Parallel, Perplexity, TinyFish, Serper or SerpApi), or enter keys in the app sidebar at runtime, where they last only for that browser session.
Set
APP_PASSWORDif you put API keys in the template variables. It is optional and empty by default. Without it, anyone who finds your app's URL can use your keys, spend your credits, and read or delete documents in your library. If you leave the server-side keys empty and enter them in the sidebar instead, the app is safe to leave open.
Common Use Cases
- Web Research: an agent that searches the web, reads pages and answers with cited sources.
- Summarize: summarize pasted text, a web page or a PDF as a short summary, a detailed one or bullet points.
- News Digest: top stories on any topic, each summarized, plus a one-paragraph digest.
- Chat with Docs: upload PDF, text or Markdown files and ask questions with page-level citations.
Dependencies for LangChain Apps Hosting
- LangChain, Streamlit and pgvector
- An OpenAI API key and at least one search API key
Deployment Dependencies
- alphasecio/langchain-examples GitHub repository
- pgvector/pgvector Docker image
Implementation Details
| Service | What it does |
|---|---|
langchain | Streamlit app with the four tools, password gate and provider settings |
pgvector | Postgres 18 with the pgvector extension, data on a volume at /var/lib/postgresql |
Why Deploy LangChain Apps 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 LangChain Apps 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
pgvector
pgvector/pgvector:pg18langchain
alphasecio/langchain-examplesOPENAI_API_KEY
Your OpenAI API key (platform.openai.com/api-keys)



