Ampache on Debian Stretch

From Braindisconnect
Jump to navigationJump to search

Ampache Music Server

Create the Debian LAMP Stretch server first.

Install needed packages

apt install -y composer php7.0-curl php7.0-xml php7.0-gd

Download the latest Ampache

cd /var/www/html
git clone


Create the DB and User, use whatever username and password you want.

mysql -p

Change ampache_user and ampache_pass to the username and password you want to use.

CREATE USER ampache_user@localhost IDENTIFIED BY 'ampache_pass';
GRANT ALL PRIVILEGES ON ampache.* TO 'ampache_user'@'localhost';

Import DB (uses root login)

mysql -p ampache < /var/www/html/ampache/sql/ampache.sql

Install Composer to Ampache

cd /var/www/html/ampache/
composer install --prefer-source --no-interaction

Configure Ampache

cd /var/www/html/ampache/config
cp ampache.cfg.php.dist ampache.cfg.php
nano ampache.cfg.php

Change Web Path

web_path        = "/ampache"

Change username and password for database

database_username = ampache_username
database_password = ampache_password

Uncomment and change image sizes for Album Art

album_art_min_width = 300
album_art_max_width = 1024
album_art_min_height = 300
album_art_max_height = 1024 

Configure Apache

nano /etc/apache2/apache2.conf

Change AllowOverride None

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

Configure PHP

nano /etc/php/7.0/apache2/php.ini


upload_max_filesize = 100M
post_max_size = 100M
memory_limit = 512M

Chown the Web Dir

chown -R www-data:www-data /var/www/html

Restart Apache

service apache2 restart


Go to Amapche Test to finish install:

http://<IP address>/ampache/test.php

Everything should be green, if not fix and refresh the page.

Create Admin Account

Finally you need to create the admin account at:

http://<IP address>/ampache/install.php?action=show_create_account&htmllang=en_US&charset=

You can now log into Ampache using the admin account, you can create users from the server icon.