Deploy Spring AI RAG Starter

Ask questions about your PDFs and docs. Java, Spring AI and pgvector.

Deploy Spring AI RAG Starter

Just deployed

/var/lib/postgresql

Deploy and Host Spring AI RAG Starter on Railway

Spring AI RAG Starter is a ready-to-run Java service for asking questions about your own documents. Upload PDFs, text or Markdown files, then search them in plain English from a built-in web page or a REST API. It is built on Spring Boot 4, Spring AI 2 and Postgres with pgvector.

About Hosting Spring AI RAG Starter

The template deploys two services: the API, built from source with a Dockerfile, and a pgvector database with a persistent volume, connected over Railway's private network. The embedding model is bundled inside the app, so search works without any outside AI service or API key. Each deployment generates its own access key (APP_API_KEY in the API service's Variables tab) that protects every endpoint. Give the API at least 1 GB of memory. For written answers with citations, set AI_CHAT=openai and add your OPENAI_API_KEY.

Common Use Cases

  • Search a team handbook, policies or internal docs in plain English
  • Add question answering over PDFs to an existing app through the REST API
  • Start a Java RAG project from a working, deployed baseline

Dependencies for Spring AI RAG Starter Hosting

  • Postgres with the pgvector extension (included in this template)
  • Optional: an OpenAI API key for written answers

Implementation Details

[Include any code snippets or implementation details. This section is optional. Exclude if nothing to add.]

Why Deploy Spring AI RAG Starter 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 Spring AI RAG Starter 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