Choose language

Portal Home > Knowledgebase > How-to > Hosting > Other software > CherryMusic installation

CherryMusic installation

The article describes how to install CherryMusic.
Please log in to your SSH:


1. Download cherrymusic:
cd && git clone -b master

2. Go to the cherrymusic directory and generate a configuration file:

cd cherrymusic && python cherrymusic --update

3. Edit the cherrymusic port listen and basedir:

sed -i "s:^port.*:port = $(shuf -i 13501-13700 -n 1):" ~/.config/cherrymusic/cherrymusic.conf

sed -i "s:^basedir.*:basedir = $HOME/downloads:" ~/.config/cherrymusic/cherrymusic.conf

4. Start cherrymusic in the screen:

screen -dm -S cherrymusic python ~/cherrymusic/cherrymusic

To verify if it started:
ps x | grep cherrymusic | grep -v "grep\|bash" > /dev/null && echo "CherryMusic started" || echo "CherryMusic not started"

5. Setup a cronjob to restart it if it doesn't run every 5 minutes:
(crontab -l -u $(whoami);echo -e "*/5\t*\t*\t*\t*\tps x | grep cherrymusic | grep -v grep\|bash > /dev/null || screen -dm -S cherrymusic python ~/cherrymusic/cherrymusic && screen -wipe") | crontab -u $(whoami) - 

6. Check your cherrymusic URL:
echo -e "CherryMusic URL: http://$(hostname):$(grep ^port ~/.config/cherrymusic/cherrymusic.conf | awk -F "= " '{print $2}')"

Restarting manually

1. kill the CherryMusic process:
kill -9 $(pgrep -f cherrymusic)

2. Start a new process in the screen:
screen -dm -S cherrymusic python ~/cherrymusic/cherrymusic

3. Wipe the screen:
screen -wipe


1. Remove the cronjob:
crontab -l | sed -e "/cherrymusic/d" | crontab -u $(whoami) -

2. Kill cherrymusic processes:

kill -9 $(pgrep -f cherrymusic)

3. Remove all cherrymusic files:

rm -rf ~/.config/cherrymusic ~/cherrymusic

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Flexget installation (Views: 10223)
Making an MTR (Views: 6877)

Powered by WHMCompleteSolution