Install from source with Compose
Build the ClipMux image from a clone of the repository and run it with Docker Compose.
The one-line installer runs a published release. To run a commit of your
own, or to change the code, build the image from a clone instead. You get
the same stack: the app, Postgres and Caddy, defined in
deploy/compose.yml.
Before you start
- A server that meets the requirements,
with
gitandopenssl. - Ports 80 and 443 free, or see Behind your own reverse proxy.
Build and start
Clone the repository
git clone https://github.com/visheshgubrani/clipmux && cd clipmuxWrite deploy/.env
cp deploy/compose.env.example deploy/.envFill in the two required values:
-
POSTGRES_PASSWORD: any long random string, for example fromopenssl rand -hex 24. -
CLIPMUX_SECRETS_KEY:v1:and 64 hex digits. Generate it once:echo "v1:$(openssl rand -hex 32)"
The file also has commented-out lines for CLIPMUX_PUBLIC_URL and
CLIPMUX_MEDIA_URL (to pin the URLs instead of choosing them in the
dashboard) and the host ports
CLIPMUX_HTTP_PORT, CLIPMUX_HTTPS_PORT and CLIPMUX_ADMIN_PORT.
Never commit deploy/.env.
Copy the secrets key somewhere off the server as well. Without it, a database backup can't be restored: every stored secret and every encoded video becomes unusable.
Build and start the stack
docker compose -f deploy/compose.yml up -d --build --waitThis builds the image, with FFmpeg, Shaka Packager and whisper.cpp, which takes a while the first time. Postgres starts first, then the app, then Caddy.
Get the setup token
docker compose -f deploy/compose.yml logs app | grep setup_tokenOpen http:// and the server's address, and continue with
First run.
How it differs from the installer
-
The image is built from your checkout and tagged
clipmux:local, rather than pulled from the registry. -
Settings live in
deploy/.env, not/opt/clipmux/.env, and everydocker composecommand needs-f deploy/compose.yml. -
Cloud GPUs on Modal and RunPod can't run your local image. A local build names no worker image for them, so when you connect one, enter an image they can pull under Advanced, Worker image.
-
You upgrade with git, not the installer:
git pull docker compose -f deploy/compose.yml up -d --build --waitThe app applies new database migrations when it starts. See Upgrade and uninstall.
Check it works
docker compose -f deploy/compose.yml ps
curl -fsS http://127.0.0.1:8080/readyzAll three services show healthy, and readyz prints ok.
- Compose refuses to start with
set POSTGRES_PASSWORD in deploy/.envorset CLIPMUX_SECRETS_KEY in deploy/.env: that value is empty. - The app keeps restarting:
docker compose -f deploy/compose.yml logs appends with the reason, for example a variable that doesn't parse.