Squeezelite: change the machine name

I have two machines with squeezelite on it but both are identified as “DietPi-Squeezelite”.
How can I change this, so that I can identify which player is which?

Can be changed in the systemD service file:

nano /etc/systemd/system/squeezelite.service

#refresh service
systemctl daemon-reload

#Restart services
dietpi-services restart

example of name change “MightyMoocow”:

ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'MightyMoocow' -f /var/log/squeezelite.log

Great, thanks!!
That’s why I couldn’t find it: I was looking for a configuration file that does not exist :mrgreen:


I decided to replace the old Sysinit service (and somewhat messy: http://www.gerrelt.nl/RaspberryPi/squeezelitehf.sh) with a simple SystemD one, and, apply config via command line.

That was a good idea. :slight_smile:


Sorry for the thread necro.

This is what I get:

dietpi@Pi3-Server:~$ sudo service squeezelite stop
dietpi@Pi3-Server:~$ sudo service squeezelite start
dietpi@Pi3-Server:~$ sudo nano /etc/systemd/system/squeezelite.service
dietpi@Pi3-Server:~$ sudo service squeezelite stop
dietpi@Pi3-Server:~$ ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n ‘Pi3-Server’ -f /var/log/squeezelite.log
-bash: -a: command not found
dietpi@Pi3-Server:~$ ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n ‘Pi3-Server’ -f /var/log/squeezelite.log

I tried changing it in LMS, but every time I restart the services they go back to the default DietPi-Squeezelite. Since I plan on migrating all my SBCs to Dietpi over the next year or so, I can’t have the same name, that won’t do at all.

The most irritating thing is that I do have another installation of DietPi on a ZeroW, for which a custom name is properly registered, and I have no idea how I did it.

Thanks for any help or hints on what I can do. I created the file as specified and ran the command but there must have been some updates that I missed out on. My knowledge of Linux is limited to Google.

Edit: I tried to start Squeezelite and I get this:

dietpi@Pi3-Server:~$ sudo service squeezelite start Failed to start squeezelite.service: Unit squeezelite.service has a bad unit file setting.
See system logs and ‘systemctl status squeezelite.service’ for details.
dietpi@Pi3-Server:~$ sudo service squeezelite start


I guess there is a misunderstanding on how to change the service configuration.

ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n 'Pi3-Server' -f /var/log/squeezelite.log

This is nothing to be executed on command line. This is the entry for the service file and would need to be change within the service configuration.

Pls have a look to our documentation. There is way a described on how to perform the change https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/39

There’s no misunderstanding :slight_smile: I’m just plain incompetent.

Thanks for the tip, I’ll have a look.

Edit: It’s done, thanks. I never even knew that existed. You can tell I’m a Windows user given I don’t RTFM. My bad, sorry!

no problem, thats why we are here to help

Hi Fourdee/Joulinar

I used your code to modified squeezelite name on Dietpi v6.29 succesed :sunglasses: on odroid C2 ,but now failure on v6.32 :rofl:
eg: ExecStart=/usr/bin/squeezelite -a 180 -C 5 -n ‘Pi3-Server’
When I reboot the machine, squeezelite still
Show “Dietpi-SqueezeLite” this problem has spoil my two weeks. :rofl:
please give me a instructions, thanks

pls can you post following

ps -ef|grep squeeze
systemctl cat squeezelite.service

Thanks you reply :slight_smile: :slight_smile: ,maybe I knew where is the problem. :rofl:
I successfully renamed squeezelite, used new path.

nano /etc/systemd/system/squeezelite.service

Should be:
nano /lib/systemd/system/squeezelite.service

#refresh service
systemctl daemon-reload

#Restart services
dietpi-services restart


well you could have used dietpi-services to manage/change Squeezelite service configuration as described on our user documents https://dietpi.com/forum/t/dietpi-software-details-for-all-installation-options/22/39

As far as I can see on your screen print, you already use a dietpi-service drop-in configuration file for Squeezelite. So quite easy to manage :wink:

Hi Joulinar,

I know what you mean, and thanks for you kindness.

I have used dietpi-services modify squeezelite, but failed, because when I entry dietpi-sevices to edit name, windows drag me into a uncorrespond path, see my attached. So i has been unsuccessful .

I am not sure if its a bug, because I used other Linux image update to dietpi, rather than download dietpi provide official image for odroid.
Thanks for you great job, dietpi help me a lot.

this all is fully correct as it is

Basically you will have 2 config files if you use dietpi-service to add/change anything.

  1. /lib/systemd/system/squeezelite.service
  • this is the original config file and should not be touched
  1. /etc/systemd/system/squeezelite.service.d/dietpi-services_edit.conf
  • using dietpi-service will create a drop-in config file
  • it will overwrite content from the original config file during service start
  • all changes should be done on this drop-in config file
  • this way, you can protect custom entries if the original config file will be overwritten (software re-installation or update)
  • on the drop-in config file you would need to modify the ExecStart as follow, add an empty ExecStart= and remove # in front of ExecStart as well
ExecStart=/usr/bin/squeezelite -a 4096:1024:16:0 -C 5 -n 'DietPi1234'

Gain knowledge, I reinstalled squeezelite, edited dietpi-services follow you instructions, add new
Execstart=, delete # , successes! Forgive me, :cry: I’m a novice :rofl:

good that we could solve it that way. :slight_smile:

Hi -

First thanks for this great software. I use it on multiple RPs.

Having some trouble though with the drop in. It isn’t working for me for renaming player or anything other arguments with squeezelite.

Any chance something is broken with latest versions of dietpi and squeezelite?

can you share you service configuration

systemctl cat squeezelite.service

As well pls describe the exact error message or provide some log files

Hi -

I’m sorry this is dumb on my part. I did not add the extra ExecStart= line at the top go the drop in.

I apologize… thanks again for great software.