OCTOPLEX(1)

NAME

octoplex🐙 Octoplex is a Docker-native live video restreamer.

SYNOPSIS

$brew install octoplex

INFO

100 stars
2 forks
0 views

DESCRIPTION

🐙 Octoplex is a Docker-native live video restreamer.

README

Octoplex :octopus:

build status scan status GitHub Release Go version Go Report Card License: AGPL v3

Octoplex is a Docker-native live video restreamer.

  • Restream live video to unlimited destinations
  • Add and remove destinations on-the-fly
  • Broadcast with OBS - or any RTMP or RTSP encoder
  • Automatic reconnections on drop
  • Automatic TLS certificate generation for RTMPS and RTSPS
  • Web and terminal UIs with live metrics and health
  • Command-line interface for scripting and automation

Table of Contents

Quick start :checkered_flag:

  1. Install Octoplex

See the Installation section below.

  1. Launch all-in-one mode

Starts the server and the terminal UI in a single process — ideal for local testing.

octoplex run
  1. Point your encoder (OBS, FFmpeg, etc) at the RTMP server:

Full examples are in Restreaming with Octoplex.

rtmp://localhost:1935/live         # stream key: live

Or, if your encoder supports RTMPS:

rtmps://localhost:1936/live        # self-signed TLS certificate by default

That's it: your local restreamer is live. :tada:

User interfaces :computer:

Octoplex provides two interactive user interfaces with equivalent functionality:

  • Terminal UI - Launch in your terminal for a text-based interface with real-time metrics and interactive controls.
  • Web UI - Launch in your browser for a graphical user interface.

If you followed the Quick Start section, then you've already launched the terminal UI! You can try out the web interface now by visiting http://localhost:8080.

See Web interface for more.

Screenshots

Web:

Octoplex web interface

Terminal UI:

Octoplex terminal user interface

How it works :wrench:

Octoplex server runs on your Docker host (as a container or daemon process) and spins up MediaMTX and FFmpeg containers that ingest your feed and rebroadcast it anywhere you point them.

It handles reconnection, TLS, and container wiring so you can focus on your content.

         +------------------+             +-------------------+
         |      OBS          |   ----->   |     Octoplex      |
         |   (Encoder)       |   RTMP/S   |                   |
         +------------------+             +-------------------+
                                                 |
                                                 | Restream to multiple destinations
                                                 v
              +------------+     +------------+     +------------+     +--------------+
              |  Twitch.tv |     |   YouTube  |     | Facebook   |     |  Other       |
              +------------+     +------------+     +------------+     | Destinations |
                                                                       +--------------+

:warning: Warning - alpha software: Octoplex is in active development. Features and configuration settings may change between releases. Double-check your security configuration and exercise extra caution before deploying to public-facing networks. See the Security section for more.

Installation :electric_plug:

