Airsonic Port 8080

Hi,
I need some advise on how to change the port 8080 to 4040 for Airsonic. I found the dietpi.services app and saw that the line with airsonic port 8080 was not activated. Changing the port to 4040 and removing the # in front resulted in an error ( [FAILED] DietPi-Services | restart : airsonic )
So where can I change this ?

System : Raspi 5 on an 500 Gb NVMe M2 SSD , latest version of Dietpi.

Tks
Henning

The port is specified in the systemd unit file. There is a line

ExecStart=/usr/bin/java -Xmx${memory_limit}m -Dairsonic.home=/mnt/dietpi_userdata/airsonic -Dserver.servlet.context-path=/airsonic -Dserver.port=8080 -jar /mnt/dietpi_userdata/airsonic/airsonic.war

You can modify this file directly or edit via dietpi-services, but then you need to add an empty line for ExecStart= before your changes like:

ExecStart=
ExecStart=/usr/bin/java -Xmx${memory_limit}m -Dairsonic.home=/mnt/dietpi_userdata/airsonic -Dserver.servlet.context-path=/airsonic -Dserver.port=4040 -jar /mnt/dietpi_userdata/airsonic/airsonic.war
1 Like

Tks, I changed via dietpi-services acc. But it remains on port 8080
I attach a scrennshoot which might explain the situation a bit.

In Cgroup ( what ever that is … ) it still says 8080

Tks

Hi
whilst checking around I found this file : /etc/systemd/system/airsonic.service which was still showing 8080. dietpi-services did not change that one. I edited it manually to 4040 and it works now as expected.
Tks

There is a typo in your edited unit file, the screenshot gives some info, probably you missed the = or something.
If you like you can share cat /etc/systemd/system/airsonic.service.d/dietpi-services_edit.conf to see what was wrong.

But good it’s working now by editing the unit file itself.

Hi,
the result after I used dietpi-services

root@Lisa:~# cat /etc/systemd/system/airsonic.service.d/dietpi-services_edit.conf
[Unit]
#Description=Airsonic-Advanced (DietPi)
#Wants=network-online.target
#After=network-online.target remote-fs.target

[Service]
#SyslogIdentifier=Airsonic
#User=airsonic
#WorkingDirectory=/mnt/dietpi_userdata/airsonic
#ExecStart=/usr/bin/java -Xmx768m -Dairsonic.home=/mnt/dietpi_userdata/airsonic -Dserver.servlet.context-path=/airsonic -Dserver.port=4040 -jar /mnt/dietpi_userdata/airsonic/airsonic.war

[Install]
#WantedBy=multi-user.target
ExecStart=
ExecStart=/usr/bin/java -Xmx768m -Dairsonic.home=/mnt/dietpi_userdata/airsonic -Dserver.servlet.context-path=/airsonic -Dserver.port=4040 -jar /mnt/dietpi_userdata/airsonic/airsonic.war

Anyhow now it’s working as planned :slight_smile:

Just to troubleshoot the error:
you copied it into the [Install] block, but you would need to comment out the line in the [Service] block, change the port number there and add the empty ExecStart= before. :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.