Skip to content

Instantly share code, notes, and snippets.

@sdshan8
Last active June 13, 2025 14:20
Show Gist options
  • Save sdshan8/5dfcc9efbd2017d2d6feefd752f057ed to your computer and use it in GitHub Desktop.
Save sdshan8/5dfcc9efbd2017d2d6feefd752f057ed to your computer and use it in GitHub Desktop.

Install Jellyfin on Termux [In Proot]

This guide shows two methods of installing Jellyfin on termux

Note: only tested on aarch64/arm64

These steps are same for both methods:

  1. Update the repo
pkg update
  1. Install proot-distro and ffmpeg (ffmpeg is only required in Method 2)
pkg install proot-distro ffmpeg -y
  1. Install ubuntu and Login to it
proot-distro install ubuntu
proot-distro login ubuntu
  1. Update and upgrade the packages in ubuntu
apt update && apt upgrade -y
  1. .NET 7.0 workaround:
  • Use nano (or editor of your choice) to make a file in /etc/profile.d
nano /etc/profile.d/02-dotnet-fix.sh
  • Paste the following to set the value of DOTNET_GCHeapHardLimit to 1C0000000 (You might need to lower the value to get it to work):
export DOTNET_GCHeapHardLimit=1C0000000
  • Save and exit nano by pressing CTRL + x then y then enter
  • Make it executable
chmod +x /etc/profile.d/02-dotnet-fix.sh
  • Logout and log back into proot

Method 1:

  1. Install sudo curl and gnupg
