selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Koma logo

Self-host Koma

0.1.0

AI video analysis with summaries and searchable transcripts

AlphaOpen Source
Updated5 days ago
LanguageTypescript
Setup difficultyAdvanced
Stars
298
Port
3000 (HTTP server)
Requires
SQLite
Install with Docker

What is Koma?

Koma is a self-hosted web application for AI-powered video analysis. Users upload video files or provide direct MP4 URLs, and the system uses configurable speech-to-text and vision AI providers to produce summaries, chapter markers, searchable transcripts, and key frame descriptions. Results are interactive — clicking a chapter, tag, or subtitle jumps to the corresponding moment in the video. Exports include Markdown, SRT subtitles, JSON, CSV, and plain text. A GitHub App enables private workspaces with account sign-in, while an optional admin console manages providers and all jobs. The stack requires Node.js 22.13+, bundles FFmpeg, defaults to SQLite storage with MySQL as a production option, and supports local or Aliyun OSS for media. Without provider API keys, Koma runs in mock mode for demonstration.

Should you self-host Koma?

Koma scores 41/100 on selfhost.directory (how scoring works) and ranks #15 of 18 in Video Processing. It has 298 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is written mostly in Typescript.

Its closest alternative on selfhost.directory is Concat (82/100, 12 343 stars). It scores higher overall, so compare the two before you pick. See Koma vs Concat side by side.

Features

  • Admin Console
  • Chapter detection
  • CLI mode
  • Custom JSON extraction
  • GitHub sign-in
  • Key frame extraction
  • Mock mode
  • Multi-format Export
  • Searchable transcripts
  • Video summarization

Koma README

How to install Koma

Install Koma with Docker

Docker Engine

docker build -t koma:local . docker volume create koma-data docker run --rm -p 3000:3000 --env-file .env
--mount type=volume,source=koma-data,target=/app/data
koma:local

Requires persistent volume for /app/data

How to configure Koma

  • ADMIN_PASSWORDAdmin access: /admin is disabled until ADMIN_PASSWORD is set. Set ANALYSIS_REQUIRE_ADMIN=true to additionally restrict analysis to administrators. Use a separate long random secret so changing the login password does not make previously encrypted provider settings unreadable.

    Admin access: /admin is disabled until ADMIN_PASSWORD is set. Set ANALYSIS_REQUIRE_ADMIN=true to additionally restrict analysis to administrators. Use a separate long random secret so changing the login password does not make previously encrypted provider settings unreadable.

  • AI_TIMEOUT_MS120000
  • ANALYSIS_REQUIRE_ADMINfalse
  • ARTIFACT_MAX_TOKENS
  • ASR_API_KEYOnly needed for openai-compatible or to override a preset:

    Only needed for openai-compatible or to override a preset:

  • ASR_BASE_URL
  • ASR_DIARIZATIONoff
  • ASR_MAX_SEGMENT_BYTES8388608
  • ASR_MODEL
  • ASR_PROVIDERmockASR providers: mock | dashscope | groq | openai | openai-compatible

    ASR providers: mock | dashscope | groq | openai | openai-compatible

  • ASR_SEGMENT_SECONDS60
  • DASHSCOPE_API_KEYPreset credentials. Koma selects the matching key from ASR_PROVIDER / VISION_PROVIDER.

    Preset credentials. Koma selects the matching key from ASR_PROVIDER / VISION_PROVIDER.

  • DASHSCOPE_BASE_URL
  • DASHSCOPE_WORKSPACE_ID
  • DB_AUTO_CREATEtrueWith an account allowed to create databases, Koma can initialize DB_NAME and all tables on first boot. Set false for a pre-provisioned least-privilege user.

    With an account allowed to create databases, Koma can initialize DB_NAME and all tables on first boot. Set false for a pre-provisioned least-privilege user.

  • DB_CONNECTION_LIMIT5
  • DB_DRIVERsqlitePersistence. SQLite is the zero-config local default. Production can use a dedicated MySQL database; never commit real connection values.

    Persistence. SQLite is the zero-config local default. Production can use a dedicated MySQL database; never commit real connection values.

  • DB_HOST
  • DB_NAMEkoma
  • DB_PASSWORD
  • DB_PORT3306
  • DB_SSLfalse
  • DB_USER
  • DEMO_REQUESTS_PER_IP_PER_DAY00 disables the built-in single-node daily limit.

    0 disables the built-in single-node daily limit.

  • FRAME_SCENE_THRESHOLD0.4
  • FRAME_WIDTH1280
  • GEMINI_API_KEY
  • GITHUB_CALLBACK_URLhttp://localhost:5173/api/auth/github/callback
  • GITHUB_CLIENT_IDWeb workspaces require GitHub sign-in. Register a GitHub App with no repository or organization permissions. Keep its client secret on the server only.

    Web workspaces require GitHub sign-in. Register a GitHub App with no repository or organization permissions. Keep its client secret on the server only.

  • GITHUB_CLIENT_SECRET
  • GROQ_API_KEY
  • KOMA_CONFIG_SECRET
  • KOMA_DATABASE_PATH./data/koma.sqlite
  • LOCAL_STORAGE_PATH./data/storage
  • MAX_CONCURRENT_JOBS2
  • MAX_DURATION_SECONDS900
  • MAX_FRAMES18
  • MAX_UPLOAD_BYTES524288000
  • OPENAI_API_KEY
  • OPENROUTER_API_KEY
  • OSS_ACCESS_KEY_ID
  • OSS_ACCESS_KEY_SECRET
  • OSS_BUCKET
  • OSS_PUBLIC_BASE_URL
  • OSS_REGION
  • OSS_SIGNED_URL_SECONDS900
  • OSS_TIMEOUT_MS120000Timeout for each OSS request; large files use multipart uploads.

    Timeout for each OSS request; large files use multipart uploads.

  • OSS_UPLOAD_PREFIXkoma
  • PORT3000
  • PUBLIC_BASE_URLSpeaker diarization currently uses DashScope's async Fun-ASR endpoint. PUBLIC_BASE_URL makes its temporary audio URL reachable by DashScope.

    Speaker diarization currently uses DashScope's async Fun-ASR endpoint. PUBLIC_BASE_URL makes its temporary audio URL reachable by DashScope.

  • STORAGE_DRIVERlocalPersistent media storage. Local is zero-config for development; production can use a private Aliyun OSS bucket. All Koma objects stay under this prefix.

    Persistent media storage. Local is zero-config for development; production can use a private Aliyun OSS bucket. All Koma objects stay under this prefix.

  • TRUST_PROXYfalseOptional guardrails for a small public demo. Set TRUST_PROXY=true behind nginx.

    Optional guardrails for a small public demo. Set TRUST_PROXY=true behind nginx.

  • VISION_API_KEYOnly needed for openai-compatible or to override a preset:

    Only needed for openai-compatible or to override a preset:

  • VISION_BASE_URL
  • VISION_MAX_FRAMES10
  • VISION_MAX_TOKENS
  • VISION_MODEL
  • VISION_PROVIDERmockVision providers: mock | dashscope | openai | gemini | openrouter | groq | openai-compatible

    Vision providers: mock | dashscope | openai | gemini | openrouter | groq | openai-compatible

  • VISION_TRANSCRIPT_CHARS30000

More in Video Processing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…