Skip to main content
Open Animate is fully open source (Apache 2.0). You can run the entire platform on your own infrastructure.

Prerequisites

  • Node.js 18+
  • PostgreSQL 15+
  • A fal.ai API key (for asset generation)
  • AWS credentials with S3 + Lambda access (for cloud rendering)
  • A Stripe account (for billing, optional)
  • A Clerk application (for authentication)

Quick start with Docker

1
Start the database
2
git clone https://github.com/jacobcwright/open-animate.git
cd open-animate/packages/api

docker-compose up -d
3
This starts PostgreSQL 15 on port 5432.
4
Configure environment
5
Create .env from the example:
6
cp .env.example .env
7
Edit .env with your values:
8
# Database
DATABASE_URL=postgres://oanim:oanim@localhost:5432/oanim

# Authentication (Clerk)
CLERK_DOMAIN=your-app.clerk.accounts.dev
CLERK_PUBLISHABLE_KEY=pk_test_...

# Media Gateway (fal.ai)
FAL_KEY=your-fal-ai-key

# Storage (S3-compatible)
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret
AWS_REGION=us-east-1
S3_BUCKET=oanim-renders

# Cloud rendering (Remotion Lambda)
REMOTION_FUNCTION_NAME=remotion-render-xxx

# Billing (Stripe) — optional
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Server
PORT=8000
9
Start the API
10
pnpm install
pnpm build
pnpm start
11
Point the CLI at your instance
12
# Via environment variable
export ANIMATE_API_URL=http://localhost:8000

# Or via config file
# ~/.oanim/config.yaml
# api_url: http://localhost:8000
13
Then use the CLI normally:
14
oanim login
oanim assets gen-image --prompt "gradient" --out public/bg.png

Environment variables

VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string
CLERK_DOMAINYesClerk OAuth domain
CLERK_PUBLISHABLE_KEYYesClerk publishable key for browser auth
FAL_KEYYesfal.ai API key for media gateway
AWS_ACCESS_KEY_IDFor cloud renderAWS access key
AWS_SECRET_ACCESS_KEYFor cloud renderAWS secret key
AWS_REGIONFor cloud renderAWS region (default: us-east-1)
S3_BUCKETFor cloud renderS3 bucket for render bundles and outputs
REMOTION_FUNCTION_NAMEFor cloud renderRemotion Lambda function name
STRIPE_SECRET_KEYFor billingStripe secret key
STRIPE_WEBHOOK_SECRETFor billingStripe webhook signing secret
PORTNoServer port (default: 8000)
New users receive a $5.00 credit balance on signup. Without Stripe configured, users won’t be able to purchase additional credits, but existing balances still work.

Direct provider keys

For asset generation without running the platform API, users can set ANIMATE_FAL_KEY to go directly to fal.ai:
export ANIMATE_FAL_KEY=your-fal-key
oanim assets gen-image --prompt "gradient" --out bg.png
This bypasses the platform entirely — no API server, database, or auth required.

docker-compose.yml

The included docker-compose.yml runs PostgreSQL:
services:
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_USER: oanim
      POSTGRES_PASSWORD: oanim
      POSTGRES_DB: oanim
    ports:
      - '5432:5432'
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

Production considerations

For production deployments:
  • Database: Use strong passwords, enable SSL, and set up regular backups
  • Stripe webhooks: Configure the webhook endpoint at https://your-domain/api/v1/billing/webhook
  • Rate limiting: The API includes in-memory rate limiting (60 req/min for media, 10 req/min for auth). For multi-instance deployments, consider adding a Redis-backed rate limiter
  • HTTPS: Place the API behind a reverse proxy (nginx, Caddy) with TLS