Hereâs how to set up a Jellyfin media server with Alpine Linux and Docker. If youâve got an old laptop gathering dust, this is a great way to give it new life. By the end, youâll have a lightweight media server you can reach from any device on your network. Letâs dive in!
Why Alpine Linux and Docker for Jellyfin?
-
Alpine Linux is a minimal, lightweight distro thatâs perfect for older hardware. It keeps resource usage low.
-
Docker runs Jellyfin in a container, so itâs easy to manage, update, and isolate from the rest of your system.
-
Jellyfin is an open-source media server that lets you stream your movies, music, and TV shows to any device.
Prerequisites
Before we start, make sure you have:
-
An old laptop with:
-
An x86_64 (64-bit) processor.
-
At least 1 GB of RAM (2 GB or more recommended).
-
Enough disk space for the OS and your media files (a 16 GB drive is sufficient for the OS, but youâll need more for media).
-
-
A USB drive (at least 1 GB) for the installer.
-
An internet connection for the ISO and Docker images.
-
Basic familiarity with the command line (donât worry, weâll walk through each step).
Step 1: Download the Alpine Linux ISO
-
Visit the Alpine Linux downloads page.
-
Under the âStandardâ section, download the x86_64 ISO (e.g., alpine-standard-
-x86_64.iso). -
Save the ISO file to your current computer.
Step 2: Create a Bootable USB Drive
-
Download and install a tool like Rufus (for Windows) or Etcher (for macOS/Linux).
-
Insert your USB drive into your current computer.
-
Open Rufus or Etcher:
-
Select your USB drive.
-
Choose the Alpine Linux ISO file you downloaded.
-
Click âStartâ or âFlashâ to create the bootable USB.
-
Warning: Back up any data on the USB drive. It will be erased.
Step 3: Boot the Laptop from the USB Drive
-
Insert the bootable USB drive into your old laptop.
-
Power on the laptop and enter the BIOS/UEFI settings (usually by pressing F2, F12, Delete, or Esc during startup).
-
Change the boot order to boot from the USB drive first.
-
Save the changes and exit the BIOS/UEFI settings.
-
The laptop should now boot from the USB drive and load the Alpine Linux installer.
Troubleshooting: If the laptop doesnât boot from the USB, double-check the boot order or try recreating the bootable USB.
Step 4: Install Alpine Linux
-
Once booted, youâll see the Alpine Linux login prompt. Log in as root (no password required).
-
Run the following command to start the installation script:
setup-alpine -
Follow the on-screen prompts:
-
Choose your keyboard layout.
-
Set a hostname (e.g., jellyfin-server).
-
Configure the network (select eth0 for Ethernet or follow prompts for Wi-Fi).
-
Set the root password.
-
Choose your timezone.
-
Set up the disk:
-
Select sda (or the appropriate disk).
-
Choose sys for the installation mode.
-
Confirm to erase the disk and install Alpine Linux.
-
-
-
Once the installation is complete, remove the USB drive and reboot the laptop.
Why? This installs Alpine Linux on the laptopâs hard drive as a dedicated media server.
Step 5: Set Up Networking
-
After rebooting, log in as root with the password you set.
-
Verify your network connection:
-
For Ethernet, it should work automatically.
-
For Wi-Fi, run: setup-interfaces Follow the prompts to configure your Wi-Fi interface.
-
-
Restart the networking service: rc-service networking restart
-
Test the connection by pinging a website: ping -c 3 google.com
Tip: If Wi-Fi isnât working, install the firmware packages (e.g., apk add linux-firmware).
Step 6: Install Docker
-
Update the package list: apk update
-
Install Docker: apk add docker
-
Start the Docker service: rc-service docker start
-
Enable Docker to start on boot: rc-update add docker
Why? We want Docker to start auto-magically on boot so Jellyfin comes back after a reboot.
Step 7: Pull the Jellyfin Docker Image
- Pull the official Jellyfin Docker image from Docker Hub: docker pull jellyfin/jellyfin
Tip: This might take a few minutes depending on your internet speed.
Step 8: Run the Jellyfin Container
-
Create directories for Jellyfinâs configuration and media: mkdir -p /srv/jellyfin/config /srv/jellyfin/cache /path/to/your/media Replace /path/to/your/media with the actual path where your media files are stored (e.g., /home/media).
-
Run the Jellyfin container:
docker run -d \
--name jellyfin \
-p 8096:8096 \
-v /srv/jellyfin/config:/config \
-v /srv/jellyfin/cache:/cache \
-v /path/to/your/media:/media \
--restart unless-stopped \
jellyfin/jellyfin-
-p 8096:8096 maps the containerâs port 8096 to the host.
-
-v options mount directories for configuration, cache, and media.
-
--restart unless-stopped ensures the container restarts automatically unless manually stopped.
-
Why? This command runs Jellyfin in a container, making your media accessible via port 8096.
Step 9: Configure Jellyfin
-
Open a web browser on another device on the same network.
-
Navigate to http://host-ip:8096, replacing host-ip with your laptopâs IP address (find it with ifconfig or ip a).
-
Follow the Jellyfin setup wizard:
-
Choose your language.
-
Create an admin account.
-
Add your media libraries by selecting folders under /media.
-
Configure metadata and other settings as desired.
-
-
Click âFinishâ to complete the setup.
Tip: If you canât reach Jellyfin, make sure the container is running (docker ps) and port 8096 is open.
Additional Tips and Best Practices
-
Security:
-
Set up a firewall to restrict access. For example, using iptables:
apk add iptables iptables -A INPUT -p tcp --dport 8096 -j ACCEPT iptables -A INPUT -j DROP -
Consider setting up HTTPS for secure remote access.
-
-
Performance:
-
Since itâs an old laptop, avoid running unnecessary services.
-
Monitor resource usage with htop (install with apk add htop).
-
-
Updates:
-
Regularly update Alpine Linux: apk update && apk upgrade.
-
Update Jellyfin by pulling the latest Docker image: docker pull jellyfin/jellyfin and restart the container.
-
I have another tutorial/video on automating this every night at 2am so both your OS and your Docker image stay up to date.
-
-
Persistent Storage:
- Keep your media on a reliable drive, or use an external drive for more storage.
Conclusion
Thatâs it! You now have a Jellyfin media server on Alpine Linux and Docker, and you can watch your media from any device on your network. Happy streaming!