Atlantic.Net Blog

How to Install Ampache Music Streaming Server on Debian 10

Hitesh Jethva
by Atlantic.Net (243 posts) under Dedicated Server Hosting
0 Comments

Ampache is an open-source and web-based audio/video streaming application that allows you to access your music & videos from anywhere over the internet. Ampache provides a platform to host and manage your digital music collection on your own server. With Ampache, you can stream your music to your smartphone, tablet, and smart TV.

In this post, we will show you how to install the Ampache Music Streaming server on Debian 10.

Prerequisites

  • A fresh Debian 10 server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Debian 10 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Debian 10 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install LAMP Server

Ampache requires an Apache web server, Database server, PHP. So you will need to install the LAMP server and other PHP dependencies in your server. You can install all of them with the following command:

apt-get install apache2 mariadb-server php libapache2-mod-php php-cli php-common php-json php-gd php-xmlrpc php-curl php-intl php-imagick php-mysql php-zip php-xml php-mbstring php-bcmath unzip ffmpeg -y

After installing all packages, edit the php.ini file and make some changes:

nano /etc/php/7.3/apache2/php.ini

Change the following lines:

short_open_tag = On
memory_limit = 256M
cgi.fix_pathinfo = 0
max_execution_time = 360
upload_max_filesize = 64M
post_max_size = 64M

Save and close the file then restart the Apache service to apply the changes:

systemctl restart apache2

Step 3 – Configure MariaDB Database

Next, you will need to create a database and user for Ampache.

First, connect to MariaDB with the following command:

mysql

Next, create a database and user with the following command:

CREATE DATABASE ampachedb;
CREATE USER 'ampache'@'%' IDENTIFIED BY 'passsword';

Next, grant all the privileges to ampachedb with the following command:

GRANT ALL PRIVILEGES ON ampachedb.* TO 'ampache'@'%' WITH GRANT OPTION;

Next, flush the privileges and exit from MariaDB with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Install Ampache

Next, download the latest version of Ampache from the Git repository:

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

Once the download is completed, unzip the downloaded file to the Apache web root directory:

unzip ampache-4.4.3_all.zip -d /var/www/html/ampache

Next, change the directory to the extracted directory and rename some sample .htaccess files.

cd /var/www/html/ampache
mv rest/.htaccess.dist rest/.htaccess
mv play/.htaccess.dist play/.htaccess
mv channel/.htaccess.dist channel/.htaccess

Next, set proper ownership and permission to the Ampache directory:

chown -R www-data:www-data /var/www/html/ampache
chmod -R 775 /var/www/html/ampache

Next, create a directory to store your music and set proper ownership:

mkdir -p /data/
chown -R www-data:www-data /data/

Next, enable the Apache expires and rewrite module with the following command:

a2enmod expires rewrite

Finally, restart the Apache service to apply the changes:

systemctl restart apache2

Step 5 – Access Ampache Web Interface

Now, open your web browser and access the Ampache web interface using the URL http://your-server-ip/ampache. You should see the following page:
Ampache Select Language
Select your language and click on Start Configuration. You should see the following page:
Ampache Verify Dependencies
Make sure all the PHP dependencies are installed then click on the Continue button. You should see the following page:
Ampache Database Configuration
Provide your database details, uncheck “Create Database” and click on the Insert Database. You should see the following page:
Ampache Select Ffmpeg
Select the FFmpeg template and click on the Create Config button. You should see the following page:
Ampache Set Admin Password
Set your admin password and click on the Create Account button. You should see the following page:
Ampache Login Page
Provide your admin username, password and click on the Login button. You should see the Ampache dashboard on the following page:
Ampache Dashboard Page

Conclusion

Congratulations! You have successfully installed the Ampache music streaming server on Debian 10. You can now store your music and audio on the Ampache server and stream them over the internet from any device. Try it on your dedicated server from Atlantic.Net.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources