Airsonic Advanced is a music streaming server software that allows you to stream your music directly from your server to your favorite device. In this tutorial, we will show you how to install Airsonic Advanced on Arch Linux using the command line.
Before we begin, make sure that your Arch Linux system is up-to-date and has the following prerequisites installed:
The easiest way to install these prerequisites is by using the following commands:
pacman -S jdk-openjdk
pacman -S git
pacman -S mariadb
The first step to installing Airsonic Advanced on Arch Linux is to clone the Airsonic Advanced repository from GitHub. To do this, open your terminal and use the following command:
git clone https://github.com/airsonic-advanced/airsonic-advanced.git
Once the cloning process is complete, navigate to the newly created airsonic-advanced directory using this command:
cd airsonic-advanced
Now that you have successfully cloned the Airsonic Advanced repository, it's time to build and install the software. To do this, use the following commands:
./gradlew clean assemble
sudo mkdir -p /opt && sudo cp -r build/distributions/airsonic-advanced-*.tar /opt/
sudo tar -xf /opt/airsonic-advanced-*.tar -C /opt/
Wait for the installation process to complete. Once it's done, the Airsonic Advanced server should be installed in /opt/airsonic-advanced-<version>/
.
After installing Airsonic Advanced on your Arch Linux system, you need to configure it to work with your media files. To do this, follow these steps:
Create a user for Airsonic Advanced.
sudo useradd -r -s /usr/bin/nologin -d /opt/airsonic-advanced-<version>/airsonic airsonic
Create a directory for your media files.
sudo mkdir /opt/music
Set permissions for the airsonic
user.
sudo chown -R airsonic:airsonic /opt/music
sudo chown -R airsonic:airsonic /opt/airsonic-advanced-<version>/
Create a database for Airsonic Advanced.
sudo mysql -u root -p
CREATE DATABASE airsonic;
CREATE USER 'airsonic'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON airsonic.* TO 'airsonic'@'localhost';
FLUSH PRIVILEGES;
exit
Edit the configuration file.
sudo nano /opt/airsonic-advanced-<version>/airsonic/airsonic.properties
Replace the following properties with your own configuration:
server.contextPath=/
server.port=80
server.httpsPort=443
postgresql.enabled=false
mysql.enabled=true
mysql.host=localhost
mysql.port=3306
mysql.database=airsonic
mysql.username=airsonic
mysql.password=password
media.musicFolders=/opt/music
Save and close the file.
After configuring Airsonic Advanced, you can start the server by running the following command:
sudo /opt/airsonic-advanced-<version>/airsonic/bin/airsonic
Airsonic Advanced should now be accessible at http://localhost/
or https://localhost/
using your web browser.
Congratulations, you have now successfully installed Airsonic Advanced on Arch Linux! You can now start streaming your music and enjoy the many features that Airsonic Advanced offers.
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!