Self-Hosted Services and ProductivityService Portals and MediaIntermediate3-5 hoursLab build

Build a Media Utility Server with Jellyfin

A Jellyfin media utility server with metadata automation, storage hygiene checks, and a repeatable layout for home media libraries.

Last reviewed4/30/2026
Jellyfin utility stackshousehold utility servers
Ubuntu ServerJellyfinDocker (optional)Bash scripting

Expected Outcome

A working media server that streams your media content, automatically fetches metadata, and performs regular storage hygiene checks.

Assumptions

  • Basic understanding of Linux command line
  • A computer or server with a compatible OS (Ubuntu recommended)
  • Internet connection
  • Media files to serve

Bill of Materials

  • Computer or server (minimum 4GB RAM, 2 CPU cores)
  • External storage (HDD/SSD) for media files
  • Operating System (Ubuntu 20.04 or later)
  • Docker (optional, for containerized setup)

Build Steps

  1. Install Ubuntu Server

    Set up your server with Ubuntu Server to host the Jellyfin media server.

    Example pattern only. Adjust for your environment before running.

    Download the Ubuntu Server ISO from the official website.
    Create a bootable USB drive using Rufus or Etcher.
    Boot from the USB drive and follow the installation prompts.
  2. Install Jellyfin

    Install Jellyfin on your server to manage and stream your media files.

    Changes system state: review before running

    sudo apt update
    sudo apt install apt-transport-https
    wget -qO - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo apt-key add -
    echo 'deb https://repo.jellyfin.org/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/jellyfin.list
    sudo apt update
    sudo apt install jellyfin
  3. Configure Jellyfin

    Access the Jellyfin web interface to configure your media libraries. Manual action: Open a web browser and go to http://<your-server-ip>:8096.

    Example pattern only. Adjust for your environment before running.

    Follow the setup wizard to create an admin account and add media libraries.
  4. Set Up Automated Metadata Fetching

    Configure Jellyfin to automatically fetch metadata for your media files. Manual action: In the Jellyfin web interface, navigate to 'Libraries'; Select each library and enable 'Metadata Fetching' options.

    Example pattern only. Adjust for your environment before running.

    Set up a scheduled task to run metadata updates weekly.
  5. Implement Storage Hygiene Checks

    Set up scripts to perform regular checks on your media storage for duplicates and missing files.

    Changes system state: review before running

    Create a script file: nano ~/storage_hygiene.sh
    Add the following lines to the script:
    #!/bin/bash
    find /path/to/media -type f -exec md5sum {} + | sort | uniq -w32 -dD
    chmod +x ~/storage_hygiene.sh
    echo '0 2 * * 0 /bin/bash ~/storage_hygiene.sh' | sudo tee -a /etc/crontab
  6. Test Your Setup

    Verify that your Jellyfin server is working correctly and that metadata is being fetched.

    Example pattern only. Adjust for your environment before running.

    Access the Jellyfin web interface again.
    Play a few media files to ensure streaming works.
    Check if metadata is displayed correctly.

Validation

  • Ensure media files are accessible from the Jellyfin interface.
  • Check that metadata is automatically populated for new media.
  • Run the storage hygiene script and verify it detects duplicates.

Troubleshooting

  • If a step fails, capture the exact command, exit code, and log line before retrying or changing the design.
  • Use `docker compose ps` and `docker compose logs <service>` to separate image, environment, port, and volume problems.

Cleanup or Rollback

  • Keep a copy of working configuration, compose files, scripts, and service credentials before removing containers, packages, or data directories.
  • Stop test containers with `docker compose down` only after confirming which volumes contain persistent data.
  • Rollback by redeploying the previous compose file or image tag and restoring the saved environment file.

Next Improvements

  • Explore additional plugins for Jellyfin to enhance functionality.
  • Set up remote access for streaming outside of your home network.
  • Consider implementing a backup solution for your media files.