---
title: "Deploy SurfSense"
description: "AI research agent that works over your documents: NotebookLM alternative"
category: "AI/ML"
url: https://railway.com/deploy/surfsense-1
---

# Deploy SurfSense

AI research agent that works over your documents: NotebookLM alternative

**[Deploy SurfSense on Railway](https://railway.com/template/surfsense-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/surfsense-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### SurfSense https://raw.githubusercontent.com/MODSetter/SurfSense/v2.3.1/www/public/homepage/icon.png

- **Source:** https://github.com/aalfath/surfsense-railway-template
- **Health check:** /api/health
- **Public domain:** Yes

## Documentation

# 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

* SurfSense source and releases: https://github.com/MODSetter/SurfSense/releases
* Docker setup documentation: https://github.com/MODSetter/SurfSense/blob/main/docs/architecture/docker.md
* Template repository: https://github.com/aalfath/surfsense-railway-template

### 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.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/surfsense-1
