UbuntuUbuntu Based

How To Install Navidrome on Ubuntu 24.04 LTS

Install Navidrome on Ubuntu 24.04

For music enthusiasts seeking to manage and stream their personal music collections efficiently, Navidrome offers a compelling solution. This open-source music server is compatible with Subsonic/Airsonic, providing users with a robust platform to organize and enjoy their music libraries. By installing Navidrome on Ubuntu 24.04 LTS, users can leverage the reliability and flexibility of Linux to create a self-hosted music streaming service. In this article, we will guide you through the process of setting up Navidrome on Ubuntu 24.04 LTS, covering both direct installation and Docker methods, along with troubleshooting tips and additional resources.

Introduction to Navidrome

Navidrome is designed to be a lightweight yet feature-rich alternative to proprietary music streaming services. It allows users to access their music collections from anywhere, using a variety of devices. With Navidrome, you can enjoy your music without relying on third-party services, ensuring privacy and control over your personal data.

Ubuntu 24.04 LTS, with its long-term support, provides a stable environment for running Navidrome. This combination offers a cost-effective and customizable solution for music streaming, making it ideal for both personal and small-scale commercial use.

Prerequisites for Installation

Before proceeding with the installation, ensure your system meets the necessary requirements:

  • System Requirements: Navidrome can run on modest hardware, but ensure you have at least 2 GB of RAM and a dual-core processor for smooth performance.
  • Required Packages: You will need ffmpeg for audio transcoding. Other dependencies may be installed automatically during the setup process.

Method 1: Installing Navidrome Directly on Ubuntu

Step 1: Update and Upgrade Ubuntu

To ensure your system is up-to-date and ready for the installation, run the following commands in your terminal:

sudo apt update
sudo apt upgrade -y

These commands update your package list and upgrade any available packages to their latest versions.

Step 2: Install Dependencies

Install the necessary dependencies, including ffmpeg, which is crucial for audio processing:

sudo apt install ffmpeg

Step 3: Create Directory Structure

Create the necessary directories for Navidrome. Replace <user> and <group> with your actual user and group names:

sudo install -d -o <user> -g <group> /opt/navidrome
sudo install -d -o <user> -g <group> /var/lib/navidrome

Step 4: Download and Extract Navidrome

Visit the Navidrome GitHub repository to download the latest release. You can use wget to download it directly to your server:

wget https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_amd64.tar.gz

Replace the version number with the latest available. Extract the downloaded archive to the /opt/navidrome directory:

tar -xvf navidrome_0.50.0_linux_amd64.tar.gz -C /opt/navidrome

Step 5: Configure Navidrome

Create a configuration file to specify your music library paths. Use your preferred text editor to create a navidrome.toml file in /var/lib/navidrome:

sudo nano /var/lib/navidrome/navidrome.toml

Add the following configuration to point to your music directories:

[library]
  paths = ["/path/to/your/music/library"]

Replace /path/to/your/music/library with the actual path to your music files.

Step 6: Set Up Systemd Service

Create a systemd service file to manage Navidrome. Use your text editor to create a new file named navidrome.service in /etc/systemd/system/:

sudo nano /etc/systemd/system/navidrome.service

Paste the following content into the file:

[Unit]
Description=Navidrome Music Server
After=network.target

[Service]
User=<user>
ExecStart=/opt/navidrome/navidrome
Restart=always

[Install]
WantedBy=multi-user.target

Replace <user> with your actual username.

Step 7: Start and Enable Navidrome Service

Reload the systemd daemon to recognize the new service file, then start and enable Navidrome:

sudo systemctl daemon-reload
sudo systemctl start navidrome
sudo systemctl enable navidrome

Your Navidrome server should now be running and accessible via your web browser at http://localhost:4533 or http://your-IP-address:4533.

Install Navidrome on Ubuntu 24.04 LTS

Method 2: Installing Navidrome Using Docker

Step 1: Install Docker and Docker Compose

First, install Docker and Docker Compose on your Ubuntu system:

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 2: Create Docker Compose File

Create a Docker Compose file to define the Navidrome service. Use your text editor to create a file named docker-compose.yml:

nano docker-compose.yml

Paste the following configuration into the file:

version: '3'
services:
  navidrome:
    image: deluan/navidrome:latest
    restart: always
    ports:
      - "4533:4533"
    volumes:
      - /path/to/your/music/library:/music
      - /var/lib/navidrome:/data

Replace /path/to/your/music/library with the actual path to your music files.

Step 3: Run Docker Compose

Start Navidrome using Docker Compose in detached mode:

docker-compose up -d

Step 4: Configure Navidrome in Docker

Access the Navidrome web interface at http://localhost:4533 to configure your music library settings.

Step 5: Managing Docker Containers

To manage and update your Docker containers, you can use the following commands:

  • List Containers: docker ps
  • Stop Container: docker stop navidrome
  • Start Container: docker start navidrome
  • Update Image: docker-compose pull followed by docker-compose up -d

Troubleshooting Common Issues

Permission Errors

If you encounter permission errors, ensure that the directories used by Navidrome have the correct ownership. You can adjust permissions using chown:

sudo chown -R <user>:<group> /var/lib/navidrome

Service Not Starting

If the Navidrome service fails to start, check the systemd logs for errors:

sudo journalctl -u navidrome

This will help you identify any issues preventing the service from starting.

Network Connectivity

To ensure remote access to your Navidrome server, configure your firewall to allow incoming traffic on port 4533:

sudo ufw allow 4533

If you’re using a different firewall tool, adjust the command accordingly.

Congratulations! You have successfully installed Navidrome. Thanks for using this tutorial for installing Navidrome on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Navidrome website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button