Files
compose-anything/src/opencut
2025-11-03 20:16:08 +08:00
..
2025-10-15 20:38:26 +08:00
2025-11-03 20:16:08 +08:00
2025-10-15 20:38:26 +08:00
2025-10-15 20:38:26 +08:00

# OpenCut

English | 中文

OpenCut is an open-source video editing and audio processing platform.

Prerequisites

Before deploying OpenCut, you need to:

  1. Visit FreeSound.org and create an account
  2. Create an API application in your account settings to get your client ID and API key
  3. Build the OpenCut web image from source (see OpenCut GitHub)

Quick Start

  1. Copy the example environment file:

    cp .env.example .env
    
  2. Required Configuration - Edit .env and set these mandatory variables:

    • POSTGRES_PASSWORD: Database password (change from default!)
    • SERVERLESS_REDIS_HTTP_TOKEN: Random token for Redis HTTP interface
    • OPENCUT_BETTER_AUTH_SECRET: Random secret key for authentication
    • OPENCUT_FREESOUND_CLIENT_ID: Your FreeSound client ID
    • OPENCUT_FREESOUND_API_KEY: Your FreeSound API key
  3. Optional Configuration - For transcription features, set:

    • OPENCUT_CLOUDFLARE_ACCOUNT_ID
    • OPENCUT_R2_ACCESS_KEY_ID
    • OPENCUT_R2_SECRET_ACCESS_KEY
    • OPENCUT_R2_BUCKET_NAME
    • OPENCUT_MODAL_TRANSCRIPTION_URL
  4. Start the service:

    docker compose up -d
    
  5. Access the web interface at http://localhost:3100

Services

  • web: The OpenCut web application
  • db: PostgreSQL database
  • redis: Redis cache
  • serverless-redis-http: Redis HTTP interface for Upstash compatibility

Configuration

Version Configuration

  • POSTGRES_VERSION: PostgreSQL version, default is 17
  • REDIS_VERSION: Redis version, default is 7-alpine
  • SERVERLESS_REDIS_HTTP_VERSION: Serverless Redis HTTP version, default is latest
  • OPENCUT_WEB_IMAGE: OpenCut web image name, default is opencut/web:latest

Port Configuration

  • POSTGRES_PORT_OVERRIDE: PostgreSQL host port, default is 5432
  • REDIS_PORT_OVERRIDE: Redis host port, default is 6379
  • SERVERLESS_REDIS_HTTP_PORT_OVERRIDE: Redis HTTP interface host port, default is 8079
  • OPENCUT_WEB_PORT_OVERRIDE: Web application host port, default is 3100

Database Configuration

  • POSTGRES_USER: Database username, default is opencut
  • POSTGRES_PASSWORD: Database password, required
  • POSTGRES_DB: Database name, default is opencut

Redis Configuration

  • SERVERLESS_REDIS_HTTP_TOKEN: Token for Redis HTTP interface, required

Application Configuration

  • TZ: Timezone, default is UTC
  • OPENCUT_BETTER_AUTH_URL: Auth service URL, default is http://localhost:3100
  • OPENCUT_BETTER_AUTH_SECRET: Auth secret key, required
  • OPENCUT_FREESOUND_CLIENT_ID: FreeSound client ID, required
  • OPENCUT_FREESOUND_API_KEY: FreeSound API key, required

Optional Transcription Configuration

Leave these blank to disable auto-captioning:

  • OPENCUT_CLOUDFLARE_ACCOUNT_ID: Cloudflare account ID
  • OPENCUT_R2_ACCESS_KEY_ID: R2 access key ID
  • OPENCUT_R2_SECRET_ACCESS_KEY: R2 secret access key
  • OPENCUT_R2_BUCKET_NAME: R2 bucket name
  • OPENCUT_MODAL_TRANSCRIPTION_URL: Modal transcription service URL

Volumes

  • postgres_data: PostgreSQL data storage

Resource Limits

Service CPU Limit Memory Limit CPU Reserved Memory Reserved
web 2.00 2G 0.50 512M
db 2.00 1G 0.50 256M
redis 1.00 512M 0.25 128M
serverless-redis-http 1.00 256M 0.25 64M

Security Notes

⚠️ Important Security Recommendations:

  • Change all default passwords and secrets before deploying to production
  • Use strong, randomly generated values for:
    • POSTGRES_PASSWORD
    • SERVERLESS_REDIS_HTTP_TOKEN
    • OPENCUT_BETTER_AUTH_SECRET
  • Never commit .env file with real credentials to version control
  • Consider setting up a reverse proxy with HTTPS for external access
  • Restrict database and Redis ports to internal network in production
  • Keep the FreeSound API keys secure

Building from Source

Since OpenCut doesn't provide pre-built Docker images, you need to build it yourself:

# Clone the OpenCut repository
git clone https://github.com/OpenCut-app/OpenCut.git
cd OpenCut

# Build the web image
docker build -t opencut/web:latest -f apps/web/Dockerfile .

# Return to your compose directory and start services
cd /path/to/compose-anything/src/opencut
docker compose up -d

Reference

License

Please refer to the official OpenCut project for license information.