Deploy SurfSense

AI research agent that works over your documents: NotebookLM alternative

Deploy SurfSense

/data

Deploy and Host SurfSense on Railway

SurfSense is an open-source, privacy-focused alternative to NotebookLM. It is an AI research agent that ingests your documents and web pages, answers questions about them with citations, and transforms or edits them. You pick the model: any OpenAI-compatible API, or a local model that runs inside the container on the CPU.

About Hosting SurfSense

This template runs SurfSense 2.3.1 from its official single-container image, ghcr.io/modsetter/surfsense, pinned by version and digest and built from a small public wrapper repository. The container bundles Caddy, the API, the background workers and the local model servers, and keeps everything in SQLite and files under /data, which sits on a Railway volume, so documents, chats, settings and the password survive redeploys. Railway serves it over HTTPS on a public domain and checks /api/health. Sign-in uses one password, generated at deploy time, so a fresh instance is never open to the first visitor. The first build takes a few minutes because the image is several gigabytes.

Common Use Cases

  • Research a topic across your own PDFs, notes and saved web pages, with answers that cite their sources
  • Run a private, self-hosted NotebookLM-style workspace for a person or a small team that shares one password
  • Turn collected material into new documents, slide decks or a podcast with a transcript, using the model you choose

Dependencies for SurfSense Hosting

  • The official SurfSense image (linux/amd64), built from aalfath/surfsense-railway-template
  • A Railway volume mounted at /data

Deployment Dependencies

Implementation Details

The service needs no prompts. SURFSENSE_PASSWORD defaults to a generated 24-character secret: open the service's Variables tab to read it, then sign in at your Railway domain. SurfSense applies it at every start, so changing it there and redeploying resets the password. Connect a model in the app's settings (any OpenAI-compatible API, or a local model); stored provider keys are encrypted with a secret kept on the volume.

Optional variables from SurfSense's .env.example can be added to the service: SURFSENSE_ALLOWED_HOSTS restricts the host names it answers on (for example your Railway domain or custom domain), and SURFSENSE_SECRET keeps the encryption secret outside the volume. Leave SURFSENSE_TLS and SURFSENSE_DOMAIN unset, because Railway already terminates HTTPS.

Updates arrive through the template repository: when a new SurfSense version is pinned there, Railway offers the update on your project, and SurfSense backs up its database to /data/backups before it migrates. Local models run on the CPU only, so give the service enough memory if you use them.

Why Deploy SurfSense 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 SurfSense 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