Mosaic📔

Environment Variables

Complete reference for all server configuration options

Environment Variables

The Mosaic server is configured through environment variables. Copy and modify the example file:

cp server/.env.example server/.env

Required

VariableDescriptionExample
DATABASE_URLPostgreSQL connection string (with ?sslmode=disable for local)postgres://mosaic:mosaic@localhost:5432/mosaic
JWT_SECRETSecret key for signing JWT tokensyour-super-secret-jwt-key-change-in-production

Server

VariableDefaultDescription
PORT8080HTTP server listen port
ADMIN_USERNAMEadminAdmin dashboard username
ADMIN_PASSWORDadmin123Admin dashboard password

Storage

VariableDefaultDescription
STORAGE_TYPElocalStorage backend: local or r2
LOCAL_STORAGE_PATH./storageDirectory for local file storage
FFMPEG_BINARYffmpegFFmpeg binary path for video processing

Cloudflare R2 (when STORAGE_TYPE=r2)

VariableDescription
R2_ENDPOINTR2 endpoint URL
R2_BUCKETR2 bucket name
R2_ACCESS_KEY_IDR2 access key ID
R2_SECRET_ACCESS_KEYR2 secret access key

AI

VariableDefaultDescription
HTML2LLM_URLhttps://html2llm.cyncyn.xyzExternal service for HTML-to-markdown conversion used in LLM processing

Docker Compose

When using Docker Compose, the POSTGRES_PASSWORD is also needed for the PostgreSQL service:

services:
  postgres:
    image: pgvector/pgvector:pg15
    environment:
      POSTGRES_USER: mosaic
      POSTGRES_PASSWORD: mosaic_password
      POSTGRES_DB: mosaic
  mosaic-server:
    image: ghcr.io/crayonlu/mosaic-server:latest
    ports:
      - '8080:8080'
    env_file: .env

On this page