SurfSenseSurfSense Docs
Docker Installation

Docker Compose Development

Building SurfSense from source using docker-compose.dev.yml

If you're contributing to SurfSense and want to build from source, use docker-compose.dev.yml instead:

cd SurfSense/docker
docker compose -f docker-compose.dev.yml up --build

This file builds the backend and frontend from your local source code (instead of pulling prebuilt images) and includes pgAdmin for database inspection at http://localhost:5050. Use the production docker-compose.yml for all other cases.

Dev-Only Environment Variables

The following .env variables are only used by the dev compose file (they have no effect on the production docker-compose.yml):

VariableDescriptionDefault
PGADMIN_PORTpgAdmin web UI port5050
PGADMIN_DEFAULT_EMAILpgAdmin login emailadmin@surfsense.com
PGADMIN_DEFAULT_PASSWORDpgAdmin login passwordsurfsense
REDIS_PORTExposed Redis port (internal-only in prod)6379
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPEFrontend build arg for auth typeLOCAL
NEXT_PUBLIC_ETL_SERVICEFrontend build arg for ETL serviceDOCLING
NEXT_PUBLIC_DEPLOYMENT_MODEFrontend build arg for deployment modeself-hosted
NEXT_PUBLIC_ELECTRIC_AUTH_MODEFrontend build arg for Electric authinsecure

In the production compose file, the NEXT_PUBLIC_* frontend variables are automatically derived from AUTH_TYPE, ETL_SERVICE, and the port settings. In the dev compose file, they are passed as build args since the frontend is built from source.

On this page