Installation Guide
This guide covers the complete installation process for OpenShorts, including environment configuration, optional integrations, and troubleshooting.System Requirements
Required
- Docker (version 20.10+)
- Docker Compose (version 2.0+)
- 4GB RAM minimum (8GB+ recommended for concurrent processing)
- 10GB free disk space (more for processing large videos)
Recommended
- GPU support (optional, for faster YOLOv8 processing)
- SSD storage (for faster video I/O)
- Multi-core CPU (for parallel clip processing)
OpenShorts runs entirely CPU-optimized by default. GPU acceleration is optional and provides marginal performance improvements.
Docker Installation
Review Docker Compose Configuration
The Backend (Python FastAPI):
docker-compose.yml defines two services:docker-compose.yml
- Runs on port
8000 - Handles video processing, AI analysis, and API endpoints
- Auto-restarts on failure
- Runs on port
5173(mapped to5175externally) - Provides the web dashboard interface
- Depends on backend service
Build and Start Services
First build downloads AI models (Faster-Whisper, YOLOv8, MediaPipe) and may take 3-5 minutes. Subsequent starts are instant.
Environment Configuration
Required API Keys
Google Gemini API Key (Required)
Google Gemini API Key (Required)
OpenShorts requires a Gemini API key for viral moment detection and title generation.Get your free API key:
- Visit Google AI Studio
- Sign in with your Google account
- Click “Create API Key”
- Copy the key
- The key is entered via the dashboard on first launch
- Stored encrypted in browser local storage
- Never stored server-side
- Sent only to Google Gemini API via headers
Upload-Post API Key (Optional)
Upload-Post API Key (Optional)
Required for direct social media posting to TikTok, Instagram, and YouTube.Setup:
Create Account
Sign up at app.upload-post.com/login
Free tier available with no credit card required
Create Profile
Go to Manage Users and create a user profile
Connect Social Accounts
In the same section, connect your TikTok, Instagram, or YouTube accounts to the profile
Generate API Key
Navigate to API Keys and generate your key
ElevenLabs API Key (Optional)
ElevenLabs API Key (Optional)
Required for AI voice dubbing to 30+ languages with voice cloning.Setup:
- Sign up at elevenlabs.io
- Navigate to your dashboard
- Copy your API key
- Enter it in OpenShorts dashboard settings
- Translate clips to 30+ languages
- Voice cloning preserves speaker characteristics
- Auto-generates subtitles in dubbed language
- Supports multiple voices per project
AWS S3 setup (optional)
Enable automatic backup of generated clips to AWS S3:Advanced Configuration
Concurrent Job Limit
Control how many videos can be processed simultaneously:.env
- Default: 5 concurrent jobs
- Low-end systems: Set to 1-2
- High-end servers: Set to 10+
Each concurrent job uses approximately 1-2GB RAM. Adjust based on your system’s available memory.
YouTube Cookie Authentication
Bypass bot detection for YouTube downloads:.env
Production API URL
Override the frontend API URL for production deployments:.env
Development Setup
For local development without Docker:- Backend
- Frontend
http://localhost:8000Troubleshooting
Port Already in Use
Port Already in Use
Error:
Bind for 0.0.0.0:8000 failed: port is already allocatedSolution:Out of Memory During Processing
Out of Memory During Processing
Symptoms: Container crashes, “Killed” messages in logsSolutions:
-
Reduce concurrent jobs:
.env
-
Increase Docker memory limit:
- Process shorter videos or reduce clip count
Gemini API Rate Limit Exceeded
Gemini API Rate Limit Exceeded
Error:
429 Too Many Requests from Gemini APISolutions:- Wait 60 seconds between requests (free tier limit)
- Upgrade to a paid Gemini API plan
- Reduce the number of clips requested per video
YouTube Download Failed
YouTube Download Failed
Error:
ERROR: unable to download video dataSolutions:- Try a different video URL
- Add YouTube cookies to
.env: - Update yt-dlp:
Frontend Can't Connect to Backend
Frontend Can't Connect to Backend
Error:
Network Error or Failed to fetch in browser consoleSolutions:-
Verify backend is running:
-
Check CORS configuration in
app.py - Ensure frontend is proxying to correct backend URL
-
Restart both services:
Clips Not Uploading to S3
Clips Not Uploading to S3
Symptoms: Clips generate but don’t appear in S3 bucketSolutions:
-
Verify AWS credentials:
-
Check IAM permissions (must include
s3:PutObject) -
Review backend logs for S3 errors:
-
Ensure bucket region matches
AWS_REGIONin.env
Security Best Practices
File Upload Security
- Max file size: 2GB (configurable in
app.py) - Automatic cleanup: Jobs purged after 1 hour
- Isolation: Each job runs in isolated directory
API Key Storage
- Client-side: Encrypted in browser localStorage
- Server-side: Never stored, only passed via headers
- Network: Use HTTPS in production
Production Deployment
For production deployments:- Use HTTPS: Deploy behind a reverse proxy (nginx, Traefik)
- Set environment variables: Use secrets management (AWS Secrets Manager, etc.)
- Enable authentication: Add auth middleware to
app.py - Monitor resources: Set up logging and alerting
- Backup strategy: Configure S3 lifecycle policies
Next Steps
Quickstart
Generate your first viral clip in 5 minutes
API Reference
Integrate OpenShorts into your applications
YouTube Studio
Learn about AI title and thumbnail generation
GitHub Issues
Report bugs or request features