How to Create Airsonic Media Streamer on Ubuntu Linux

apps on screen
apps on screen

Airsonic is an open-source web media streamer based on Java. It allows you to stream your music and provide ubiquitous access to it anywhere there’s an Internet connection.

Airsonic is designed to handle extensive music collections and is optimized for MP3 streaming. It works with any media format streamed over HTTP / HTTPS, including AAC, OGG, WMA, FLAC, APE, etc.

This brief tutorial shows students and new users how to easily install Airsonic on Ubuntu 16.04 / 17.10 and 18.04 LTS servers and desktops.

For more about Airsonic, please check out its homepage.

Install Java 8

For Airsonic to work, you should have Java installed. To do that, run the commands below. Of course, the easiest way to install Oracle Java JDK 8 on Ubuntu is via a third-party PPA… To add that PPA, run the commands below.

sudo add-apt-repository ppa:webupd8team/java

After running the commands above, you should see a prompt to accept the PPA key onto Ubuntu… accept and continue.

Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 8 installer…. the installer should install the latest Java JDK 8 on your Ubuntu machines.

sudo apt update
sudo apt install oracle-java8-installer

When you run the commands above, you’ll be prompted to access the license terms of the software… accept and continue.

oracle java 9

Set Oracle JDK8 as default; install the oracle-java8-set-default package to do that. This will automatically set the JAVA env variable.

sudo apt install oracle-java8-set-default

Now that JAVA is installed, run the commands below to set its home directory.

sudo nano /etc/environment

Then copy and paste the highlighted line below and save the file.

export JAVA_HOME

After that, run the commands below.

source /etc/environment

When you run echo $JAVA_HOME, you should see the Java home directory.

Download and Configure Airsonic

After installing Java, run the commands below to create the Airsonic home directory and download the Airsonic archived package.

sudo mkdir -p /opt/airsonic
cd /opt/airsonic && sudo wget

After that, create an Airsonic user and give the user access to the /opt/air sonic directory.

sudo useradd airsonic

Then give the user access to that directory.

sudo chown -R airsonic:airsonic /opt/airsonic

Next, create an Airsonic system service. Run the commands below

sudo nano /etc/systemd/system/airsonic.service

Then copy the content below into the file and save it.

Description=Airsonic Media Server

ExecStart=/usr/bin/java \
          $JAVA_OPTS \
          -Dairsonic.home=${AIRSONIC_HOME} \
          -Dserver.context-path=${CONTEXT_PATH} \
          -Dserver.port=${PORT} \
          -jar ${JAVA_JAR} $JAVA_ARGS


Save the file and exit. After saving the file, run the commands below to reload the system.

sudo systemctl daemon-reload

After that, run the commands below to create the aircon default config file.

sudo nano /etc/default/airsonic

Then paste the content below:

# Set the location of the standalone war to use

# Set any java opts separated by spaces

# Set a different location for the airsonic home.
# If this path is /opt/libresonic or even contains "libresonic",
# the data from a previous libresonic can be used as is (i.e. without
# renaming,db/libresonic*, etc

# Change the port to listen on

# Change the path that is listened to on

# Add any java args. These are different than JAVA_OPTS in that
# they are passed directly to the program. The default is empty:

# Note that there are several settings for spring boot, not explicitly listed
# here, but can be used in either JAVA_OPTS or JAVA_ARGS. The full list
# can be found here:
# For example to set debug across the board:

# Or to change the IP address that is listened to:

Save and exit.

Start Airsonic service.

sudo systemctl start airsonic
sudo systemctl enable airsonic

Open your browser and browse to the server name or IP address followed by port 8080


You should see the Airsonic login page.

Airsonic ubuntu install

username: admin
password: admin


Airsonic ubuntu install

You may also like the post below:

Posted by

I love computers; maybe way too much. What I learned I try to share at


  1. EnvironmentFile=-/etc/sysconfig/airsonic
    ExecStart=/usr/bin/java \

    folder sysconfig don’t exist i ubuntu

  2. Hey, It’s possible change the name (airsonic) http://IP:8080/airsonic/login for every else that I won’t ?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: