# Installation and Configuration Guide

Step-by-step instructions for installing and configuring the Jellyfin WHMCS module: WHMCS deployment, connecting your Jellyfin server, creating the product and configuring the access policy.

# WHMCS Module Installation and Update

### Jellyfin module **[WHMCS](https://puqcloud.com/link.php?id=77)**
#####  [Order now](https://puqcloud.com/whmcs-module-jellyfin.php) | [Download](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/) | [Community](https://community.puqcloud.com/)

## Supported PHP & WHMCS versions

The module supports **PHP 7.4, 8.1 and 8.2+** and **WHMCS 8.x / 9.x**, and is shipped as a **separate ionCube build per PHP version**. Download the build that matches the PHP version your WHMCS runs on.

| WHMCS version | PHP version | Module build |
|---------------|-------------|--------------|
| WHMCS 8.x | 7.4 | `php74` |
| WHMCS 8.x | 8.1 | `php81` |
| WHMCS 8.x | 8.2 | `php82` |
| WHMCS 9.x | 8.2 | `php82` |

> Match the build to your **server's PHP version**, not to the WHMCS version. PHP 8.2 and any newer PHP → always use `php82`. Requires **ionCube Loader v13+** (v14/v15 supported).

## Download

The module is distributed as a single ZIP archive. A separate build is published for each supported PHP major version — pick the one that matches the PHP runtime used by your WHMCS installation.

All versions and historical builds are available in the index:

- [https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/)

### Direct "latest" downloads

#### PHP 8.2

```bash
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/php82/PUQ_WHMCS-Jellyfin-latest.zip
```

#### PHP 8.1

```bash
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/php81/PUQ_WHMCS-Jellyfin-latest.zip
```

#### PHP 7.4

```bash
wget https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/php74/PUQ_WHMCS-Jellyfin-latest.zip
```

> Not sure which PHP version your WHMCS runs on? Check **Utilities > System > PHP Info** in the WHMCS admin area.

## Installation

### Step 1: Unzip the Archive

On your WHMCS server (or locally, before uploading):

```bash
unzip PUQ_WHMCS-Jellyfin-latest.zip
```

The archive extracts into a `PUQ_WHMCS-Jellyfin/` directory containing the server module folder `puqJellyfin`.

### Step 2: Copy the Server Module

Copy and replace `puqJellyfin` from the extracted `PUQ_WHMCS-Jellyfin/` directory to your WHMCS installation:

```
PUQ_WHMCS-Jellyfin/puqJellyfin  →  WHMCS_WEB_DIR/modules/servers/puqJellyfin/
```

Example:

```bash
cp -r PUQ_WHMCS-Jellyfin/puqJellyfin /var/www/html/whmcs/modules/servers/
```

### Step 3: ionCube Loader

Ensure **ionCube Loader v13+** is installed and enabled for the PHP version your WHMCS runs on. The module source is encoded with ionCube.

### Step 4: License key

Each product that uses this module requires a valid license key in the **License key** field of the product's **Module Settings** tab. Invalid or missing licenses are listed on the WHMCS admin homepage.

![License key on the Module Settings tab](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-ovz400s8.png)

> The module self-creates its database tables (`puq_license`, `puq_module_versions`) on first load — there is no SQL to run manually.

## File Structure

After installation, the module files should be located at:

```
whmcs/
├── modules/
│   └── servers/
│       └── puqJellyfin/            # Server module
│           ├── puqJellyfin.php
│           ├── hooks.php
│           ├── whmcs.json
│           ├── lib/
│           ├── lang/
│           └── templates/
```

## Update Procedure

To update the module to a newer version:

1. Back up your WHMCS installation (and the existing `modules/servers/puqJellyfin/` directory).
2. Download the latest build that matches your server's PHP version (see **Download** above).
3. Upload and overwrite the files in `modules/servers/puqJellyfin/`.
4. Open any WHMCS admin page once — the migration runner brings the schema up to date automatically.

> **Upgrading from v2.x:** no reconfiguration is required. The module reads existing product settings from the legacy `configoption3`–`configoption8` slots until you save the product once through the new form, at which point they are consolidated into `configoption24`.

> **Tip:** always back up your WHMCS installation before performing an update.


<!-- sync:c65083e3aabe168f -->

# Add a Jellyfin server in WHMCS

