Here’s the Full Guide to run JellyFin Server on Android through Termux:
This guide will help you install and run Jellyfin on an Android device using Termux + Proot-Debian.
It works for devices with different RAM configurations. We use jellyfin.sh as the startup script.
- Install Termux from F-Droid.
- Open Termux and update packages:
pkg update -y
pkg upgrade -y- Install essential packages:
pkg install proot-distro wget curl nano git -y- Install Debian:
proot-distro install debian- Login to Debian:
proot-distro login debianAll Debian-specific commands are run inside this Proot environment.
apt update && apt upgrade -y
apt install ffmpeg -yInstall Jellyfin:
apt install apt-transport-https ca-certificates gnupg -y
curl -fsSL https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | gpg --dearmor | tee /usr/share/keyrings/jellyfin-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/jellyfin-archive-keyring.gpg] https://repo.jellyfin.org/debian bullseye main" | tee /etc/apt/sources.list.d/jellyfin.list
apt update
apt install jellyfin -yDo not Exit Debian! If you are in termux then get inside debian by pasting (proot-distro login debian) command again in Termux.
It should show something like root@localhost:~#
Then create the script to Start JellyFin Server Everytime by pasting this:
nano jellyfin.sh- Paste the script according to your device’s RAM:
#!/bin/sh
# Jellyfin launcher for Termux/Proot Debian on Android (2GB RAM)
# ---- .NET memory tuning ----
export DOTNET_GC_SERVER=0
export DOTNET_GC_CONCURRENT=1
export DOTNET_GCHeapHardLimit=300000000 # ~300MB
export DOTNET_GCHeapHardLimitPercent=40 # ~40% of total RAM
# ---- Jellyfin paths ----
WEB_DIR="/usr/share/jellyfin/web"
CONFIG_DIR="$HOME/.config/jellyfin"
CACHE_DIR="$HOME/.cache/jellyfin"
DATA_DIR="$HOME/.local/share/jellyfin"
LOG_DIR="$HOME/.local/share/jellyfin/log"
# ---- Run Jellyfin ----
jellyfin \
--webdir "$WEB_DIR" \
-c "$CONFIG_DIR" \
-C "$CACHE_DIR" \
-d "$DATA_DIR" \
-l "$LOG_DIR" \
--nonetchange#!/bin/sh
# Jellyfin launcher for Termux/Proot Debian on Android (4GB RAM)
# ---- .NET memory tuning ----
export DOTNET_GC_SERVER=0
export DOTNET_GC_CONCURRENT=1
export DOTNET_GCHeapHardLimit=800000000 # ~800MB
export DOTNET_GCHeapHardLimitPercent=50 # ~50% of total RAM
# ---- Jellyfin paths ----
WEB_DIR="/usr/share/jellyfin/web"
CONFIG_DIR="$HOME/.config/jellyfin"
CACHE_DIR="$HOME/.cache/jellyfin"
DATA_DIR="$HOME/.local/share/jellyfin"
LOG_DIR="$HOME/.local/share/jellyfin/log"
# ---- Run Jellyfin ----
jellyfin \
--webdir "$WEB_DIR" \
-c "$CONFIG_DIR" \
-C "$CACHE_DIR" \
-d "$DATA_DIR" \
-l "$LOG_DIR" \
--nonetchange#!/bin/sh
# Jellyfin launcher for Termux/Proot Debian on Android (8GB RAM)
# ---- .NET memory tuning ----
export DOTNET_GC_SERVER=0
export DOTNET_GC_CONCURRENT=1
export DOTNET_GCHeapHardLimit=2000000000 # ~2GB
export DOTNET_GCHeapHardLimitPercent=60 # ~60% of total RAM
# ---- Jellyfin paths ----
WEB_DIR="/usr/share/jellyfin/web"
CONFIG_DIR="$HOME/.config/jellyfin"
CACHE_DIR="$HOME/.cache/jellyfin"
DATA_DIR="$HOME/.local/share/jellyfin"
LOG_DIR="$HOME/.local/share/jellyfin/log"
# ---- Run Jellyfin ----
jellyfin \
--webdir "$WEB_DIR" \
-c "$CONFIG_DIR" \
-C "$CACHE_DIR" \
-d "$DATA_DIR" \
-l "$LOG_DIR" \
--nonetchange-
After pasting, save the file:
- Press
Ctrl + Xto exit. - Nano will ask: “Save modified buffer?” → Press
Yfor yes. - It will ask for the file name → Press
Enterto confirmjellyfin.sh.
- Press
-
Make the script executable:
chmod +x jellyfin.sh✅ Now your
jellyfin.shscript is ready to use.
Every time you want to run Jellyfin Server:
# Step 1: Login to Debian
proot-distro login debian
# Step 2: Run Jellyfin
./jellyfin.shOpen a Browser on your Android Device [i.e) Chrome]:
http://127.0.0.1:8096
or
http://localhost:8096
7. If you want to just type "jellyfin.sh" only instead of "./jellyfin.sh" everytime to Start Jellyfin (Optional)
For this, Simply Add your home folder to PATH of Debian
- In Termux, open your .bashrc or .zshrc:
nano ~/.bashrc
- Add this line at the end:
export PATH=$HOME:$PATH
- Save (Ctrl+X → Y → Enter) and reload:
source ~/.bashrc
Now, Just Type this to Start Jellyfin Server after proot-distro login debian command ofcourse 🔽:
jellyfin.sh
will work, as long as you’re inside Debian (Proot).
- Jellyfin runs on HTTP (port 8096).
- To allow remote access, use Zerotier or OpenTunnel.
- Avoid ngrok on Termux; it’s unstable.
DOTNET_GCHeapHardLimitandDOTNET_GCHeapHardLimitPercentcontrol how much RAM Jellyfin’s .NET runtime can use.- Adjust based on your device’s RAM. Using ~50% of total RAM is safe for most devices.
- Always login to Debian before starting Jellyfin.
- Use Browser for Best Experience instead of Client Apps.
- Download a movie/video.
- Start Server
- Connect ZeroTier (Both Host and Client needs to be on same ZeroTier Network)
- Open JellyFin on Web Browser by this format : http://<Host's_ZeroTier_IP>:8096
- (You can get this IP from https://my.zerotier.com/network)
- Login
- Create Room
- Friends join your Room
- Perfect Synced Video
- (Call on discord etc for fun while watching movie at same time.)
- Use Browser for Best Experience instead of Client Apps.
- If you're on PC, Use HaramBlurr Extension to automatically blur Haram/NSFW Content.
- If you're on Android, Use Mises Browser as it supports Chrome Extensions.
- ENJOIII BUIIIIII
Credits :- Syed Wasiq Abbas (Remember in your Prayers :) Allahuma Barik)
Honestly, ChatGPT Helped me alot in this mission. Alhamdulillah(Praise be to Allah) for every facility & favour he has given to me.