Skip to main content

Overview

This guide covers two installation scenarios:
  1. Development setup — For contributing to OpenCut or running it locally
  2. Self-hosting with Docker — For running your own production instance

Development setup

Set up a local development environment

Self-hosting

Deploy your own production instance

Development setup

Prerequisites

Before you begin, ensure you have:

Bun

Required — JavaScript runtime (v1.2.18+)Install Bun

Docker

Optional — For database and RedisInstall Docker

Node.js

Alternative — v18 or later if not using BunInstall Node.js

Git

Required — For cloning the repositoryInstall Git
Docker is optional but recommended. If you only want to work on frontend features, you can skip the Docker setup.

Step 1: Clone the repository

Fork and clone the OpenCut repository:
Contributing? Make sure to fork the repository first so you can submit pull requests later.

Step 2: Environment configuration

Copy the example environment file and configure it:
Edit apps/web/.env.local with your configuration:
apps/web/.env.local
You need a secure secret for authentication. Generate one using any of these methods:
Or use an online generator: generate-secret.vercel.app/32
The default values in .env.example match the Docker Compose configuration and should work out of the box for local development.

Step 3: Start services

If using Docker, start the database and Redis services:
This starts:
  • PostgreSQL on localhost:5432
  • Redis on localhost:6379
  • Serverless Redis HTTP on localhost:8079
Check if services are running:
View logs:
Stop services:

Step 4: Install dependencies

Install project dependencies:
If you see Unsupported URL Type "workspace:*" with npm, upgrade to npm v9+ or use Bun/pnpm instead.

Step 5: Database setup

Run database migrations (only if using Docker):
Available database commands:

Step 6: Start development server

Start the Next.js development server:
The application will be available at http://localhost:3000.
Success! Your development environment is ready. Changes to the code will automatically reload thanks to hot module replacement.

Self-hosting with Docker

Run your own production instance of OpenCut using Docker Compose.

Prerequisites

  • Docker and Docker Compose
  • A server or VPS with at least 2GB RAM
  • (Optional) A domain name for public access

Quick deployment

The simplest way to run OpenCut in production:
1

Clone the repository

2

Configure environment

Create a .env file in the project root for production configuration:
.env
Never commit your .env file! It contains sensitive credentials. The file is already in .gitignore.
3

Start all services

This builds and starts:
  • OpenCut web application
  • PostgreSQL database
  • Redis cache
  • Serverless Redis HTTP adapter
The app will be available at http://localhost:3100.

Docker Compose configuration

The docker-compose.yml includes all necessary services:
docker-compose.yml
To change the external port, edit the ports mapping in docker-compose.yml:

Production considerations

For production, use a reverse proxy like Nginx or Caddy:Nginx example:
Caddy example:
Use Let’s Encrypt for free SSL certificates:
Update NEXT_PUBLIC_SITE_URL in your environment:
Set up automated PostgreSQL backups:
Consider using automated backup solutions like:
View logs:
Consider adding monitoring:
Set resource limits in docker-compose.yml:

Project structure

Understanding the codebase structure:
See AGENTS.md in the repository for detailed architecture documentation.

Troubleshooting

If ports are already in use:
Common Docker problems:
If the build fails:
Verify database connectivity:

Next steps

Contributing

Learn how to contribute to OpenCut

Architecture

Understand the editor architecture

Core concepts

Learn about the editor core system

API reference

Explore the API documentation