SurfSense---Backend

SurfSense---Backend

Docker app from grtgbln's Repository

Overview

Open Source Alternative to NotebookLM / Perplexity / Glean, connected to external sources such as search engines (Tavily, Linkup), Slack, Linear, Notion, YouTube, GitHub, Discord and more.
This is the backend container.

Requirements


        Requires separate SurfSense - Frontend, SurfSense - Worker, pgAdmin4, pgvector, electric and Redis containers. See documentation: https://github.com/MODSetter/SurfSense/blob/main/DOCKER_SETUP.md#deployment-options
    

Runtime arguments

Web UI
http://[IP]:[PORT:8000]/
Network
bridge
Privileged
false

Template configuration

API PortPorttcp

Container Port: 8000

Target
8000
Default
3001
Value
3001
Database - URLVariable

URL of the PostgreSQL database, including port and credentials

Target
DATABASE_URL
Default
postgresql+asyncpg://USERNAME:PASSWORD@IP_ADDRESS:5432/surfsense
Value
postgresql+asyncpg://USERNAME:PASSWORD@IP_ADDRESS:5432/surfsense
Secret KeyVariable

JWT Secret key for authentication (should be a secure random string)

Target
SECRET_KEY
Frontend URLVariable

URL of the frontend service, including port

Target
NEXT_FRONTEND_URL
Default
http://MY_IP_ADDRESS:3000
Value
http://MY_IP_ADDRESS:3000
Authentication - TypeVariable

Authentication type (Google OAuth or local email/password)

Target
AUTH_TYPE
Default
LOCAL|GOOGLE
Authentication - Google Client IDVariable

Google OAuth Client ID. Required if AUTH_TYPE is set to GOOGLE.

Target
GOOGLE_OAUTH_CLIENT_ID
Authentication - Google Client SecretVariable

Google OAuth Client Secret. Required if AUTH_TYPE is set to GOOGLE.

Target
GOOGLE_OAUTH_CLIENT_SECRET
Google - Calendar Redirect URIVariable

Redirect URI for Google Calendar OAuth. Must match the one set in Google Cloud Console.

Target
GOOGLE_CALENDAR_REDIRECT_URI
Default
http://MY_IP_ADDRESS:8000/api/v1/auth/google/calendar/connector/callback
Value
http://MY_IP_ADDRESS:8000/api/v1/auth/google/calendar/connector/callback
Google - Gmail Redirect URIVariable

Redirect URI for Google Gmail OAuth. Must match the one set in Google Cloud Console.

Target
GOOGLE_GMAIL_REDIRECT_URI
Default
http://MY_IP_ADDRESS:8000/api/v1/auth/google/gmail/connector/callback
Value
http://MY_IP_ADDRESS:8000/api/v1/auth/google/gmail/connector/callback
AirTable - Client IDVariable

AirTable OAuth Client ID. Required if using AirTable connector.

Target
AIRTABLE_CLIENT_ID
AirTable - Client SecretVariable

AirTable OAuth Client Secret. Required if using AirTable connector.

Target
AIRTABLE_CLIENT_SECRET
AirTable - Redirect URIVariable

Redirect URI for AirTable OAuth. Must match the one set in AirTable developer console.

Target
AIRTABLE_REDIRECT_URI
Default
http://MY_IP_ADDRESS:8000/api/v1/auth/airtable/connector/callback
Value
http://MY_IP_ADDRESS:8000/api/v1/auth/airtable/connector/callback
Models - Embedder ModelVariable

