Install with one line
Run the installer to start ClipMux, Postgres and Caddy on your server, and get the setup token.
One command installs ClipMux from the latest release. When it finishes, the
app, Postgres and Caddy are running under Docker in /opt/clipmux, and the
installer prints the address to open and the setup token that creates the
owner account.
Before you start
- A server that meets the requirements: Linux on amd64 or arm64, Docker with Compose v2, ports 80 and 443 free.
- Root, or a user in the
dockergroup. - Two DNS names pointing at the server, for example
video.example.comandmedia.example.com. You can install before DNS is ready, but you need both names to finish first run.
Run the installer
curl -fsSL https://clipmux.com/install.sh | sudo shhttps://clipmux.com/install.sh redirects to install.sh on the latest
GitHub release (until v1.0.0, the newest release candidate). The script then:
- Checks Docker, Compose, the architecture, free disk space and, on a first install, that ports 80 and 443 are free.
- Downloads the release's
SHA256SUMS,compose.ymlandCaddyfile, and checks both files againstSHA256SUMS. It never runs anything it downloads. - Writes
.envwith a random Postgres password and a new secrets key, readable only by root. - Pulls the images and starts the stack, waiting up to 10 minutes for it to become healthy. Pulling takes a few minutes the first time.
- Reads the setup token from the app's log and prints it.
What lands in /opt/clipmux
.envholdsCLIPMUX_VERSION(the release),POSTGRES_PASSWORDandCLIPMUX_SECRETS_KEY, which seals every secret ClipMux keeps in Postgres. It also has commented-outCLIPMUX_PUBLIC_URLandCLIPMUX_MEDIA_URLlines, for pinning the URLs instead of choosing them in the dashboard. Keep this file.compose.ymlruns three services:app(ClipMux),postgresandcaddy. The app is published only on127.0.0.1:8080, for commands on the host; everything else reaches it through Caddy.Caddyfilenames no hostnames. Caddy asks ClipMux before it gets a certificate, and ClipMux approves only the public and media URLs you set.
Your videos, Postgres and Caddy's certificates live in Docker volumes
(data, pgdata, caddy-data), not in this folder.
What it prints
ClipMux v1.0.0 is running.
Open: http://203.0.113.10
http://10.0.0.5 from the server's own network
Ports 80 and 443 must be open to it: check the cloud firewall
or security group, if there is one.
Setup token: N4V3…
Secrets key: v1:…
Store this off the host, with your database backups.- Open is first the address the internet sees the server at, which the
installer asks clipmux.com's CDN for (
https://clipmux.com/cdn-cgi/trace, the host the script came from), then the server's own address, when the two differ. On a cloud VM or behind NAT the own address is private, so open the first. A home server whose router doesn't forward ports 80 and 443 is reached at the second from its own network. If the lookup fails, the installer prints the own address and says when it is private. Your DNS names work as well once they point at the server. - Setup token creates the owner account. It works for a day; restarting
the app prints a new one. If the installer couldn't find it, run
cd /opt/clipmux && sudo docker compose logs app | grep setup_token. - Secrets key is also in
.env. Copy it somewhere off the server now. Without it, a database backup can't be restored: every stored secret and every encoded video becomes unusable.
Options
Pass options to the script after sh -s --:
curl -fsSL https://clipmux.com/install.sh | sudo sh -s -- --version v1.0.0| Option | What it does |
|---|---|
--version vX.Y.Z | Installs that release instead of the latest. |
--dir DIR | Installs in DIR instead of /opt/clipmux. Pass the same --dir when you upgrade or uninstall. |
--restore | On a new server: restores the latest backup from the target your saved .env names, then starts ClipMux. Put the .env in the install directory first. See Back up and restore. |
--uninstall | Stops and removes the stack, keeping the volumes and .env. See Upgrade and uninstall. |
--purge | With --uninstall, also deletes the volumes and the folder. |
Installer variables
The installer reads these from its environment. Put them after sudo so
they reach the script:
curl -fsSL https://clipmux.com/install.sh | sudo CLIPMUX_ADMIN_PORT=8090 sh| Variable | Default | What it does |
|---|---|---|
CLIPMUX_HTTP_PORT | 80 | The host port for Caddy's HTTP. Saved in .env on the first install. |
CLIPMUX_HTTPS_PORT | 443 | The host port for Caddy's HTTPS. Saved in .env on the first install. |
CLIPMUX_ADMIN_PORT | 8080 | The loopback port the app is published on, for commands on the host. Saved in .env on the first install. |
CLIPMUX_IMAGE | ghcr.io/visheshgubrani/clipmux | The image, without its tag, for a mirror. Saved in .env when set. |
CLIPMUX_RELEASE_URL | the release on GitHub | Where to download SHA256SUMS, compose.yml and Caddyfile from, for a mirror. |
Caddy's certificates come from Let's Encrypt, which connects to ports 80 and 443 from the internet. Other HTTP and HTTPS ports only work if something forwards 80 and 443 to them.
Check it works
curl -fsS http://127.0.0.1:8080/readyzIt prints ok once the app is up and Postgres answers (use your
CLIPMUX_ADMIN_PORT if you changed it). Then open the
printed address in a browser: the page asks for the setup token.
If the installer stopped instead:
port 80 is in use: another web server owns the port. Stop it, or follow Behind your own reverse proxy.only N GiB free under …: free disk space; ClipMux needs at least 4 GiB.can't reach Docker: run it withsudo, or as a user in thedockergroup.ClipMux didn't become healthy: the app's last 50 log lines are printed above the error. The last line says why, for example a variable that doesn't parse.
Next
- First run: create the owner, set the URLs, run the setup test
- Requirements and sizing
- Upgrade and uninstall