### Jellyfin module **[WHMCS](https://puqcloud.com/link.php?id=77)**
#####  [Order now](https://puqcloud.com/whmcs-module-jellyfin.php) | [Download](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/) | [Community](https://community.puqcloud.com/)

Configure the connection to your Jellyfin server under **Setup → Products/Services → Servers → Add New Server**.

![Add a Jellyfin server in WHMCS](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-2turq9lm.png)

| Field | Value |
|-------|-------|
| **Hostname / IP Address** | The Jellyfin server hostname or IP. |
| **Secure (SSL)** | Enable if Jellyfin is served over HTTPS. |
| **Port** | Jellyfin port (default `8096`, or `443` when SSL is enabled). |
| **Username** | A Jellyfin **administrator** username. |
| **Password** | That administrator's password. |
| **Access Hash** | A Jellyfin **API key** (Dashboard → API Keys). |
| **Type / Module** | `PUQ Jellyfin`. |

In the **Server Details** section select **Module → PUQ Jellyfin** and fill in the **Username**, **Password** and **Access Hash** (API key), tick **Secure** for SSL and set the **Port**.

![Server Details — PUQ Jellyfin module + Test Connection](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-cqgc2mbp.png)

Use **Test Connection** to confirm WHMCS can reach Jellyfin and authenticate. The module authenticates with the username/password + API key to obtain an access token, then calls `System/Info` to verify connectivity.

Assign the server (or a server group containing it) to your Jellyfin product under the product's **Module Settings**.


<!-- sync:115546f2a807e3c8 -->

# Product configuration

### Jellyfin module **[WHMCS](https://puqcloud.com/link.php?id=77)**
#####  [Order now](https://puqcloud.com/whmcs-module-jellyfin.php) | [Download](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Jellyfin/) | [Community](https://community.puqcloud.com/)

Create a product of type **PUQ Jellyfin** (Setup → Products/Services), assign the Jellyfin server on the **Module Settings** tab, then configure the access policy in the injected configuration panel.

![Product configuration](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-nj9ch8nj.png)

## Libraries Configuration
- **Use all libraries** — grant access to every library on the server (overrides the selection below).
- **Libraries** — the list of libraries is loaded live from the Jellyfin server assigned to the product's Server Group. Tick the libraries this product grants; use **Select all** to toggle everything, or **Reload** to refresh the list. Leaving everything unticked grants no library. If the server cannot be reached, a manual text box appears as a fallback (one library name per line). Ignored when "Use all libraries" is ON.

> The dynamic list requires the product to be saved with a Server Group that contains a reachable Jellyfin server. Until then the panel shows a hint to select and save a Server Group.

![Libraries — dynamic checkbox picker](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-3jz8lyun.png)

## User Configuration
- **Streaming bitrate limit** — 1–60 Mbps (empty = unlimited).
- **SyncPlay access** — create & join groups / join groups / disabled.
- **Remote control of shared devices**, **Media downloads** — on/off.
- **Max user sessions** — `0` disables the limit.
- **Failed login attempts** — lockout threshold; `-1` disables it.
- **Username prefix / suffix** — wrap the generated username.

![User Configuration](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-pn1xj8nr.png)

## Allow Playback
Toggle media playback, audio transcoding, video transcoding and video conversion without re-encoding.

![Allow Playback](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-flcmf2jl.png)

## Feature Access
Live TV access, Live TV recording management, and force transcoding of remote media sources.

![Feature Access](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-wwqtvlpu.png)

## Links
- **Instruction / manual URL** — shown as the *User manual* link in the client area.

![Links](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-nxqsbphj.png)

## Client Area
- **Show password** — show button / plain text / hidden.
- **Password generation** — `length:characters`, e.g. `8:23456789abcdABCD`.
- **Username format** — `standard` (`prefix<client_id>-<service_id>suffix`) or `custom`.
- **Custom username** — macro template: `{user_id}`, `{service_id}`, `{random_digit_x}`, `{random_letter_x}`, `{unixtime}`, `{year}`, `{month}`, `{day}`, `{hour}`, `{minute}`, `{second}`.

![Client Area settings](https://doc.puq.info/uploads/images/gallery/2026-06/embedded-image-826wppyn.png)

Settings are stored as a single JSON document in `configoption24`. After saving, **Create/Change** actions push the resulting policy to Jellyfin.


<!-- sync:e8e3613ed5a74cf1 -->

