{"id":1155,"date":"2026-11-23T13:00:00","date_gmt":"2026-11-23T13:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=1155"},"modified":"2026-11-23T13:00:00","modified_gmt":"2026-11-23T13:00:00","slug":"jellyfin-docker-almalinux-8","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/23\/jellyfin-docker-almalinux-8\/","title":{"rendered":"How to Install Jellyfin with Docker on AlmaLinux 8"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Install Jellyfin with Docker on AlmaLinux 8 and serve your media library through an HTTPS address. This setup takes about 15 minutes on a fresh VPS and keeps Jellyfin\u2019s web port private behind Nginx.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A 64-bit AlmaLinux 8 VPS with at least 2 GB of RAM and 20 GB of free disk space, plus enough extra storage for your media.<\/li>\n\n\n<li>SSH access as <code>root<\/code>, or a regular account with working <code>sudo<\/code> privileges.<\/li>\n\n\n<li>A domain such as <code>YOUR_DOMAIN<\/code> with an A record pointing to <code>SERVER_IP<\/code>.<\/li>\n\n\n<li>Inbound TCP ports 80 and 443 allowed by both your VPS provider and firewalld. Port 8096 stays bound to localhost.<\/li>\n\n\n<li>A <a href=\"https:\/\/vpslake.com\/buy-vps\">VPSLake Linux VPS<\/a> if you need an AlmaLinux server with root access.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These instructions install Docker Engine and Compose as part of the process. If you are already <code>root<\/code>, remove <code>sudo<\/code> from the commands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Update AlmaLinux and install Docker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Updating the host first gives Docker a current Enterprise Linux package environment and reduces dependency conflicts.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -E '^(PRETTY_NAME|VERSION_ID|ID_LIKE)=' \/etc\/os-release\nuname -m\nsudo dnf upgrade -y\nsudo dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc\nsudo dnf install -y dnf-plugins-core ca-certificates\nsudo dnf config-manager --add-repo https:\/\/download.docker.com\/linux\/rhel\/docker-ce.repo\nsudo dnf makecache\nsudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\nsudo systemctl enable --now docker<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The removal command is intended for a new VPS. Do not remove Podman or <code>runc<\/code> from a host that already runs production containers until you have checked those workloads. Docker\u2019s <a href=\"https:\/\/docs.docker.com\/engine\/install\/rhel\/\" target=\"_blank\" rel=\"noopener\">RHEL installation guide<\/a> documents the compatible RPM repository method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm that both Docker and the Compose plugin work:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl is-active docker\nsudo docker version --format 'Client {{.Client.Version}} \/ Server {{.Server.Version}}'\nsudo docker compose version\nsudo docker run --rm hello-world<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output includes an active service, version strings, and the Docker smoke-test message:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>active\nClient X.Y.Z \/ Server X.Y.Z\nDocker Compose version v2.X.Y\nHello from Docker!<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact versions vary as Docker publishes updates.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Prepare Jellyfin\u2019s persistent directories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Bind mounts keep your configuration, cache, and media outside the disposable container layer, while <code>:Z<\/code> lets SELinux label the directories for private container use.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo install -d -m 0750 \/srv\/jellyfin\/config \/srv\/jellyfin\/cache \/srv\/jellyfin\/media\nsudo install -d -m 0750 \/opt\/jellyfin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Place the video, music, or photo files you want Jellyfin to index under <code>\/srv\/jellyfin\/media<\/code>. The container will see that directory as <code>\/media<\/code>; the media mount is read-only so the server cannot alter the originals.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Create and start the Jellyfin container<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Compose makes the restart policy and storage mappings repeatable, and binding port 8096 to <code>127.0.0.1<\/code> prevents direct public access to the unencrypted backend.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the Compose file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/opt\/jellyfin\/compose.yaml &gt;\/dev\/null &lt;&lt;'EOF'\nservices:\n  jellyfin:\n    image: jellyfin\/jellyfin:latest\n    container_name: jellyfin\n    ports:\n      - \"127.0.0.1:8096:8096\"\n    volumes:\n      - \"\/srv\/jellyfin\/config:\/config:Z\"\n      - \"\/srv\/jellyfin\/cache:\/cache:Z\"\n      - \"\/srv\/jellyfin\/media:\/media:ro,Z\"\n    restart: unless-stopped\nEOF<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Validate the YAML, download the official image, and start the service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker compose -f \/opt\/jellyfin\/compose.yaml config --quiet\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml pull\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml up -d\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The container should show <code>Up<\/code> and a loopback-only port mapping:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NAME      SERVICE   STATUS   PORTS\njellyfin  jellyfin  Up       127.0.0.1:8096-&gt;8096\/tcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jellyfin\u2019s <a href=\"https:\/\/jellyfin.org\/docs\/general\/installation\/container\/\" target=\"_blank\" rel=\"noopener\">official container guide<\/a> uses the same image and persistent config\/cache pattern. This guide omits UDP 7359 because a public VPS normally does not need LAN client discovery; add it later only if your network requires it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Install Nginx and open HTTPS in firewalld<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx will be the only internet-facing service, forwarding browser requests to Jellyfin and giving Certbot a web server to configure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install Nginx and Certbot from AlmaLinux 8\u2019s EPEL repository, then enable the firewall and web services:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y epel-release\nsudo dnf install -y nginx certbot python3-certbot-nginx\nsudo systemctl enable --now firewalld\nsudo firewall-cmd --permanent --add-service=http\nsudo firewall-cmd --permanent --add-service=https\nsudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create an initial HTTP reverse-proxy server block. Replace <code>YOUR_DOMAIN<\/code> with the hostname whose DNS record points to this VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tee \/etc\/nginx\/conf.d\/jellyfin.conf &gt;\/dev\/null &lt;&lt;'EOF'\nserver {\n    listen 80;\n    listen [::]:80;\n    server_name YOUR_DOMAIN;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:8096;\n        proxy_http_version 1.1;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_buffering off;\n        proxy_read_timeout 3600s;\n    }\n}\nEOF\nsudo setsebool -P httpd_can_network_connect 1\nsudo nginx -t\nsudo systemctl enable --now nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The SELinux boolean permits Nginx to connect to the local Docker-published port without disabling SELinux. <code>nginx -t<\/code> should report that the syntax is okay and the test is successful.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Issue a Let\u2019s Encrypt certificate<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Certbot can edit the working Nginx server block and add the HTTPS listener, redirect, and certificate renewal timer after it confirms your domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Replace both placeholders before running this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot --nginx --non-interactive --agree-tos --no-eff-email --redirect --email YOUR_EMAIL --domain YOUR_DOMAIN<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The command succeeds only when <code>YOUR_DOMAIN<\/code> resolves to this VPS and port 80 is reachable from the internet. Certbot installs automatic renewal; test the renewal path without requesting a real certificate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot renew --dry-run<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see a successful simulated renewal. If you use a DNS proxy, make sure it forwards HTTP and HTTPS to this server during issuance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Jellyfin installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check the container, HTTPS endpoint, firewall services, and recent application logs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker inspect --format '{{.State.Status}}' jellyfin\ncurl -fsS -o \/dev\/null -w 'HTTP %{http_code}\\n' https:\/\/YOUR_DOMAIN\/web\/index.html\nsudo firewall-cmd --list-services\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml logs --tail=30 jellyfin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected checks look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>running\nHTTP 200\nhttp https<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>https:\/\/YOUR_DOMAIN<\/code> in a browser and complete Jellyfin\u2019s first-run wizard. Create the administrator account, choose the display language, then add a media library using <code>\/media<\/code> as the container path. The files in <code>\/srv\/jellyfin\/media<\/code> should appear after the scan starts.<\/p>\n\n\n\n<aside class=\"vl-element vl-cta-banner\" aria-label=\"Stream Jellyfin on Linux\">\n\t<div class=\"vl-cta-banner__content\">\n\t\t<p class=\"vl-cta-banner__eyebrow\">AlmaLinux VPS<\/p>\n\t\t<h3 class=\"vl-cta-banner__title\">Stream Jellyfin on Linux<\/h3>\n\t\t<p class=\"vl-cta-banner__text\">Deploy a Docker-ready AlmaLinux VPS for your private media library.<\/p>\n\t<\/div>\n\t<a class=\"vl-cta-banner__button\" href=\"\/buy-vps\" aria-label=\"View Linux VPS plans\">View Linux VPS plans<\/a>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><code>No match for argument: docker-ce<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">DNF did not load Docker\u2019s RHEL repository, or its metadata is stale. Re-add the repository and rebuild the cache before retrying the package install:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf config-manager --add-repo https:\/\/download.docker.com\/linux\/rhel\/docker-ce.repo\nsudo dnf clean all\nsudo dnf makecache\ndnf list --showduplicates docker-ce<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The list should include an <code>el8<\/code> Docker package from the stable repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Nginx returns <code>502 Bad Gateway<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The proxy can answer, but Jellyfin is not listening on localhost or SELinux is blocking Nginx\u2019s connection. Check both services and the container log:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker ps --filter name=jellyfin\ncurl -I http:\/\/127.0.0.1:8096\nsudo getsebool httpd_can_network_connect\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml logs --tail=50 jellyfin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The SELinux check should say <code>httpd_can_network_connect --&gt; on<\/code>. If the container is stopped, inspect its first error and restart it with <code>sudo docker compose -f \/opt\/jellyfin\/compose.yaml up -d<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Jellyfin cannot read the media directory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>:ro,Z<\/code> mount handles container labeling, but the host files still need directory execute permission and file read permission. Check the path and recreate the container so Docker reapplies the SELinux label:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo namei -l \/srv\/jellyfin\/media\nsudo chmod 0750 \/srv\/jellyfin\/media\nsudo docker compose -f \/opt\/jellyfin\/compose.yaml up -d --force-recreate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not use <code>chmod 777<\/code>; correct the owner and group on the media files if the existing permissions are too restrictive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Certbot reports a failed domain validation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The DNS record may point elsewhere, or a provider firewall may still block TCP 80. Confirm the public DNS result and the local web service, then retry after the record has propagated:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>getent hosts YOUR_DOMAIN\nsudo firewall-cmd --list-services\nsudo systemctl is-active nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The hostname must resolve to <code>SERVER_IP<\/code>, and the provider-level firewall must allow HTTP and HTTPS in addition to firewalld.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hardening and maintenance<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>Keep port 8096 bound to <code>127.0.0.1<\/code>; do not publish it publicly after Nginx is working.<\/li>\n\n\n<li>Back up <code>\/srv\/jellyfin\/config<\/code> and your media storage. The config directory contains the database, users, metadata, and server settings.<\/li>\n\n\n<li>Update during a maintenance window with <code>sudo docker compose -f \/opt\/jellyfin\/compose.yaml pull<\/code> followed by <code>sudo docker compose -f \/opt\/jellyfin\/compose.yaml up -d<\/code>.<\/li>\n\n\n<li>If you need DLNA or LAN discovery, review Jellyfin\u2019s networking requirements before opening additional UDP ports.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I install Jellyfin without a domain?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, but this HTTPS reverse-proxy setup expects a domain for a trusted Let\u2019s Encrypt certificate. For a private LAN, you can access a separately configured Jellyfin HTTP port by IP, but do not expose that unencrypted interface to the public internet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why is port 8096 not open in firewalld?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Compose file maps Jellyfin to localhost, so outside clients cannot reach it directly. Nginx handles public traffic on ports 80 and 443 and forwards it internally over the host loopback interface.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where should I put movies and music?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Copy them into <code>\/srv\/jellyfin\/media<\/code> on the host. In the Jellyfin setup wizard, choose the matching container path <code>\/media<\/code>; the read-only mount protects the source files from changes by the container.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does Jellyfin need host networking for Docker?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Bridge networking plus a published HTTP port is enough for web playback and remote streaming through Nginx. Host networking is useful for features such as DLNA, but it exposes more host network behavior and is not necessary for this web-focused deployment.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Can I install Jellyfin without a domain?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes, but this HTTPS reverse-proxy setup expects a domain for a trusted Let\u2019s Encrypt certificate. For a private LAN, you can access a separately configured Jellyfin HTTP port by IP, but do not expose that unencrypted interface to the public internet.\"}}, {\"@type\": \"Question\", \"name\": \"Why is port 8096 not open in firewalld?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The Compose file maps Jellyfin to localhost, so outside clients cannot reach it directly. Nginx handles public traffic on ports 80 and 443 and forwards it internally over the host loopback interface.\"}}, {\"@type\": \"Question\", \"name\": \"Where should I put movies and music?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Copy them into `\/srv\/jellyfin\/media` on the host. In the Jellyfin setup wizard, choose the matching container path `\/media`; the read-only mount protects the source files from changes by the container.\"}}, {\"@type\": \"Question\", \"name\": \"Does Jellyfin need host networking for Docker?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Bridge networking plus a published HTTP port is enough for web playback and remote streaming through Nginx. Host networking is useful for features such as DLNA, but it exposes more host network behavior and is not necessary for this web-focused deployment.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Install Jellyfin with Docker on AlmaLinux 8 behind Nginx and HTTPS, with persistent media storage, firewalld rules, verification, and common fixes.","protected":false},"author":1,"featured_media":1156,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[5,9],"tags":[94,118,150,151],"class_list":["post-1155","post","type-post","status-publish","format-standard","has-post-thumbnail","category-guides","category-vps-hosting","tag-almalinux-8","tag-docker","tag-jellyfin","tag-media-server","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=1155"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1155\/revisions"}],"predecessor-version":[{"id":4171,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/1155\/revisions\/4171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/1156"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=1155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=1155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=1155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}