Start free trial

← BlogHow to7 min read

By Pritika Bakshi, Principal Video Streaming Engineer, creekX.io

How to self-host a live streaming server on Ubuntu 24.04

A self-hosted live streaming server needs an Ubuntu 24.04 machine with at least 2 cores, 8 GB of memory and 100 GB of disk, a handful of open ports, and ideally a domain name for https. The media server, database, web server and certificates install as system services, and the expensive part is not viewers but transcoding.

Choose the machine

Forwarding and recording streams without converting them costs little: on a 4-core server, 49 recorded 1080p lives used 13% CPU. Making extra qualities for adaptive bitrate costs about 0.6 of a core per 1080p live. Size by how much you transcode, then by network.

Point a domain at it

Add a DNS A record such as live.example.com with the server's IP address. With a domain, the server obtains and renews its https certificate by itself. Browsers will not open a camera on a plain http page, so going live from a browser needs this.

Open the ports

Port For
80, 443 (TCP) The app, the API and HLS watching
1935 (TCP) RTMP from OBS and streaming apps
1936 (TCP) RTMPS, encrypted RTMP (with a domain)
8554 (TCP) RTSP from cameras and encoders
8890 (UDP) SRT encoders
8189 (UDP and TCP) WebRTC: going live from a browser and real-time watching
9100 to 9199 (UDP) MPEG-TS over UDP from encoders

Cloud providers often have their own firewall (a security group) in addition to the server's. Open the ports in both.

Install, upgrade and roll back

The creekX installer is one command run over SSH as a user with sudo:

curl -fsSL https://creekx.io/get.sh | sudo bash

It installs PostgreSQL 16, Caddy for https, Node.js, FFmpeg 8.1 and the media server as a systemd service, checks every download against a pinned checksum, and asks for your domain and the owner's email and password. Running the same line again upgrades in place; if the new version does not start, the previous one is put back.

A server with no internet

For closed networks there is an offline bundle carrying everything the installer would download. Copy it to the server and run the installer with --offline; it contacts nothing. Licences can be a file checked on the server, so nothing needs to reach the vendor.

In creekX: the full steps are in install on a server; measured capacity is in benchmarks, and the calculator turns streams and viewers into servers.

Frequently asked questions

Can I run a streaming server on a small VPS?

Yes, for trying it and for pass-through streams: forwarding and recording without transcoding uses very little CPU. Transcoding to several qualities is what needs cores.

Do I need a domain name?

Not to start, but going live from a browser and RTMPS both need https, and https needs a domain pointed at the server.

How much bandwidth does a 24/7 channel use?

A Full HD channel sends about 2.6 TB a month to each platform it plays on. Check your provider’s monthly allowance before you start one.

Follow the build