This guide shows two methods of installing Jellyfin on termux
Note: only tested on aarch64/arm64
These steps are same for both methods:
- Update the repo
pkg update
- Install proot-distro and ffmpeg (ffmpeg is only required in Method 2)
pkg install proot-distro ffmpeg -y
- Install ubuntu and Login to it
proot-distro install ubuntu
proot-distro login ubuntu
- Update and upgrade the packages in ubuntu
apt update && apt upgrade -y
- .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_GCHeapHardLimitto1C0000000(You might need to lower the value to get it to work):
export DOTNET_GCHeapHardLimit=1C0000000
- Save and exit nano by pressing
CTRL + xthenythenenter - Make it executable
chmod +x /etc/profile.d/02-dotnet-fix.sh
- Logout and log back into proot
Method 1:
- Install sudo curl and gnupg
apt install sudo curl gnupg -y
-
Follow the step 2 to 6 in the official ubuntu installation guide for Jellyfin here
-
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
- Run Jellyfin
jellyfin
- Note: if you get network related errors add
--nonetchangeparameter to jellyfin
- Give it a few minutes to finish startup then goto http://localhost:8096 to setup Jellyfin
Method 2:
- Install necessary packages (skip wget if you have it installed in termux, also replace
74with the latest version of libicu)
apt install wget libicu74 libfontconfig1 ca-certificates -y
- Make a new folder in /opt by the name jellyfin and cd into it
mkdir /opt/jellyfin
cd /opt/jellyfin
- 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
- Extract it with tar
tar xvzf jellyfin_10.10.6-arm64.tar.gz
- Create four sub-directories for Jellyfin data
mkdir data cache config log
- 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
--nonetchangeparameter to jellyfin in thejellyfin.sh - Save and exit nano by pressing
CTRL + xthenythenenter
- Make it executable
chmod +x jellyfin.sh
- Run it
/opt/jellyfin/jellyfin.sh
- 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
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.TaskCompletionSourceWithCancellation
1.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)