Download docs/setup.md from new-arc/vector: direct link, hf CLI and curl.
- Browser
- Download file 8.31 kB
-
https://huggingface.co/spaces/new-arc/vector/resolve/main/docs/setup.md
- Command line
-
hf download hf://spaces/new-arc/vector/docs/setup.md
-
curl -L -o setup.md https://huggingface.co/spaces/new-arc/vector/resolve/main/docs/setup.md
Setup
This guide covers the recommended Docker setup, local development mode, and the checks to perform after first boot.
Requirements
Required software
- Docker Desktop or a Docker Engine installation with Compose support
- Git
Required credentials
ASSEMBLY_AI_API_KEY- One LLM provider configuration:
OPENAI_API_KEYwithLLM=openai:...GOOGLE_API_KEYwithLLM=google-gla:...ANTHROPIC_API_KEYwithLLM=anthropic:...OPENROUTER_API_KEYwithLLM=openrouter:<vendor>/<model>LLM=ollama:...with an available Ollama server, optionallyOLLAMA_BASE_URL
Optional credentials
PEXELS_API_KEYfor AI B-roll sourcingNEXT_PUBLIC_DATAFAST_WEBSITE_IDandNEXT_PUBLIC_DATAFAST_DOMAINfor DataFast analyticsAWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, andSES_FROM_EMAILfor hosted billing emails- Stripe keys if you are running with monetization enabled
- Discord webhook URLs for feedback forwarding
Recommended Setup: Docker
Docker is the intended path for running SupoClip because it starts the frontend, backend, worker, PostgreSQL, and Redis together with the expected wiring.
1. Clone the repository
git clone <your-repo-url>
cd supoclip
2. Create a local environment file
cp .env.example .env
Then edit .env and set at least:
ASSEMBLY_AI_API_KEY=your_assemblyai_key
LLM=google-gla:gemini-3-flash-preview
GOOGLE_API_KEY=your_google_key
BETTER_AUTH_SECRET=replace_this_for_real_use
BACKEND_AUTH_SECRET=replace_this_if_using_hosted_mode
# Optional: DataFast analytics
NEXT_PUBLIC_DATAFAST_WEBSITE_ID=dfid_xxxxx
NEXT_PUBLIC_DATAFAST_DOMAIN=your-domain.com
NEXT_PUBLIC_DATAFAST_ALLOW_LOCALHOST=false
3. Start the stack
Fastest option:
./start.sh
Manual equivalent:
docker-compose up -d --build
4. Wait for services to become healthy
docker-compose logs -f
docker-compose ps
You should see these services:
supoclip-frontendsupoclip-backendsupoclip-workersupoclip-postgressupoclip-redis
5. Open the application
- Frontend:
http://localhost:3107 - Backend API:
http://localhost:8000 - FastAPI docs:
http://localhost:8000/docs
The template sets FRONTEND_PORT=3107. Existing .env files without this
setting retain the legacy Docker host port 3001; use http://localhost:3001
or add FRONTEND_PORT=3107 and recreate the frontend. The container always
listens on 3107.
For production, preserve the port your reverse proxy uses (for example,
FRONTEND_PORT=3001). Keep NEXT_PUBLIC_APP_URL, BETTER_AUTH_URL, and
CORS_ORIGINS set to your public HTTPS origin. For local custom ports, set
those URLs/origins to match the port you chose. Changing NEXT_PUBLIC_*
values for a production image requires rebuilding the frontend.
What Docker Starts
CPU-only Docker builds (including Apple Silicon)
The current template sets BACKEND_CPU_ONLY=true, selecting the locked
CPU-only Torch wheels for both backend and worker. Existing .env files
without the setting keep the legacy CUDA dependency path. To opt in:
BACKEND_CPU_ONLY=true
Then run docker compose up -d --build backend worker. Changing
TRANSCRIPTION_PROVIDER alone does not change the installed Torch variant.
BACKEND_CPU_ONLY avoids NVIDIA downloads. It does not enable Apple GPU
acceleration. GPU deployments should retain BACKEND_CPU_ONLY=false and their
existing GPU runtime configuration. Local Python users can select
uv sync --extra cpu or uv sync --extra cuda; these extras are mutually
exclusive.
Backend and worker images default to linux/amd64 (BACKEND_PLATFORM). On
Apple Silicon, Docker runs that image under emulation. yt-dlp's YouTube
metadata step can then take around 15 seconds, so task creation waits up to
YOUTUBE_PREFLIGHT_TIMEOUT_SECONDS (default 30). If valid YouTube links still
report that the length check timed out, set the timeout higher (for example
60) and restart the backend.
To build those two services for the host architecture, set
BACKEND_PLATFORM=linux/arm64 and BACKEND_CPU_ONLY=true, then run
docker compose up -d --build backend worker. CUDA wheels are published for
amd64, so GPU machines should keep BACKEND_PLATFORM=linux/amd64. Native
arm64 images are best-effort: this does not publish a multi-arch image and
does not add Apple GPU acceleration.
The default Compose stack contains five services:
frontend- Next.js application on port
3107 - Proxies authenticated requests to the backend
- Next.js application on port
backend- FastAPI API on port
8000 - Provides task, media, billing, admin, and feedback endpoints
- FastAPI API on port
worker- ARQ background worker
- Processes long-running video jobs from Redis
postgres- Stores users, sessions, tasks, sources, clips, billing metadata, and auth rotation state
redis- Backs the job queue and progress event flow
First-Run Checklist
After the stack is up:
- Load the homepage at
http://localhost:3107. - Create an account or sign in.
- Submit a YouTube, Twitch, or Kick URL, or upload a video file.
- Open the task page and confirm progress updates appear.
- Wait for clip generation to finish.
- Open the clips list and verify playback and download work.
- If DataFast is enabled, open browser devtools and confirm
/js/script.jsand/api/eventsload from your own domain. - Trigger one successful action such as sign-up, sign-in, task creation, or feedback submission and verify the goal arrives in DataFast.
Local Development Without Docker
Use this mode if you need to iterate on a single app directly. You still need PostgreSQL and Redis running somewhere.
Backend
cd backend
uv venv .venv
source .venv/bin/activate
uv sync
uvicorn src.main:app --reload --host 0.0.0.0 --port 8000
In a second terminal:
cd backend
source .venv/bin/activate
arq src.workers.tasks.WorkerSettings
Frontend
cd frontend
pnpm install --frozen-lockfile
pnpm run dev
Required local dependencies
- Python 3.11+
- Node.js compatible with Next.js 15
- PostgreSQL
- Redis
- FFmpeg available to the backend environment
Data and Volumes
With Docker, SupoClip stores persistent data in named volumes:
postgres_dataredis_datauploadsclips
The backend also mounts these local directories:
backend/fontsbackend/transitions
Hosted Mode Versus Self-Hosted Mode
SupoClip defaults to self-host mode:
SELF_HOST=true
When SELF_HOST=false, monetization and hosted billing flows become active. That mode requires additional Stripe and backend auth configuration. See Configuration.
Production Setup Notes
For anything beyond local experimentation:
- Change
BETTER_AUTH_SECRET - Set a strong
BACKEND_AUTH_SECRET - Put the app behind HTTPS
- Set
NEXT_PUBLIC_APP_URLto your deployed frontend origin - Use persistent storage and backups for PostgreSQL
- Keep API keys outside version control
- Decide whether you want self-host mode or monetized hosted mode before launch
- Verify all callback URLs and origins match your deployed domain
- If using DataFast, set
NEXT_PUBLIC_DATAFAST_DOMAINto the deployed root domain you want tracked - For hosted billing, create and verify the Stripe prices before deploy: Pro at
$9.99/monthand$99.90/year, Creator (scale) at$24.99/monthand$249.90/year; keep the earlier Pro price inSTRIPE_PRO_LEGACY_PRICE_IDS. Add the yearly prices to the customer portal's plan-switching products so subscribers can move between them
Useful Commands
Start or rebuild
docker-compose up -d --build
Stream logs
docker-compose logs -f
docker-compose logs -f backend
docker-compose logs -f worker
Stop services
docker-compose down
Reset containers and volumes
docker-compose down -v
docker-compose up -d --build
Warning: docker-compose down -v deletes database and Redis data.
Next Steps
- Review Configuration before changing defaults
- Review App Guide to understand the UI and workflows
- Review Troubleshooting if tasks do not process correctly