apt install sudo curl gnupg -y
  1. Follow the step 2 to 6 in the official ubuntu installation guide for Jellyfin here

  2. Create a symbolic link for Jellyfin web client (as it's in the wrong folder)

ln -s /usr/share/jellyfin/web /usr/lib/jellyfin/bin/jellyfin-web
  1. Run Jellyfin
jellyfin
  • Note: if you get network related errors add --nonetchange parameter to jellyfin
  1. Give it a few minutes to finish startup then goto http://localhost:8096 to setup Jellyfin

Method 2:

  1. Install necessary packages (skip wget if you have it installed in termux, also replace 74 with the latest version of libicu)
apt install wget libicu74 libfontconfig1 ca-certificates -y
  1. Make a new folder in /opt by the name jellyfin and cd into it
mkdir /opt/jellyfin
cd /opt/jellyfin
  1. Download the latest generic linux build for your architecture from here with wget (make sure you download the correct architecture for you device)
wget https://repo.jellyfin.org/files/server/linux/latest-stable/arm64/jellyfin_10.10.6-arm64.tar.gz
  1. Extract it with tar
tar xvzf jellyfin_10.10.6-arm64.tar.gz
  1. Create four sub-directories for Jellyfin data
mkdir data cache config log
  1. Use nano to make a script to run Jellyfin
nano jellyfin.sh
  • Paste the following:
#!/bin/bash
JELLYFINDIR="/opt/jellyfin"

$JELLYFINDIR/jellyfin/jellyfin \
 -d $JELLYFINDIR/data \
 -C $JELLYFINDIR/cache \
 -c $JELLYFINDIR/config \
 -l $JELLYFINDIR/log \
 --ffmpeg /data/data/com.termux/files/usr/bin/ffmpeg
  • Note: if you get network related errors add --nonetchange parameter to jellyfin in the jellyfin.sh
  • Save and exit nano by pressing CTRL + x then y then enter
  1. Make it executable
chmod +x jellyfin.sh
  1. Run it
/opt/jellyfin/jellyfin.sh
  1. Give it a few minutes to finish startup then goto http://localhost:8096 to setup Jellyfin

Thanks to @vikoadi and @t-e-s-tweb for DOTNET_GCHeapHardLimit=1C0000000 and --nonetchange fix

#!/bin/bash
JELLYFINDIR="/opt/jellyfin"
$JELLYFINDIR/jellyfin/jellyfin \
-d $JELLYFINDIR/data \
-C $JELLYFINDIR/cache \
-c $JELLYFINDIR/config \
-l $JELLYFINDIR/log \
--ffmpeg /data/data/com.termux/files/usr/bin/ffmpeg
@cangjingren
Copy link

libcu70Where can I download the library

@sdshan8
Copy link
Author

sdshan8 commented Jan 8, 2024

libcu70Where can I download the library

Through apt with apt install libicu70

@gamernoob24
Copy link

gamernoob24 commented May 31, 2024

why is it using a bit of an outdated version of jellyfin
i tried using the latest version of it 10.9.3
i kept on getting errors

also please update the method 2 part 7 link to this if your using 10.8.8

arm64
https://repo.jellyfin.org/archive/server/linux/stable/10.8.8/combined/jellyfin_10.8.8_arm64.tar.gz
or armhf/ arm 32bit
https://repo.jellyfin.org/archive/server/linux/stable/10.8.8/combined/jellyfin_10.8.8_armhf.tar.gz

@geeks121
Copy link

geeks121 commented Aug 4, 2024

moved to this path :
https://repo.jellyfin.org/files/server/linux/latest-stable/arm64/jellyfin_10.9.8-arm64.tar.gz

@gamernoob24
Copy link

gamernoob24 commented Aug 4, 2024

moved to this path : https://repo.jellyfin.org/files/server/linux/latest-stable/arm64/jellyfin_10.9.8-arm64.tar.gz

i get this error when i run that version

root@localhost:/opt/jellyfin-10# sh /opt/jellyfin-10/jellyfin.sh
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
root@localhost:/opt/jellyfin-10#

@rishabhmodi03
Copy link

getting Error

android version: Android 11
architecture: armhf (arm7va)
buid: https://repo.jellyfin.org/files/server/linux/latest-stable/armhf/jellyfin_10.10.3-armhf.tar.gz

[2024-11-25 13:07:25.611 +00:00] [ERR] [16] Emby.Server.Implementations.Updates.InstallationManager: An error occurred while accessing the plugin manifest: "https://repo.jellyfin.org/files/plugin/manifest.json" System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: NotTimeValid at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan1 alert, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at System.Net.Http.Json.HttpClientJsonExtensions.<FromJsonAsyncCore>g__Core|12_0[TValue,TJsonOptions](HttpClient client, Task1 responseTask, Boolean usingResponseHeadersRead, CancellationTokenSource linkedCTS, Func4 deserializeMethod, TJsonOptions jsonOptions, CancellationToken cancellationToken) at Emby.Server.Implementations.Updates.InstallationManager.GetPackages(String manifestName, String manifest, Boolean filterIncompatible, CancellationToken cancellationToken)

@rishabhmodi03
Copy link

error solved. used proot-distro install debian and no such error.

@vikoadi
Copy link

vikoadi commented Jan 1, 2025

moved to this path : https://repo.jellyfin.org/files/server/linux/latest-stable/arm64/jellyfin_10.9.8-arm64.tar.gz

i get this error when i run that version

root@localhost:/opt/jellyfin-10# sh /opt/jellyfin-10/jellyfin.sh
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
root@localhost:/opt/jellyfin-10#

I can run jellyfin-10.10.3 by exporting environment variable
DOTNET_GCHeapHardLimit=1C0000000
dotnet/runtime#79612 (comment)

@aicynide
Copy link

aicynide commented Feb 3, 2025

@sdshan8 can you help packaging jellyfin officially for termux?
termux/termux-packages#23074

@metisro
Copy link

metisro commented Feb 17, 2025

I have tried both methods with the latest jellyfin-10.10.6 on Xiaomi Mi A1 with Lineage OS 20, (Android 13) and I have always the same error:

root@localhost:/opt/jellyfin# /opt/jellyfin/jellyfin.sh
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E

I have tried also exporting the environment variable DOTNET_GCHeapHardLimit=1C0000000

I mention that I had exactly the same error also with Ubuntu on UserLand.
If anybody has a suggestion I would gladly try it

@sdshan8
Copy link
Author

sdshan8 commented Feb 17, 2025

I have tried both methods with the latest jellyfin-10.10.6 on Xiaomi Mi A1 with Lineage OS 20, (Android 13) and I have always the same error:

root@localhost:/opt/jellyfin# /opt/jellyfin/jellyfin.sh
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E

I have tried also exporting the environment variable DOTNET_GCHeapHardLimit=1C0000000

I mention that I had exactly the same error also with Ubuntu on UserLand. If anybody has a suggestion I would gladly try it

Try lowering the value for DOTNET_GCHeapHardLimit environment variable
(Note: the value is in hexadecimal)

@metisro
Copy link

metisro commented Feb 17, 2025

@sdshan8 Thank you that worked with export DOTNET_GCHeapHardLimit=80000000 // 2 GB
but now I have another error connected with permission on network interfaces

[20:05:02] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /opt/jellyfin/cache
[20:05:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[20:05:02] [ERR] [1] Jellyfin.Networking.Manager.NetworkManager: Error obtaining interfaces.
System.Net.NetworkInformation.NetworkInformationException (13): Permission denied
   at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
   at Jellyfin.Networking.Manager.NetworkManager.InitializeInterfaces()
[20:05:02] [WRN] [1] Jellyfin.Networking.Manager.NetworkManager: No interface information available. Using loopback interface(s).

@sdshan8
Copy link
Author

sdshan8 commented Feb 17, 2025

@sdshan8 Thank you that worked with export DOTNET_GCHeapHardLimit=80000000 // 2 GB but now I have another error connected with permission on network interfaces

[20:05:02] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /opt/jellyfin/cache
[20:05:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[20:05:02] [ERR] [1] Jellyfin.Networking.Manager.NetworkManager: Error obtaining interfaces.
System.Net.NetworkInformation.NetworkInformationException (13): Permission denied
   at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
   at Jellyfin.Networking.Manager.NetworkManager.InitializeInterfaces()
[20:05:02] [WRN] [1] Jellyfin.Networking.Manager.NetworkManager: No interface information available. Using loopback interface(s).

sadly I don't have an android 13 device to test it, and I unable to recreate it on Android 12.

but this error shouldn't stop jellyfin from listening on localhost,

also if you get a skia related error, just install libfontconfig1

@t-e-s-tweb
Copy link

@sdshan8 Thank you that worked with export DOTNET_GCHeapHardLimit=80000000 // 2 GB but now I have another error connected with permission on network interfaces

[20:05:02] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /opt/jellyfin/cache
[20:05:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[20:05:02] [ERR] [1] Jellyfin.Networking.Manager.NetworkManager: Error obtaining interfaces.
System.Net.NetworkInformation.NetworkInformationException (13): Permission denied
   at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
   at Jellyfin.Networking.Manager.NetworkManager.InitializeInterfaces()
[20:05:02] [WRN] [1] Jellyfin.Networking.Manager.NetworkManager: No interface information available. Using loopback interface(s).

sadly I don't have an android 13 device to test it, and I unable to recreate it on Android 12.

but this error shouldn't stop jellyfin from listening on localhost,

also if you get a skia related error, just install libfontconfig1

Just add parameter --nonetchange to the inside jellyfin.sh executable. Error should to away. It still listens on local host and works. Running on android 14 Debian with 2gb limit dotnet.

@metisro
Copy link

metisro commented Feb 18, 2025

@t-e-s-tweb Adding the --nonetchange parameter did the trick, Thank you very much to all for all the help :)

@t-e-s-tweb
Copy link

Now does anyone know how to add -hwaccel mediacodec option to jellyfin. This isnt using this flag in ffmpeg which is required for hardware decoding encoding. The server is transcoding using software encoder which is 2x to 3x but used too much battery.

@sdshan8
Copy link
Author

sdshan8 commented Feb 18, 2025

Now does anyone know how to add -hwaccel mediacodec option to jellyfin. This isnt using this flag in ffmpeg which is required for hardware decoding encoding. The server is transcoding using software encoder which is 2x to 3x but used too much battery.

I don't think that's supported by jellyfin and even if it was supported i don't think it will work as ffmpeg can't access android's system libraries

@sdshan8
Copy link
Author

sdshan8 commented Feb 18, 2025

Now does anyone know how to add -hwaccel mediacodec option to jellyfin. This isnt using this flag in ffmpeg which is required for hardware decoding encoding. The server is transcoding using software encoder which is 2x to 3x but used too much battery.

you can try using rffmpeg but I can't help with that as I haven't checked it out

@sdshan8
Copy link
Author

sdshan8 commented Feb 18, 2025

@sdshan8 Thank you that worked with export DOTNET_GCHeapHardLimit=80000000 // 2 GB but now I have another error connected with permission on network interfaces

[20:05:02] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /opt/jellyfin/cache
[20:05:02] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[20:05:02] [ERR] [1] Jellyfin.Networking.Manager.NetworkManager: Error obtaining interfaces.
System.Net.NetworkInformation.NetworkInformationException (13): Permission denied
   at System.Net.NetworkInformation.LinuxNetworkInterface.GetLinuxNetworkInterfaces()
   at Jellyfin.Networking.Manager.NetworkManager.InitializeInterfaces()
[20:05:02] [WRN] [1] Jellyfin.Networking.Manager.NetworkManager: No interface information available. Using loopback interface(s).

sadly I don't have an android 13 device to test it, and I unable to recreate it on Android 12.
but this error shouldn't stop jellyfin from listening on localhost,
also if you get a skia related error, just install libfontconfig1

Just add parameter --nonetchange to the inside jellyfin.sh executable. Error should to away. It still listens on local host and works. Running on android 14 Debian with 2gb limit dotnet.

Thank you, I will add it to the gist for other peoples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment