How to Install Ampache on Elementary OS

Ampache is a free, open-source web-based audio/video streaming application that lets you access your music and videos from anywhere. In this tutorial, we will show you how to install Ampache on the latest version of Elementary OS.

Prerequisites

Before we begin, you will need the following:

Step 1: Install Required Packages

Before starting the installation of Ampache, we need to install some required packages. Open the terminal and run the update command:

sudo apt update

Then install the packages:

sudo apt install apache2 php7.4 libapache2-mod-php7.4 php7.4-mysql mysql-server php7.4-xml php7.4-mbstring php7.4-gd unzip wget

Step 2: Download and Extract Ampache

Next, we need to download Ampache from the official website. Open the terminal and run the following command:

wget https://github.com/ampache/ampache/releases/download/4.4.3/ampache-4.4.3_all.zip

Then, extract the downloaded file:

unzip ampache-4.4.3_all.zip

After extraction, rename the extracted directory to something simpler like "ampache" and move it to the root directory of the webserver:

sudo mv ampache-4.4.3_all /var/www/html/ampache

Step 3: Create Ampache Database

Now, let's create a new database for Ampache:

sudo mysql -u root -p

This will open the MySQL prompt. Enter the MySQL root password when prompted.

mysql> CREATE DATABASE ampache;
mysql> GRANT ALL ON ampache.* TO 'ampache_user'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Make sure you replace ampache_user and password with your own values.

Step 4: Configure Apache for Ampache

Open the Apache configuration file for editing:

sudo nano /etc/apache2/sites-available/000-default.conf

Add the following lines at the end of the file:

<Directory /var/www/html/ampache>
  Options Indexes FollowSymLinks
  AllowOverride All
  Require all granted
</Directory>

Save and close the file.

Then, enable the rewrite module:

sudo a2enmod rewrite

Finally, restart Apache for the changes to take effect:

sudo systemctl restart apache2

Step 5: Install Ampache

Open a web browser and navigate to http://your_server_ip/ampache. You should see the installation wizard.

Select your preferred language and click on "Begin Installation."

On the next page, fill out the database connection details. Use the following values:

Click on "Test Settings" to check if the connection is successful.

On the next page, create a new admin user by filling in the required fields.

Finally, click on "Finish Installation" to complete the Ampache installation.

Conclusion

In this tutorial, we showed you how to install Ampache on Elementary OS. Now you can start using Ampache to stream your music and videos from anywhere.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!