Self-hosted · Open source · MIT

Your video.
Your server.
Your rules.

Floxflix is a self-hosted video streaming API written in Go. Upload source files, let FFmpeg transcode them to HLS in the background, and stream to your own users — with authenticated profiles and zero third-party cloud.

Docker ready No vendor lock-in OpenAPI contract
~/flixflox
# clone the repo
git clone https://github.com/floxflix/flixflox
cd flixflox

# set the required secret
export JWT_SECRET_KEY=$(openssl rand -base64 48)

# start API + MongoDB
docker compose up --build

✔ API listening on http://localhost:7777
Built with
Go 1.26 FFmpeg · HLS MongoDB 8 chi router Docker
What you get

Everything you need to stream, nothing you don't.

A focused API for hosting your own library. Upload, transcode, authenticate and stream — without a bloated stack.

HLS streaming

Source files are transcoded to adaptive HLS segments and served as .m3u8, .ts, .m4s or .mp4 — playable in any modern browser or player.

JWT authentication

Access and refresh tokens delivered as HTTP-only cookies, with bearer-token support for non-browser clients. Passwords hashed, sessions revocable.

Viewer profiles

Netflix-style multi-profile support. Each account can create its own viewers, so everyone gets their own space under one login.

Upload & transcode

Multipart uploads for mp4, mkv, mov, avi, webm and more. FFmpeg converts every file automatically — no manual encoding.

Background queue

Transcoding runs in a worker queue with status, start and cleanup endpoints. Uploads return immediately while jobs process in the background.

OpenAPI contract

A complete openapi.yml and Postman collection ship with the project. Point Swagger, Redoc or your own client generator at it.

How it works

From a file on disk to a stream in the browser.

Three moving parts. No media server daemon to babysit, no proprietary format.

01

Upload your source

POST a video file with its title, year, genre and cast. Movies and TV episodes are organized on disk automatically.

02

FFmpeg transcodes it

The background queue converts the source into HLS segments and a playlist, then marks the job complete.

03

Stream to your users

Authenticated clients hit the streaming endpoint and play the HLS output — browser, mobile app or TV client.

Developer first

A clean API under /v1/api

Everything is JSON, errors have one consistent shape, and the routes are grouped by concern. Health checks live at /healthz for your orchestrator.

  • POST /v1/api/auth/login
  • GET /v1/api/videos/stream/<path>
  • POST /v1/api/videos/upload
  • PUT /v1/api/videos/{id}/new-episode
  • GET /v1/api/videos/queue/info
# get a token (cookies also set)
curl -X POST http://localhost:7777/v1/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@example.com",
    "password": "••••••••"
  }'

# → { "access_token": "...", "refresh_token": "..." }
Ready when you are

Run it on your own hardware.

One docker compose up gives you the API and a MongoDB instance. Bring your own TLS, storage and clients — keep full control of your media.