Name of the embedding model (e.g., openai://text-embedding-ada-002, anthropic://claude-v1, mixedbread-ai/mxbai-embed-large-v1)

Target
EMBEDDING_MODEL
Default
mixedbread-ai/mxbai-embed-large-v1
Value
mixedbread-ai/mxbai-embed-large-v1
Models - Reranker ModelVariable

Name of the reranker model (e.g., ms-marco-MiniLM-L-12-v2)

Target
RERANKERS_MODEL_NAME
Default
ms-marco-MiniLM-L-12-v2
Value
ms-marco-MiniLM-L-12-v2
Models - Reranker Model TypeVariable

Type of reranker model (e.g., flashrank)

Target
RERANKERS_MODEL_TYPE
Default
flashrank
Value
flashrank
LiteLLM - Text To Speech ServiceVariable

Text-to-Speech API provider for Podcasts (e.g., openai/tts-1, azure/neural, vertex_ai/). See documentation: https://docs.litellm.ai/docs/text_to_speech#supported-providers

Target
TTS_SERVICE
Default
openai/tts-1
Value
openai/tts-1
LiteLLM - Text To Speech API BaseVariable

Base URL for the Text To Speech API. Optional, leave empty to use default.

Target
TTS_SERVICE_API_BASE
LiteLLM - Text To Speech API KeyVariable

API Key for the Text To Speech API provider. Required if the provider needs authentication.

Target
TTS_SERVICE_API_KEY
LiteLLM - Speech To Text ServiceVariable

Speech-to-Text API provider for Podcasts (e.g., openai/whisper-1, local). See documentation: https://docs.litellm.ai/docs/audio_transcription#supported-providers

Target
STT_SERVICE
Default
openai/whisper-1
Value
openai/whisper-1
LiteLLM - Speech To Text Local ModelVariable

Local Whisper model size to use if STT_SERVICE is set to local.

Target
LOCAL_STT_MODEL
Default
base|tiny|small|medium|large-v3
LiteLLM - Speech To Text API BaseVariable

Base URL for the Speech To Text API. Optional, leave empty to use default.

Target
STT_SERVICE_API_BASE
LiteLLM - Speech To Text API KeyVariable

API Key for the Speech To Text API provider. Required if the provider needs authentication.

Target
STT_SERVICE_API_KEY
Firecrawl - API KeyVariable

API key for Firecrawl service for web crawling

Target
FIRECRAWL_API_KEY
ETL ServiceVariable

Document parsing service

Target
ETL_SERVICE
Default
UNSTRUCTURED|LLAMACLOUD|DOCLING
Unstructured - API KeyVariable

API key for Unstructured.io service for document parsing. Required if ETL Service is set to UNSTRUCTURED

Target
UNSTRUCTURED_API_KEY
LlamaCloud - API KeyVariable

API key for LlamaCloud service for document parsing. Required if ETL Service is set to LLAMACLOUD

Target
LLAMA_CLOUD_API_KEY
Redis - URLVariable

URL of the Redis instance used as Celery broker, including port

Target
CELERY_BROKER_URL
Default
redis://MY_IP_ADDRESS:6379/0
Value
redis://MY_IP_ADDRESS:6379/0
Redis - Results URLVariable

URL of the Redis instance used as Celery result backend, including port. Must match CELERY_BROKER_URL

Target
CELERY_RESULT_BACKEND
Default
redis://MY_IP_ADDRESS:6379/0
Value
redis://MY_IP_ADDRESS:6379/0
Electric - UserVariable

Electric database user

Target
ELECTRIC_DB_USER
Default
electric
Value
electric
Electric - PasswordVariable

Electric database password

Target
ELECTRIC_DB_PASSWORD
Default
electric_password
Value
electric_password
App DataPath

Path to store app data. Must match Worker

Target
/app
Default
/mnt/user/appdata/surfsense/backend/data
Value
/mnt/user/appdata/surfsense/backend/data
Temp DataPath

Path to store temporary data. Must be shared between containers.

Target
/tmp
Default
/mnt/user/appdata/surfsense/shared/tmp
Value
/mnt/user/appdata/surfsense/shared/tmp
LangSmith - TracingVariable

Enable LangSmith tracing.

Target
LANGSMITH_TRACING
Default
false
Value
false
LangSmith - EndpointVariable

LangSmith API endpoint. Default is https://api.smith.langchain.com, change only if you know what you're doing.

Target
LANGSMITH_ENDPOINT
Default
https://api.smith.langchain.com
Value
https://api.smith.langchain.com
LangSmith - Project NameVariable

LangSmith project name.

Target
LANGSMITH_PROJECT
LangSmith - API KeyVariable

API key for LangSmith tracing. Required if LANGSMITH_TRACING is enabled.

Target
LANGSMITH_API_KEY
Uvicorn - HostVariable

Uvicorn host address. Not recommended to change.

Target
UVICORN_HOST
Default
0.0.0.0
Value
0.0.0.0
Uvicorn - PortVariable

Uvicorn port. Not recommended to change.

Target
UVICORN_PORT
Default
8000
Value
8000
Uvicorn - Log LevelVariable

Uvicorn log level. Not recommended to change.

Target
UVICORN_LOG_LEVEL
Default
info
Value
info
Uvicorn - LoopVariable

Uvicorn loop type. Default is asyncio, change only if you know what you're doing.

Target
UVICORN_LOOP
Default
asyncio
Value
asyncio
Internal Python PathVariable

Internal Python path for the application. Not recommended to change.

Target
PYTHONPATH
Default
/app
Value
/app
Unstructured Has Patched LoopVariable

Unstructured library patched loop. Default is 1, change only if you know what you're doing.

Target
UNSTRUCTURED_HAS_PATCHED_LOOP
Default
1
Value
1
LangChain - Tracing V2Variable

Not recommended to change.

Target
LANGCHAIN_TRACING_V2
Default
false
Value
false

Details

Repository
ghcr.io/modsetter/surfsense_backend:latest
Last Updated2026-06-01
First Seen2025-06-05

Run SurfSense---Backend on Unraid.

SurfSense---Backend is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.