Hello friends. In this post, I will explain to you how to deploy your own media center in the cloud by installing Jellyfin on Ubuntu 20.04.
Introducing to Jellyfin
Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way.
The app enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included.
So if you have a lot of media files and you want to have them always at hand, then Jellyfin is the best for you.
Install Jellyfin on Ubuntu 20.04
Installing Jellyfin is possible thanks to a repository that we have to add to do the process. So, let’s get started.
First, open a terminal and upgrade Ubuntu
sudo apt update sudo apt upgrade
After that, you need to enable the Ubuntu universe repository. This is because Jellyfin requires dependencies to be loosened in that repository.
sudo add-apt-repository universe
Then install a package called apt-transport-https that will help add the Jellyfin repository.
sudo apt install apt-transport-https
After that, you can download and add the GPG key from the official repository of the application
wget -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add - --2021-03-06 17:13:36-- https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key Resolving repo.jellyfin.org (repo.jellyfin.org)... 2604:a880:cad:d0::cf3:f001, 68.183.204.194 Connecting to repo.jellyfin.org (repo.jellyfin.org)|2604:a880:cad:d0::cf3:f001|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3078 (3.0K) [application/octet-stream] Saving to: ‘STDOUT’ - 100%[=====================================================================================>] 3.01K --.-KB/s in 0s 2021-03-06 17:13:36 (127 MB/s) - written to stdout [3078/3078] OK
This process ensures that we can install applications from the repository. Making the system more and more secure.
Now yes, add the Jellyfin repository.
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list deb [arch=amd64] https://repo.jellyfin.org/ubuntu focal main
And refresh APT so that the process can complete.
sudo apt update
Now you can install the application by running
sudo apt install jellyfin Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: fontconfig-config fonts-dejavu-core jellyfin-ffmpeg jellyfin-server jellyfin-web libass9 libbluray2 libcairo2 libdrm-intel1 libfontconfig1 libgraphite2-3 libharfbuzz0b libmp3lame0 libopus0 libpciaccess0 libpixman-1-0 libtheora0 libvdpau1 libvorbisenc2 libvpx6 libwebp6 libwebpmux3 libx11-6 libx11-data libx264-155 libx265-179 libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxrender1 libzvbi-common libzvbi0 ocl-icd-libopencl1 Suggested packages: libbluray-bdj opus-tools opencl-icd Recommended packages: libaacs0 vdpau-driver-all | vdpau-driver The following NEW packages will be installed: fontconfig-config fonts-dejavu-core jellyfin jellyfin-ffmpeg jellyfin-server jellyfin-web libass9 libbluray2 libcairo2 libdrm-intel1 libfontconfig1 libgraphite2-3 libharfbuzz0b libmp3lame0 libopus0 libpciaccess0 libpixman-1-0 libtheora0 libvdpau1 libvorbisenc2 libvpx6 libwebp6 libwebpmux3 libx11-6 libx11-data libx264-155 libx265-179 libxau6 libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxext6 libxrender1 libzvbi-common libzvbi0 ocl-icd-libopencl1 0 upgraded, 37 newly installed, 0 to remove and 20 not upgraded. Need to get 93.4 MB of archives. After this operation, 291 MB of additional disk space will be used.
After installing, you need to start it and enable it so it can start with the system.
sudo systemctl enable --now jellyfin Synchronizing state of jellyfin.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable jellyfin
To check that everything is OK, check the status of the service
sudo systemctl status jellyfin ● jellyfin.service - Jellyfin Media Server Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/jellyfin.service.d └─jellyfin.service.conf Active: active (running) since Sat 2021-03-06 17:15:35 CET; 2min 3s ago Main PID: 3764 (jellyfin) Tasks: 16 (limit: 2286) Memory: 89.9M CGroup: /system.slice/jellyfin.service └─3764 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --restartpath=/usr/lib/jellyfin/restart.sh --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg Mar 06 17:15:43 osradar jellyfin[3764]: [17:15:43] [INF] Registering publisher for urn:schemas-upnp-org:device:MediaServer:1 on 157.90.172.109 Mar 06 17:15:43 osradar jellyfin[3764]: [17:15:43] [INF] Executed all pre-startup entry points in 0:00:00.8272122 Mar 06 17:15:43 osradar jellyfin[3764]: [17:15:43] [INF] Core startup complete Mar 06 17:15:44 osradar jellyfin[3764]: [17:15:44] [INF] Executed all post-startup entry points in 0:00:00.5657009 Mar 06 17:15:44 osradar jellyfin[3764]: [17:15:44] [INF] Startup complete 0:00:08.0004279 Mar 06 17:15:45 osradar jellyfin[3764]: [17:15:45] [INF] StartupTrigger fired for task: Update Plugins Mar 06 17:15:45 osradar jellyfin[3764]: [17:15:45] [INF] Queueing task PluginUpdateTask Mar 06 17:15:45 osradar jellyfin[3764]: [17:15:45] [INF] Executing Update Plugins Mar 06 17:15:46 osradar jellyfin[3764]: [17:15:46] [INF] Update Plugins Completed after 0 minute(s) and 0 seconds Mar 06 17:15:46 osradar jellyfin[3764]: [17:15:46] [INF] ExecuteQueuedTasks
Jellyfin is now available on http://server:8096
but you should set up a reverse proxy with Nginx and enable HTTPS to ensure that all data transmitted is secure.
Configuring Nginx as the reverse proxy and enabling HTTPS
So, install Nginx and make sure it is running.
sudo apt install nginx sudo systemctl status nginx
Then create a new configuration file for Jellyfin
sudo nano /etc/nginx/conf.d/jellyfin.conf
And add the following content
upstream backend { server 127.0.0.1:8096; keepalive 64; } server { listen 80; server_name osradartest.ga;location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
} }
Save the changes and close the editor.
After that, you need to enable HTTPS and with the help of Certbot the process is very easy. So, install it as well as the Nginx plugin.
sudo apt install certbot python3-certbot-nginx
After that, get a new certificate with the following command:
sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d your-domain
Of course, replace the value of --email
and -d
with your email and domain respectively.
Finally, restart Nginx.
sudo systemctl restart nginx
And you will be able to access Jellyfin to complete the installation.
Complete the installation of Jellyfin on Ubuntu
Now open a web browser and go to https://your-domain
and you will see the loading screen.
Then you will see the welcome screen. Select the language to display and press the Next
button.
Then, create a new user.
You can add your media collection at once.
After that, select the language of the metadata.
Then, you have the option to configure remote access.
If all goes well, you will see this screen.
Then log in with the user you created.
You will be able to enjoy Jellyfin and use your media library.
Conclusion
Jellyfin is another complete alternative to have our files in the cloud. In this case, they are multimedia files that we can play from anywhere with internet access.