Skip to content

Development Guide

BrightCraft edited this page Jun 7, 2026 · 8 revisions

Methods for building the Moonlight app on Tizen TV


Building using Docker

The following method is intended for all Tizen developers, regardless of the Samsung TV model or Tizen version.

Building Moonlight via Docker

This section guides you through compiling the Moonlight application source code within a controlled Docker environment and preparing it for deployment. Once you have forked and cloned the repository locally, you must first ensure you meet the necessary prerequisites before proceeding. Follow these steps to build the Docker image, install the application, and launch it on the connected device.

Note

Before proceeding further with building the Moonlight app, you must have already installed WSL 2 and Docker Desktop on your system.

  1. Enable the Developer mode and find the TV IP Address on your Samsung TV by following these steps from the installation guide.
  2. Now, you need to run Docker Desktop and make sure to close any resource intensive applications.
  3. Open Windows PowerShell or a similar terminal depending on your OS, then change directory to the location where your repository is located:
    cd ~/Documents/GitHub/moonlight-tizen
    

    Note: If you are using Docker Desktop on a Mac with a silicon chip (M1/M2 etc), then you should change the first line in the Dockerfile to FROM --platform=linux/amd64 ubuntu:22.04 AS base before building the application to ensure compatibility.

  4. Then, enter the following command to build the Docker image from the source folder:
    docker build -t moonlight-tizen .
    
    • This operation may take a while, please be patient.
  5. After that, enter the following command to run and enter the container:
    docker run -it --rm moonlight-tizen
    
  6. To proceed further, follow the steps below to install the application on your TV:
    • Enter the following command to connect to your Samsung TV over SDB (Smart Development Bridge):
    sdb connect YOUR_TV_IP
    

    Note: Replace YOUR_TV_IP with IP Address of your TV.

    • Next, enter the following command to confirm that you are connected, then take note of the Device ID:
    sdb devices
    

    Note: Just to clarify Device ID will be the last column, something like UE55AU7172UXXH.

    • Next, enter the following command to install the package and optionally launch the application:
    tizen install -n Moonlight.wgt -t YOUR_DEVICE_ID
    
    tizen run -p MoonLightS.MoonlightWasm -t YOUR_DEVICE_ID
    

    Note: Replace YOUR_DEVICE_ID with Device ID of your TV.

    • Next, enter the following command to exit the container:
    exit
    

    Note: Moonlight should now be available under Recent Apps on your Samsung TV.

  7. Optionally, enter the following command to remove the Docker image, unless you need it later:
    docker image rm moonlight-tizen
    

    Note: At the end you can enter the exit command to close the Windows PowerShell window.

Extracting installer files from the Docker container

After successfully building the Docker image (as described in the previous section), you may need to access specific files generated during the build process. This section details how to extract the application widget and the USB package directly from the container’s filesystem. Follow these steps to prepare these necessary artifacts for installation and deployment on your connected device.

Note

Before proceeding further with extracting the files, confirm that the built Docker image is present locally.

  1. After entering the command to run the Docker container, you need to open Docker Desktop.
  2. Navigate to the Containers tab in the left sidebar and click on the name of your running container.
  3. Select the Files tab, where you can browse the container’s filesystem.
  4. Copy the application widget and USB package from the container by following these steps:
    • Find the home directory and select the moonlight folder.
    • Here you can find Moonlight.wgt (app widget) and MoonlightUSB.zip (USB package).
    • Right-click on the file you want to save locally, select the Save option, and choose the location where you want to save it.
  5. You can now proceed with the further steps to install the application as described in the installation guide.

Clone this wiki locally