How to Install Airsonic Media Server on CentOS 7

Airsonic is a free, open source and cross platform web-based media streamer, forked from Subsonic and Libresonic, provides ubiquitious access to your music, that you can share with your family, friends or listen to music while at work.

It is optimized for efficient browsing through large music collections (hundreds of gigabytes), and also works very well as a local jukebox. It runs on most platforms, including Unix-like operating systems such as Linux and Mac OS and Windows.

Airsonic Free Media Server for Linux

Airsonic Features:

  • A intuitive web interface with search and index functionality.
  • An integrated Podcast receiver.
  • Supports streaming to multiple players simultaneously.
  • Supports any audio or video format that can stream over HTTP.
  • Supports on-the-fly conversion and streaming of virtually any audio format and much more.

Recommended System Requirements:

  1. A CentOS 7 Server or RHEL 7 Server with Minimal Install.
  2. Minimum 1GB RAM
  3. OpenJDK 8

Testing Environment:

For the purpose of this article, I will be installing Airsonic Media Streaming Server on a Linode CentOS 7 VPS with a static IP address and hostname

How to Install Airsonic Media Streaming Server in CentOS 7

1. First start by installing the latest version of prebuilt OpenJDK 8 package using the yum package manager as shown.

# yum install java-1.8.0-openjdk-devel

2. Next, create a dedicated airsonic user, directories (store media server files) and assign ownership to the user that will run Airsonic using following commands.

# useradd airsonic
# mkdir /var/airsonic
# mkdir /var/media_files
# chown airsonic /var/airsonic
# chown airsonic /var/media_files

3. Now download the latest Airsonic .war package from the download page, or use the following wget command to get it.

# wget --output-document=/var/airsonic/airsonic.war

4. To make Airsonic to work with systemd, you need to download its unit file under the directory /etc/systemd/system/ and reload the systemd manager configuration to start airsonic service, enable it to start at boot time, and check whether its up and running using following commansds.

# wget -O /etc/systemd/system/airsonic.service
# systemctl daemon-reload
# systemctl start airsonic.service
# systemctl enable airsonic.service
# systemctl status airsonic.service
Sample Output
? airsonic.service - Airsonic Media Server
Loaded: loaded (/etc/systemd/system/airsonic.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-09-04 04:17:12 EDT; 14s ago
Main PID: 12926 (java)
CGroup: /system.slice/airsonic.service
??12926 /usr/bin/java -Xmx700m -Dairsonic.home=/var/airsonic -Dserver.context-pa...
Sep 04 04:17:12 systemd[1]: Starting Airsonic Media Server...
Sep 04 04:17:20 java[12926]: _ _
Sep 04 04:17:20 java[12926]: /\ (_) (_)
Sep 04 04:17:20 java[12926]: / \ _ _ __ ___ ___ _ __ _ ___
Sep 04 04:17:20 java[12926]: / /\ \ | | '__|/ __|/ _ \| '_ \| |/ __|
Sep 04 04:17:20 java[12926]: / ____ \| | | \__ \ (_) | | | | | (__
Sep 04 04:17:20 java[12926]: /_/ \_\_|_| |___/\___/|_| |_|_|\___|
Sep 04 04:17:20 java[12926]: 10.1.2-RELEASE
Sep 04 04:17:21 java[12926]: 2018-09-04 04:17:21.526 INFO --- org.airsonic.... /)
Sep 04 04:17:21 java[12926]: 2018-09-04 04:17:21.573 INFO --- org.airsonic....acy
Hint: Some lines were ellipsized, use -l to show in full.

Also, you need to setup the config file where you can review/modify any startup settings, as follows. Note that everytime you make any changes in this file, you need to restart the airsonic service to apply the changes.

# wget -O /etc/sysconfig/airsonic

5. Once everything in place, you can access Airsonic at the following URLs, login with username and password “admin”, then change the password.


Airsonic Login

6. After login, you will land in the admin dashboard, click on “Change administrator password”, and change the default password for the administrator account to secure your server.

AirSonic Admin Password

7. Next, setup media folder(s) where Airsonic will keep your music and videos. Go to Settings > Media folders to add folders. For test purposes, we have used /var/media_files which we created earlier on. Once you have set the correct directory, click on Save.

AirSonic Set Media Folder

Note that:

  • Airsonic will organize your music according to how they are organized on your disk, in the media folder you have added.
  • It’s recommended that the music folders you add are organized in an “artist/album/song” manner.
  • You can use music managers such as MediaMonkey to organize your music.

You can also create new user accounts with different privileges, and do more with your Airsonic setup. For more information, read the Airsonic documentation from:

That’s all! Airsonic is a simple, cross platform free media server to stream your music and video. If you have any thoughts about the article, do share with us in the commment secetion below.

Spread the love

Posted by News Monkey