# Getting Started with Linux

To get started with OvenMediaEngine Enterprise on Linux, check the [Prerequisites](#prerequisites) below and then follow the [Installation](#installation).

## Prerequisites

### OS requirements

To install OvenMediaEngine Enterprise, you need one of the following Linux versions:

* Ubuntu 24.04 LTS
* Ubuntu 22.04 LTS
* RHEL 9
* RHEL 8

## Location

By default, OvenMediaEngine Enterprise is installed in the following locations:

* **Binary\&Config**: `/usr/share/ovenmediaengine`
* **Log**: `/var/log/ovenmediaengine`

## Installation

### Automatic download and installation

OvenMediaEngine Enterprise can be easily installed with a single command using the installation script.

#### Download the installation script

{% code overflow="wrap" %}

```bash
curl -fsSL https://packages.ovenmediaengine.cloud/scripts/install-ovenmediaengine-enterprise.sh -o install-ovenmediaengine-enterprise.sh && chmod +x install-ovenmediaengine-enterprise.sh
```

{% endcode %}

#### Install or upgrade OvenMediaEngine Enterprise

{% tabs %}
{% tab title="Latest" %}

#### \[Install]

For the initial installation, run the installation script with a valid license key provided as a parameter.

{% code overflow="wrap" %}

```bash
sudo ./install-ovenmediaengine-enterprise.sh -k 'Your.License.Key'
```

{% endcode %}

#### \[Upgrade]

To upgrade to the latest version, simply run the installation script without providing a license key.

{% code overflow="wrap" %}

```bash
sudo ./install-ovenmediaengine-enterprise.sh
```

{% endcode %}
{% endtab %}

{% tab title="Specific version" %}
To install a specific version of OvenMediaEngine Enterprise, start by listing the available versions in the repository:

```sh
sudo ./install-ovenmediaengine-enterprise.sh --list
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   OvenMediaEngine Enterprise — Installer  v1.0.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✔  Detected OS: ubuntu 24.04 (family: debian)

▶ Available versions
  ℹ  Fetching available versions from apt repository...

    1  0.20.5.1-2
    2  0.20.4.3-1
    3  0.20.4.2-1
    4  0.20.4.1-1
    5  0.20.4.0-1
    6  0.20.3.0-1

  ℹ  Install a specific version with: -v <VERSION>
```

Select the desired version and install:

```sh
VERSION=0.20.4.3-1
sudo ./install-ovenmediaengine-enterprise.sh -k 'Your.License.Key' -v $VERSION
```

{% endtab %}
{% endtabs %}

#### Uninstall OvenMediaEngine Enterprise

To uninstall, use the following command:

```bash
sudo ./install-ovenmediaengine-enterprise.sh --uninstall
```

### Install from a package

#### Package Download

OvenMediaEngine Enterprise is also provided as packages in `.deb` and `.rpm` formats. If you have received a download link for the package files from the OME Enterprise team, please download the files and follow the instructions below to install and run them.

#### Download the installation script

{% code overflow="wrap" %}

```bash
curl -fsSL https://packages.ovenmediaengine.cloud/scripts/install-ovenmediaengine-enterprise.sh -o install-ovenmediaengine-enterprise.sh && chmod +x install-ovenmediaengine-enterprise.sh
```

{% endcode %}

#### Install from a package

Move to the directory where the package was downloaded, and then install OvenMediaEngine Enterprise:

{% code overflow="wrap" %}

```bash
sudo ./install-ovenmediaengine-enterprise.sh -k 'Your.License.Key' -f <ovenmediaengine-enterprise-package-file>
```

{% endcode %}

#### Uninstall OvenMediaEngine Enterprise

To uninstall, use the following command:

```bash
sudo ./install-ovenmediaengine-enterprise.sh --uninstall
```

### Start/Stop OvenMediaEngine Enterprise

You can start or stop the services by running the following command:

```bash
# Start OvenMediaEngine
sudo systemctl stop ovenmediaengine
sudo systemctl start ovenmediaengine

# Start Web Console (OvenStudio)
sudo systemctl stop ovenstudio
sudo systemctl start ovenstudio

# Start OvenMediaEngine Delivery Module
sudo systemctl stop ovenmediaengine-delivery
sudo systemctl start ovenmediaengine-delivery
```

## Post-installation Configuration

### Changing the License Key

If the license key was entered incorrectly or needs to be changed, you can update it using the command below.

{% code overflow="wrap" %}

```bash
sudo ./install-ovenmediaengine-enterprise.sh -c -k 'Your.License.Key'
```

{% endcode %}

### Changing the Host Address

The host address can be changed if you need to update the value automatically configured during installation, or if a domain configuration is required to enable TLS.

{% code overflow="wrap" %}

```bash
sudo ./install-ovenmediaengine-enterprise.sh -c -H 'Your.Host.Address'
```

{% endcode %}

## Ports used by default

The default configuration uses the following ports, so you need to open it in your firewall settings:

### OvenMediaEngine

<table><thead><tr><th width="200">Port</th><th>Purpose</th></tr></thead><tbody><tr><td>1935/TCP</td><td>RTMP Input</td></tr><tr><td>9999/UDP</td><td>SRT Input</td></tr><tr><td>4000/UDP</td><td>MPEG-2 TS Input</td></tr><tr><td>9000/TCP</td><td>Origin Server (OVT)</td></tr><tr><td><p>80/TCP</p><p>443/TLS</p></td><td><p>Low Latency HLS (LLHLS) Streaming</p><p><em><mark style="color:red;">* Streaming over non-TLS is not allowed with modern browsers.</mark></em></p></td></tr><tr><td><p>80/TCP</p><p>443/TLS</p></td><td>WebRTC Signaling (both ingest and streaming)</td></tr><tr><td>3478/TCP</td><td>WebRTC TCP relay (TURN Server, both ingest and streaming)</td></tr><tr><td>10000 - 10009/UDP</td><td>WebRTC Ice candidate (both ingest and streaming)</td></tr><tr><td><p>80/TCP</p><p>443/TLS</p></td><td>Thumbnail Extraction</td></tr></tbody></table>

### Web Console (OvenStudio)

<table><thead><tr><th width="200">Port</th><th>Purpose</th></tr></thead><tbody><tr><td>8080/TCP</td><td>Running Web Console</td></tr></tbody></table>
