Skip to Content

Requirements and sizing

The server, disk, memory and DNS names ClipMux needs, and how to size them for your library.

ClipMux runs on one Linux server with Docker. This page lists what that server needs before you install, what the installer checks for you, and how to size the disk and memory for the videos you expect.

The server

NeedWhy
Linux on amd64 or arm64The images are built for those two architectures. The installer refuses any other.
Docker with the Compose v2 plugin (docker compose)The stack is a Compose project. Run the installer as root, or as a user in the docker group.
Ports 80 and 443 freeThe bundled Caddy serves HTTP and HTTPS on them, and gets a certificate for each of your hostnames. If another proxy already owns them, see Behind your own reverse proxy.
A kernel with Landlock (5.13 or later, enabled in the kernel's LSM list)The built-in encoder confines ffmpeg with Landlock and seccomp. Without Landlock it doesn't start, and uploads wait in processing until another encoder takes them.

Most current distributions' kernels have Landlock on. If yours doesn't, you can still run ClipMux and encode on Modal, RunPod or a PC you own.

Two DNS names

Point two hostnames at the server before you finish setup, for example:

  • video.example.com, the public URL: the dashboard, the API, and where browsers send uploads when videos are stored on this server.
  • media.example.com, the media URL: where viewers' players fetch video.

Put the media hostname on a different registrable domain from the public URL if you can (example-media.com rather than media.example.com), so a hostile stored file can never reach the dashboard's cookies. You can leave the media URL blank to serve playback from the public URL, but that is for trying ClipMux out, not for production.

If you'll encode on Modal or RunPod, the public URL must be reachable from the internet: their machines call your server for each job.

What the installer checks

Before it downloads anything, the installer checks:

  • that docker compose works and Docker answers;
  • the machine's architecture;
  • free disk space, in the install directory and in Docker's own directory (usually /var/lib/docker): it stops below 4 GiB, and warns below 20 GiB;
  • on a first install, that ports 80 and 443 (or the ports you chose) are free, when ss is there to ask.

Disk

Everything ClipMux keeps on the server lives in Docker volumes: Postgres, and the data volume, which holds videos stored on this server and the encoder's scratch space. Plan for three things:

  • The originals. ClipMux keeps every upload as it arrived, so it can encode it again.
  • The encoded files. The renditions' video bitrates add up to about 10.3 Mbit/s for a 1080p source and 38 Mbit/s for a 4K one, and real files come in under that. Measured on lectures: 67 minutes of 1080p made 5.2 GB of encoded files, and 54 minutes of 4K made 5.9 GB.
  • Room to encode. An encode needs about three times the source's size free in the encoder's scratch space while it runs.

If you store videos in a bucket instead, only the scratch space stays on the server. See Where videos are stored.

CPU or GPU

The built-in encoder uses the server's GPU when Docker gives the container one: NVIDIA through NVENC, AMD and Intel through VAAPI. Otherwise it encodes on the CPU with libx264. Encoding runs at idle priority, so the API and playback stay responsive while it works, but a CPU encode of a long or 4K video takes a long time. Each media tool is limited to 8 GiB of memory by default (CLIPMUX_TOOL_MEMORY_MB).

A small VPS can hand encoding to a cloud GPU or a PC instead. See Encode on this server for passing a GPU into the container, and Encoding performance for measured times.

Memory for subtitles

Subtitles come from whisper.cpp, which runs inside the encoder. Its model (large-v3-turbo, quantised) is about 0.9 GB and is already in the image, so nothing is downloaded. With CLIPMUX_SPEECH left at auto, the encoder transcribes on a GPU when one passes its test, and otherwise on the CPU only when the machine has at least 4 cores and 6 GiB of memory. On a smaller server, subtitles need a speech API or another encoder.

One server process

ClipMux supports one serve process. Rate limits, sign-in limits, the setup token and several caches live in that process's memory, so a second replica behind a load balancer would not share them. To grow, move work off the server: storage to a bucket, encoding to a cloud GPU, playback to Cloudflare.

Control-plane capacity

The capacity test ramps from 10 to 200 API reads per second, with one multipart upload per second. It measures an asset lookup, a 100-asset catch-up page, an app lookup and the upload create, sign and complete calls. A simulated encoder claims each job and reports a terminal result. The webhook goes to a receiver on the same host. The claim measurement starts when the job is queued. The webhook measurement starts when the event is written.

For this workload, the sizing objectives are 99.9% successful API requests, API p95 under 200 ms on each route, enqueue-to-claim p95 under 2 seconds with an available worker, and event-to-webhook p95 under 10 seconds with a healthy receiver. Remote worker wake-up, encoding time and internet latency add to the time an integration sees. Use the monitoring recording rules to track your own API response times and server errors.

The November 2026 run used a shared 2-vCPU ARM64 VM and PostgreSQL 18.6. ClipMux, Postgres and the load generator had 4 GiB of memory limits combined. Each column shows p50 / p95 in milliseconds over one minute.

Operation10 reads/s50 reads/s100 reads/s200 reads/s
List 100 assets4.9 / 18.24.8 / 17.44.6 / 34.45.2 / 255.5
Read an asset3.2 / 9.32.8 / 11.12.7 / 25.43.3 / 236.2
Read app details2.8 / 10.82.5 / 8.02.5 / 20.12.6 / 229.9
Create an upload7.8 / 22.27.9 / 26.27.8 / 34.611.9 / 197.5
Sign upload parts2.7 / 10.42.6 / 11.23.2 / 12.45.8 / 132.6
Complete an upload5.5 / 19.25.7 / 23.47.8 / 37.511.7 / 118.4
Enqueue to claim401 / 986402 / 968468 / 972448 / 991
Event to webhook delivery2,373 / 4,5162,551 / 4,6422,481 / 4,8102,446 / 4,559

The run met all four objectives through 100 reads/s plus one upload/s. At 200 reads/s, the three read routes exceeded the p95 objective and the load generator dropped 187 of 12,000 scheduled reads. Every read that reached ClipMux succeeded in this run.

With R2 storage, a 1 GiB upload takes 32 part PUTs of 32 MiB each. R2 receives all 1 GiB directly from the uploader. On a successful upload with one signing batch, ClipMux handles three API calls to create the upload, sign the parts and complete it. With Cloudflare Worker delivery and a video whose encoded files are in R2, 100 viewers averaging 5 Mbit/s each receive about 500 Mbit/s from Cloudflare. The ClipMux origin serves zero of those media bytes. Budget origin bandwidth separately for files still served through origin fallback.

Next

On this page