How to install Ampache on macOS

Ampache is a free, open-source web-based software that manages and streams your music collection. In this tutorial, you'll learn how to install Ampache on macOS.

Prerequisites

  • A macOS computer with administrative privileges
  • A web server installed (such as Apache or Nginx)
  • PHP installed (version 7.2 or higher recommended)
  • MySQL or MariaDB installed and running
  • A web browser

Installation

  1. Download the latest version of Ampache from the official website.

  2. Extract the downloaded file to a directory of your choice (e.g. /var/www/ampache). You can use the following command to extract the file:

    tar -xzf ampache-x.y.z.tar.gz -C /var/www/
    
  3. Rename the config.inc.php.dist file to config.inc.php:

    cd /var/www/ampache
    cp config.inc.php.dist config.inc.php
    
  4. Open config.inc.php in your favorite text editor and edit the following lines to match your MySQL/MariaDB database credentials:

    define('DB_TYPE', 'mysql');
    define('DB_HOST', 'localhost');
    define('DB_PORT', '3306');
    define('DB_USER', 'username');
    define('DB_PASS', 'password');
    define('DB_NAME', 'ampache');
    
  5. Create a new MySQL/MariaDB database named ampache:

    mysql -u root -p
    mysql> CREATE DATABASE ampache;
    mysql> exit;
    
  6. Set the correct permissions on the ampache directory:

    chown -R www-data:www-data /var/www/ampache
    chmod -R 775 /var/www/ampache
    
  7. Open your web browser and navigate to http://localhost/ampache.

  8. Follow the on-screen instructions to complete the installation process.

Congratulations! You have successfully installed Ampache on macOS.