The quickest way from a fresh Linux machine (Ubuntu, Debian, Raspberry Pi OS, Fedora) to a running MediaMTX UI: one command installs Docker if it is missing, asks how people will reach the server, starts everything and prints the address to open and the setup token. Running it again later upgrades to the newest release.
Open a terminal on the machine (how) and run:
curl -fsSL https://github.com/greatmastix/MediaMTXUI/releases/latest/download/install.sh | sudo bash(No curl yet? sudo apt install curl first.)
It asks one question, and one or two more depending on the answer:
- How will people reach it?
- 1, on the internet: at a domain name, with HTTPS from Let's Encrypt. It asks for the domain (and an optional e-mail address for expiry warnings) and checks that the domain points at this machine. You need the domain's A record and ports 80 and 443 open first: see Before you start.
- 2, on this local network only: at
http://<address>:8080, nothing reachable from the internet. It suggests this machine's address; press Enter to take it.
- Run docker without sudo? At the end it offers to add you to the
dockergroup, so thatdocker composecommands work withoutsudoafter you log in again. (That group can do anything root can; on a machine that is only for streaming, that is usually fine.)
When it is done, it prints something like:
Done. Open http://192.168.1.50:8080
Setup token: ABCD-EFGH-JKLM-NPQR
Install folder: /opt/mediamtx-ui (run docker compose commands there)
Open the address, enter the token, and create the first admin (the setup wizard). Then continue with First steps.
- Checks the machine: Linux, run as root, an architecture with an image (amd64, arm64, armv7), and its resources. Below 1 GB of memory or 5 GB of free disk it stops; below 2 GB of memory, with little memory free right now, or below 25 GB of free disk it warns and asks. A small machine without swap gets the offer of a 2 GB swap file (why).
- Installs
curland Docker with the Compose plugin if they are missing, with Docker's own install script (Install Docker), and starts Docker on boot. - Asks the questions above, and refuses if ports it needs (80 and 443 or 8080, 1935, 8554) are in use already.
- Downloads the release's
compose.yamlandenv.example(as.env) into/opt/mediamtx-ui, pluscompose.lan.yamlfor a local install, and writes your answers into.env. - Downloads the images, starts the stack, and waits until it is healthy. A public install also requests its certificate right away and says whether that worked.
- Prints the address and the setup token.
The result is the same as the step-by-step Install or Local network only: the same
files and settings, so everything in these docs applies. Run docker compose commands in /opt/mediamtx-ui:
cd /opt/mediamtx-uiRun the same command again:
curl -fsSL https://github.com/greatmastix/MediaMTXUI/releases/latest/download/install.sh | sudo bashIt finds the existing install, downloads the newest release's compose files (keeping your .env), pulls the images
and restarts. Make a backup first (Backups page, Back up now). Details: Upgrading.
To answer the questions in advance (for example in your own scripts), pass options after bash -s --:
curl -fsSL https://github.com/greatmastix/MediaMTXUI/releases/latest/download/install.sh | sudo bash -s -- --local --yes| Option | Meaning |
|---|---|
--public DOMAIN |
On the internet at https://DOMAIN |
--email ADDRESS |
E-mail for Let's Encrypt's expiry warnings (public) |
--staging |
Let's Encrypt's staging server, for a first try (public; browsers warn about its certificate) |
--local [ADDRESS] |
On the local network, at http://ADDRESS:8080 (default: this machine's address) |
--dir PATH |
Another install folder than /opt/mediamtx-ui |
--version v1.2.3 |
A particular release instead of the newest |
--yes |
No questions: take the defaults, fail where there is none |
--skip-checks |
Install even where memory or disk are below the minimums |
Piping a script from the internet into sudo bash runs it as root without showing it to you. To look at it first,
download it, read it, then run it:
curl -fsSL -o install.sh https://github.com/greatmastix/MediaMTXUI/releases/latest/download/install.shless install.shsudo bash install.shThe script is scripts/install.sh in the repository; each release attaches the version it was tested with.