mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
* docs: rebrand from image-only to multi-modality across docs and metadata SnapOtter expanded from image-only to 157 tools across 5 modalities (image, video, audio, document/PDF, data). Update all product-level copy, metadata, and i18n that still framed it as an image-only tool. - README, package.json, root llms.txt: multi-modality framing, 157 tools - OpenAPI info + tags, generated /llms.txt tagline (docs.ts) - VitePress docs site: hero, getting-started, architecture, security, deployment, configuration, developer, supported-formats - i18n: 10 product keys across all 21 locales (hero, app description, privacy notes, AI features, progress messages, getting-started) - web/demo/landing meta + privacy copy, COMMUNITY_GUIDE, .env.example Stale tool counts (53/50+/52/70+/35) corrected to 157 throughout. Database/container deployment claims left unchanged (out of scope). * docs: fix stale post-rebrand test assertions and README language list - tests/e2e-docs/homepage.spec.ts: assert the current docs homepage (file toolkit, 157 tools, 5 modalities) instead of the old image-only strings - tests/unit/api/docs-route.test.ts: sync the reproduced llms.txt tagline with docs.ts - README.md: 21 languages with the correct list (add Swedish and Chinese Traditional, drop Czech which is not supported) * docs: correct 2.0 architecture references (Postgres 17 + Redis 8, 3-container stack) The docs and metadata still described the 1.x stack (SQLite, single container, p-queue). Update them to the current 2.0 reality. - README: replace the broken single-container `docker run` quick-start with the real Docker Compose stack (app + Postgres 17 + Redis 8); fix the "no Redis, no Postgres" feature bullet - package.json: description no longer claims a single container - apps/docs: rewrite database.md for Postgres; configuration.md DB_PATH -> DATABASE_URL + REDIS_URL; architecture.md SQLite/p-queue/better-sqlite3 -> Postgres/BullMQ/pg and add media-engine + doc-engine; developer/security/deployment/docker-tags/getting-started/contributing compose examples now include postgres + redis; index.md + api/ai.md AI count 16 -> 19 - SECURITY.md: Drizzle (SQLite) -> (PostgreSQL) - landing: enterprise/FeatureHighlights single-container wording; TrustSignals/ToolGrid 150+ -> 157 (dynamic); Pricing/FAQ 15 -> 19 AI tools * docs(api): document all video, audio, document, and data tool endpoints in OpenAPI The spec covered only image tools; the Scalar UI and the generated /llms.txt and /llms-full.txt inherited that gap. Add the 104 missing tool endpoints so the API docs match the code. - Video: 29 endpoints (most long/async; auto-subtitles is AI) - Audio: 17 (transcribe-audio is AI) - Document/PDF: 36 (ocr-pdf is AI; conversions are long/async) - Data: 10 - Image: 12 newer tools (background-replace, blur-background AI; histogram/lqip-placeholder/sprite-sheet custom responses; barcode-generate uses a JSON body) Each schema is derived from the tool's Zod validator and executionHint (fast -> 200, long -> 202+SSE, AI adds 501 FeatureNotInstalledError, multi-file inputs as arrays), referencing the existing shared schemas. Tool path entries: 64 -> 168. Spec parses as valid YAML with no duplicate paths and only known $refs.
6.3 KiB
6.3 KiB
description
| description |
|---|
| All SnapOtter environment variables with defaults. Configure auth, storage, AI models, analytics, and more. |
Configuration
All configuration is done through environment variables. Every variable has a sensible default, so SnapOtter works out of the box without setting any of them.
Environment variables
Server
| Variable | Default | Description |
|---|---|---|
PORT |
1349 |
Port the server listens on. |
RATE_LIMIT_PER_MIN |
0 (disabled) |
Maximum requests per minute per IP. Set to 0 to disable rate limiting. |
CORS_ORIGIN |
(empty) | Comma-separated allowed origins for CORS, or empty for same-origin only. |
LOG_LEVEL |
info |
Log verbosity. One of: fatal, error, warn, info, debug, trace. |
TRUST_PROXY |
true |
Trust X-Forwarded-For headers from a reverse proxy. Set to false if not behind a proxy. |
Authentication
| Variable | Default | Description |
|---|---|---|
AUTH_ENABLED |
false |
Set to true to require login. The Docker image defaults to true. |
DEFAULT_USERNAME |
admin |
Username for the initial admin account. Only used on first run. |
DEFAULT_PASSWORD |
admin |
Password for the initial admin account. Change this after first login. |
MAX_USERS |
0 (unlimited) |
Maximum number of registered user accounts. Set to 0 for unlimited. |
SESSION_DURATION_HOURS |
168 |
Login session lifetime in hours (default is 7 days). |
SKIP_MUST_CHANGE_PASSWORD |
- | Set to any non-empty value to bypass the forced password-change prompt on first login |
Storage
| Variable | Default | Description |
|---|---|---|
STORAGE_MODE |
local |
local or s3. Only local storage is currently implemented. |
DATABASE_URL |
postgres://snapotter:snapotter@postgres:5432/snapotter |
PostgreSQL connection string. |
REDIS_URL |
redis://redis:6379 |
Redis connection string (used for BullMQ job queues). |
WORKSPACE_PATH |
./tmp/workspace |
Directory for temporary files during processing. Cleaned up automatically. |
FILES_STORAGE_PATH |
./data/files |
Directory for persistent user files (uploaded images, saved results). |
Processing limits
| Variable | Default | Description |
|---|---|---|
MAX_UPLOAD_SIZE_MB |
0 (unlimited) |
Maximum file size per upload in megabytes. Set to 0 for unlimited. |
MAX_BATCH_SIZE |
0 (unlimited) |
Maximum number of files in a single batch request. Set to 0 for unlimited. |
CONCURRENT_JOBS |
0 (auto) |
Number of batch jobs that run in parallel. Set to 0 to auto-detect based on available CPU cores. |
MAX_MEGAPIXELS |
0 (unlimited) |
Maximum image resolution allowed in megapixels. Set to 0 for unlimited. |
MAX_WORKER_THREADS |
0 (auto) |
Maximum worker threads for image processing. Set to 0 to auto-detect based on available CPU cores. |
PROCESSING_TIMEOUT_S |
0 (no limit) |
Maximum processing time per request in seconds. Set to 0 for no timeout. |
MAX_PIPELINE_STEPS |
0 (no limit) |
Maximum number of steps in a pipeline. Set to 0 for no limit. |
MAX_CANVAS_PIXELS |
0 (no limit) |
Maximum canvas size in pixels for output images. Set to 0 for no limit. |
MAX_SVG_SIZE_MB |
0 (unlimited) |
Maximum SVG file size in megabytes. Set to 0 for unlimited. |
MAX_SPLIT_GRID |
100 |
Maximum grid dimension for the image split tool. |
MAX_PDF_PAGES |
0 (unlimited) |
Maximum number of PDF pages for PDF-to-image conversion. Set to 0 for unlimited. |
Cleanup
| Variable | Default | Description |
|---|---|---|
FILE_MAX_AGE_HOURS |
72 |
How long temporary files are kept before automatic deletion. |
CLEANUP_INTERVAL_MINUTES |
60 |
How often the cleanup job runs. |
Appearance
| Variable | Default | Description |
|---|---|---|
DEFAULT_THEME |
light |
Default theme for new sessions. light or dark. |
DEFAULT_LOCALE |
en |
Default interface language. |
DEFAULT_TOOL_VIEW |
sidebar |
Default tool layout. sidebar or fullscreen. |
Docker permissions
| Variable | Default | Description |
|---|---|---|
PUID |
999 |
Run the container process as this UID. Set to match your host user for bind mounts (id -u). |
PGID |
999 |
Run the container process as this GID. Set to match your host group for bind mounts (id -g). |
Docker example
services:
SnapOtter:
image: snapotter/snapotter:latest
ports:
- "1349:1349"
volumes:
- SnapOtter-data:/data
- SnapOtter-workspace:/tmp/workspace
environment:
- AUTH_ENABLED=true
- DEFAULT_USERNAME=admin
- DEFAULT_PASSWORD=changeme
- DATABASE_URL=postgres://snapotter:snapotter@postgres:5432/snapotter
- REDIS_URL=redis://redis:6379
- MAX_UPLOAD_SIZE_MB=200
- CONCURRENT_JOBS=4
- FILE_MAX_AGE_HOURS=12
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: snapotter
POSTGRES_PASSWORD: snapotter
POSTGRES_DB: snapotter
volumes:
- SnapOtter-pgdata:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U snapotter"]
interval: 10s
timeout: 5s
retries: 12
redis:
image: redis:8-alpine
command: ["redis-server", "--maxmemory-policy", "noeviction", "--appendonly", "yes"]
volumes:
- SnapOtter-redisdata:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 12
volumes:
SnapOtter-data:
SnapOtter-workspace:
SnapOtter-pgdata:
SnapOtter-redisdata:
Volumes
The Docker Compose stack uses four volumes:
/data(app) -- AI models, Python venv, and user files. Mount this to keep uploaded files and installed AI bundles across restarts./tmp/workspace(app) -- Temporary storage for files being processed. This can be ephemeral, but mounting it avoids filling up the container's writable layer.SnapOtter-pgdata(postgres) -- PostgreSQL data directory. This holds all relational data (users, settings, pipelines, jobs, audit log). Back up viapg_dumpor volume snapshot.SnapOtter-redisdata(redis) -- Redis append-only file for durable job queues.