Docker Engine (only if you'll run Octoplex locally)

Linux: See https://docs.docker.com/engine/install/.

macOS: https://docs.docker.com/desktop/setup/install/mac-install/

Octoplex

Homebrew

Octoplex can be installed using Homebrew on macOS or Linux.

brew tap rfwatson/octoplex
brew install octoplex

From GitHub

Alternatively, grab the latest build for your platform from the releases page.

Unarchive the octoplex binary and copy it somewhere in your $PATH.

With Docker

See Running with Docker.

Starting Octoplex :rocket:

Octoplex can run as a single process (all-in-one), or in a client/server pair.

ModePick this when you...
All-in-oneAre testing locally, debugging, or streaming from the same machine that runs Docker (e.g. your laptop).
Client/serverWant the server on a remote host (e.g., cloud VM) for long-running or unattended streams.

All-in-one

octoplex run

Starts the Octoplex server and the terminal UI in one process.

Docker must be running on the same machine.

Client/server

  1. Start the server (on the host that has Docker):
octoplex server start
  1. Connect the interactive TUI client (from your laptop or any host):
octoplex client start # --host my.remotehost.com if on a different host

client start is a lightweight TUI and does not need Docker to be installed.

  1. Stop the server (and clean up any Docker resources) on the remote host:
octoplex server stop

Interacting with Octoplex :computer:

Command-line interface (CLI)

Besides the interactive TUI, you can also control Octoplex with one-off command-line calls.

Don't forget to replace <PLACEHOLDER> strings with your own values.

:information_source: Tip Octoplex ships with a self-signed TLS certificate by default. When connecting remotely you'll usually need --tls-skip-verify (or -k). Warning: this disables certificate validation, use only on trusted networks.

List destinations

octoplex client destination list --tls-skip-verify

Add a destination

octoplex client destination add \
    --name "<NAME>" \
    --url "<RTMP_URL>" \
    --tls-skip-verify

Make a note of the destination ID that is printed to the terminal, e.g. 036e2a81-dc85-4758-ab04-303849f35cd3.

Update a destination

octoplex client destination update \
    --id "<DESTINATION_ID>"  \
    --name "<NAME>" \
    --url "<RTMP_URL>" \
    --tls-skip-verify

Start a destination

octoplex client destination start \
    --id "<DESTINATION_ID>"  \
    --tls-skip-verify

Stop a destination

octoplex client destination stop \
    --id "<DESTINATION_ID>" \
    --tls-skip-verify

Remove a destination

octoplex client destination remove \
    --id "<DESTINATION_ID>" \
    --tls-skip-verify

:information_source: Tip Pass --force (or -f) to remove the destination even if it's live.

Subcommand reference

SubcommandDescription
octoplex runLaunch both server and client in a single process
octoplex server startStart the Octoplex server
octoplex server stopStop the Octoplex server
octoplex server credentials resetRegenerate API token and admin password, and print to stdout
octoplex client startStart the Octoplex TUI client
octoplex client destination listList existing destinations
octoplex client destination addAdd a destination
octoplex client destination updateUpdate a destination
octoplex client destination removeRemove a destination
octoplex client destination startStart streaming to a destination
octoplex client destination stopStop streaming to a destination
octoplex versionPrint the version
octoplex helpPrint help screen

Server flags

FlagAliasModesEnv varDefaultDescription
--help-hAllShow help
--data-dirserver all-in-one credentialsOCTO_DATA_DIR$HOME/.local/state/octoplex (Linux) or$HOME/Library/Caches/octoplex (macOS)Directory for storing persistent state and logs
--listen-lserverOCTO_LISTEN127.0.0.1:8080Listen address for non-TLS API and web traffic.
:warning: Must be set to a valid IP address to receive connections from other hosts. Use 0:0.0.0:8080 to bind to all network interfaces. Pass none to disable entirely.
--listen-tls-aserverOCTO_LISTEN_TLS127.0.0.1:8443Listen address for TLS API and web traffic.
:warning: Must be set to a valid IP address to receive connections from other hosts. Use 0:0.0.0:8443 to bind to all network interfaces. Pass none to disable entirely.
--server-url-userverOCTO_SERVER_URLhttp://localhost:8080The public address of the server, including protocol, hostname and port if necessary.
--web-wserverOCTO_WEBtrueEnable web server
--authserverOCTO_AUTHautoAuthentication mode for clients, one of none, auto and token. See Security.
--insecure-allow-no-authserverOCTO_INSECURE_ALLOW_NO_AUTHfalseAllow --auth=none when bound to non-local addresses. See Security.
--tls-certserver all-in-oneOCTO_TLS_CERTPath to custom TLS certifcate (PEM-encoded, must be valid for hostname). Used for gRPC, RTMPS and RTSPS connections.
--tls-keyserver all-in-oneOCTO_TLS_KEYPath to custom TLS key (PEM-encoded, must be valid for hostname). Used for gRPC, RTMPS and RTSPS connections.
--docker-hostserverOCTO_DOCKER_HOSTOptional. The Docker host to connect to, e.g. ssh://user@host:2375. If not set, falls back to the Docker SDK's DOCKER_HOST environment variable or the default Unix socket.
--stream-keyserver all-in-oneOCTO_STREAM_KEYliveStream key, e.g. rtmp://rtmp.example.com/live
--rtmp-enabledserver all-in-onetrueEnable RTMP server
--rtmp-listenserver all-in-one127.0.0.1:1935Listen address for RTMP sources.
:warning: Must be set to a valid IP address to receive connections from other hosts. See --listen.
--rtmps-enabledserver all-in-onetrueEnable RTMPS server
--rtmps-listenserver all-in-one127.0.0.1:1936Listen address for RTMPS sources.
:warning: Must be set to a valid IP address to receive connections from other hosts. See --listen.
--rtsp-enabledserver all-in-onefalseEnable RTSP server
--rtsp-listenserver all-in-one127.0.0.1:8554Listen address for RTSP sources.
:warning: Must be set to a valid IP address to receive connections from other hosts. See --listen.
--rtsps-enabledserver all-in-onefalseEnable RTSPS server
--rtsps-listenserver all-in-one127.0.0.1:8332Listen address for RTSPS sources.
:warning: Must be set to a valid IP address to receive connections from other hosts. See --listen.
--image-name-mediamtxserver all-in-oneOCTO_IMAGE_NAME_MEDIAMTXghcr.io/rfwatson/mediamtx-alpine:latestOCI-compatible image for launching MediaMTX
--image-name-ffmpegserver all-in-oneOCTO_IMAGE_NAME_FFMPEGghcr.io/jrottenberg/ffmpeg:7.1-scratchOCI-compatible image for launching FFmpeg
--log-to-fileserver all-in-oneOCTO_LOG_TO_FILEfalseLog to a file instead stderr
--log-fileserver all-in-oneOCTO_LOG_FILEPath to a log file to write. Implies --log-to-file
--log-levelserver all-in-oneOCTO_LOG_LEVELinfoLog level, one of debug, info, warn or error

Client flags

FlagAliasDefaultDescription
--help-hShow help
--host-Hlocalhost:8443Remote Octoplex server to connect to
--tls-skip-verify-kfalseSkip TLS certificate verification (insecure)
--api-token-tAPI token. See Security.
--log-filePath to log file
--log-levelinfoLog level, one of debug, info, warn or error

All-in-one mode

:information_source: When running in all-in-one mode (octoplex run) some flags may be overridden or unavailable.

Web interface :globe_with_meridians:

Octoplex provides a built-in web interface that allows you to manage your live streams from any browser.

:information_source: Note: The web interface is enabled by default. To disable it, launch Octoplex with octoplex server start --web=false.

The web interface is served from your server URL. By default this is http://localhost:8080 (or https://localhost:8443) and can be configured to a custom URL with the --server-url flag (or OCTO_SERVER_URL environment variable. See Server flags for more details.

Security :lock:

Read this section before putting Octoplex on any network you don't fully control.

Authentication

Octoplex automatically protects its internal API and web interface whenever it binds to anything other than localhost.

:information_source: Tip: Octoplex never requires authentication in all-in-mode mode (octoplex run) which is designed for quick, secure local testing.

When you run octoplex server start:

  • --auth=auto (the default): if the API is bound only to localhost/loopback addresses, Octoplex requires no authentication; if it's bound to any other network interface then both the web interface and API require authentication. See Admin password and API tokens.
  • --auth=token: always require authentication, even on loopback.
  • --auth=none: disable authentication completely, but only for localhost binds. If you set --auth=none with any non-loopback API listen addresses you must also pass --insecure-allow-no-auth to acknowledge the risk; otherwise the server refuses to start.

Admin password and API tokens

The first time Octoplex server starts with authentication enabled it generates and securely stores:

  • an admin password - for accessing the web interface
  • an API token - for the terminal UI and CLI

They are both printed to the logs exactly once, on first startup. After this, you won't be able to retrieve them again, but you can regenerate them:

octoplex server credentials reset     # add --data-dir "<YOUR_DATA_DIR>" if needed
# { "api_token": "foo", "admin_password": "bar" }

Server URL

When serving Octoplex from a non-localhost domain, the server URL (set by --server-url or OCTO_SERVER_URL) must match the scheme and domain you are serving Octoplex from. Example valid values would be https://octoplex.mydomain.com or http://192.168.1.10:8080. If you observe cross-origin errors from HTTP or websocket requests, verify the server URL is set correctly.

Incoming streams

Octoplex also listens for source streams (RTMP/RTMPS on ports 1935/1936 by default). These are not covered by the API token. To stop anyone from pushing an unsolicited feed, start the server with a unique stream key:

octoplex server start --stream-key "<YOUR_UNIQUE_STREAM_KEY>" ...
# or, set OCTO_STREAM_KEY=...

See server flags for more.

TLS

By default, the Octoplex server listens for HTTP and API traffic on ports 8080 (plain text) and 8443 (TLS with a self-signed certificate). Both listeners are bound to 127.0.0.1 unless explicitly configured otherwise. See Server flags for full configuration options.

When deploying on untrusted networks, ensure that plain-text ports are only accessible behind a TLS-enabled reverse proxy. To disable non-TLS listeners entirely, use --listen=none with octoplex server start, or set the OCTO_LISTEN=none environment variable.

Restreaming with Octoplex :arrows_counterclockwise:

Restreaming with OBS

RTMP

Use the following OBS stream configuration:

OBS streaming settings for RTMP

RTMPS

Or to connect with RTMPS:

OBS streaming settings for RTMPS

:warning: Warning: OBS may not accept self‑signed certificates.

If you see the error

"The RTMP server sent an invalid SSL certificate."

then either install a CA‑signed TLS certificate for your RTMPS host, or import your self‑signed cert into your OS's trusted store. See the server flags section above.

Restreaming with FFmpeg

RTMP

ffmpeg -i input.mp4 -c copy -f flv rtmp://localhost:1935/live

RTMPS

ffmpeg -i input.mp4 -c copy -f flv rtmps://localhost:1936/live

RTSP

:information_source: Tip: RTSP is disabled by default. To enable, start Octoplex with the --rtsp-enabled server flag.

ffmpeg -i input.mp4 -c copy -f rtsp -rtsp_transport tcp rtsp://localhost:8554/live

RTSPS

:information_source: Tip: RTSPS is disabled by default. To enable, start Octoplex with the --rtsps-enabled server flag.

ffmpeg -i input.mp4 -c copy -f rtsp -rtsp_transport tcp rtsps://localhost:8332/live

Advanced :gear:

Running with Docker

octoplex server can be run from a Docker image on any Docker engine.

:warning: By design, Octoplex needs to launch and terminate Docker containers on your host. If you run Octoplex inside Docker with a bind-mounted Docker socket, it effectively has root-level access to your server. Evaluate the security trade-offs carefully. If you're unsure, consider connecting through a proxy or just running Octoplex as a daemon (non-container) process on the Docker host.

:whale: Tip: The Docker host to connect to can be configured with the --docker-host flag or OCTO_DOCKER_HOST environment variable. See Server flags.

:information_source: Tip: Running the TUI client from Docker is not recommended. Install Octoplex natively via Homebrew or download a release from GitHub instead. See Installation for details.

docker run

Run the Octoplex server on all interfaces (ports 8080 and 8443/TLS):

docker run \
  --name octoplex                              \
  -v octoplex-data:/data                       \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -e OCTO_LISTEN=":8080"                       \
  -e OCTO_LISTEN_TLS=":8443"                   \
  -p 8080:8080                                 \
  -p 8443:8443                                 \
  --restart unless-stopped                     \
  ghcr.io/rfwatson/octoplex:latest

docker-compose

Run the Octoplex server on all interfaces (ports 8080 and 8443/TLS):

---
services:
  octoplex:
    image: ghcr.io/rfwatson/octoplex:latest
    container_name: octoplex
    restart: unless-stopped
    volumes:
      - octoplex-data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      OCTO_LISTEN: "[::]:8080"     # bind to all network interfaces
      OCTO_LISTEN_TLS: "[::]:8443" # bind to all network interfaces
    ports:
      - "8080:8080"
      - "8443:8443"
volumes:
  octoplex-data:
    driver: local

See also docker-compose.yaml.

Contributing :sparkles:

See CONTRIBUTING.md.

Bug reports

Open bug reports on GitHub.

Acknowledgements

Octoplex is built on and/or makes use of other free and open source software, most notably:

NameLicenseURL
DockerApache 2.0GitHub
FFmpegLGPLWebsite
MediaMTXMITGitHub
tviewMITGitHub

Licence

Octoplex is released under the AGPL v3 license.

SEE ALSO

clihub3/4/2026OCTOPLEX(1)