and open the address "localhost:8080" in your browser (e.g. with [[Firefox]]):

and open the address "localhost:8080" in your browser (e.g. with [[Firefox]]):

Line 55:

Line 59:

$ firefox localhost:8080

$ firefox localhost:8080

−

This will let you configure the most important options from within the browser.

+

This will let you configure the most important options from within the browser and you can set up the admin account.

+

+

If you want CherryMusic to run as a system service and to automatically start on boot, see [[#Systemd service file|systemd service file]].

=== Manual setup ===

=== Manual setup ===

Line 63:

Line 69:

$ cherrymusic

$ cherrymusic

−

On first startup CherryMusic will create it's data and configuration files in {{ic|~./.local/share/cherrymusic/}} and {{ic|~/.config/cherrymusic/}}, print a note to stout and exit.

+

On first startup CherryMusic will create its data and configuration files in {{ic|~/.local/share/cherrymusic/}} and {{ic|~/.config/cherrymusic/}}, print a note to ''stdout'' and exit.

−

Now, edit the configuration file in {{ic|~/.config/cherrymusic/cherrymusic.conf}}and change the following line to match your setup:

+

Now, edit the configuration file in {{ic|~/.config/cherrymusic/cherrymusic.conf}}and change the following lines to match your setup:

{{hc|~/.config/cherrymusic/cherrymusic.conf|

{{hc|~/.config/cherrymusic/cherrymusic.conf|

Line 74:

Line 80:

}}

}}

−

Open the address "localhost:8080" in your browser (e.g. with [[Firefox]]) to create an account:

+

Open the address "localhost:8080" in your browser (e.g. with [[Firefox]]) to create an admin account:

$ firefox localhost:8080

$ firefox localhost:8080

−

There are much more options to configure, please see [[#Fine tuning|this section]].

+

After logging in, populate the search database by clicking ''Update Music Library'' in the ''Admin'' panel.

+

+

If you want CherryMusic to run as a system service and to automatically start on boot, see [[#Systemd service file|systemd service file]].

+

+

There are many more options to configure, please see [[#Fine tuning|this section]].

=== Fine tuning ===

=== Fine tuning ===

Line 91:

Line 101:

== Tips & Tricks ==

== Tips & Tricks ==

+

+

=== Symlinks in "basedir" ===

+

+

{{note|This is only useful if your music is in different locations, e.g. on an internal hard drive '''and''' an external hard dirve.}}

+

+

Probably, the most modular and flexible way of populating CherryMusic's music directory (called "basedir") is to create a dedicated directory and only symlink all paths to your music collections into that directory, e.g.:

CherryMusic does not come with a daemon yet, but [[#Installation|both CherryMusic AUR packages]] provide a systemd service file.

+

If you want CherryMusic to run as a system service and to automatically start on boot, simply do:

+

+

{{Note|Replace "USER" with the user that should run CherryMusic (do not use root!).}}

+

+

$ sudo systemctl start cherrymusic@USER.service

+

$ sudo systemctl enable cherrymusic@USER.service

+

+

Note that although the CherryMusic service is now run as the user "USER", the service calls still have to be given as root.

=== Running in a GNU Screen session ===

=== Running in a GNU Screen session ===

Line 98:

Line 130:

$ screen -d -m -S cherrymusic cherrymusic

$ screen -d -m -S cherrymusic cherrymusic

−

Since CherryMusic only writes the output to the GNU Screen session, there is nothing to control from within the session. It may be more convenient to use a [[#systemd service file|systemd service file]].

+

Since CherryMusic only writes the output to the GNU Screen session, there is nothing to control from within the session. It may be more convenient to use a [[#Systemd service file|systemd service file]]. However, this may still be useful for debugging.

−

−

=== Systemd service file ===

−

−

CherryMusic does not come with a daemon yet. To run it as a system service, the following [[systemd]] service file can be used:

−

{{Note|The line "User &#61; cherrymusic" must be changed to the username that should run CherryMusic.}}

+

To run it in a GNU Screen session after boot, the following [[systemd]] service file can also be used:

Note that although the CherryMusic service is now run as the user specified in the systemd service file, the service calls still have to be given as root.

+

To finally enable and start the service, see [[#Systemd service file|systemd service file]].

== Troubleshooting ==

== Troubleshooting ==

Line 142:

Line 168:

An active flash blocker can interfere with the web frontend. If you have trouble with things like track selection or playback, try whitelisting the server in your browser's flash blocker/plugin manager.

An active flash blocker can interfere with the web frontend. If you have trouble with things like track selection or playback, try whitelisting the server in your browser's flash blocker/plugin manager.

+

+

== See also ==

+

+

https://github.com/devsnd/cherrymusic/wiki/Setup-guide

Revision as of 21:16, 2 November 2013

CherryMusic is a music streaming server based on CherryPy and jPlayer. It can be run remotely or on a single computer and is designed to handle huge music libraries (3 TB and more) but also works well with small collections. In contrast to MPD, Icecast and the like, CherryMusic allows multiple users to (individually) login via HTTP/HTTPS using a web browser, browse/search the music database and create/edit playlists and stream music to the browser. From the website:

"CherryMusic is a standalone music server written in python based on CherryPy and jPlayer. It is intended to be an alternative to Last.fm, Spotify, Grooveshark... you name it."

Installation

CherryMusic is available in the AUR. There are two packages, the stable release and the development version. If you do not depend on a completely stable version, the development version is recommended, but needs Git for installation.

Configuration

Quick start

and open the address "localhost:8080" in your browser (e.g. with Firefox):

$ firefox localhost:8080

This will let you configure the most important options from within the browser and you can set up the admin account.

If you want CherryMusic to run as a system service and to automatically start on boot, see systemd service file.

Manual setup

Start CherryMusic for the initial setup:

$ cherrymusic

On first startup CherryMusic will create its data and configuration files in ~/.local/share/cherrymusic/ and ~/.config/cherrymusic/, print a note to stdout and exit.
Now, edit the configuration file in ~/.config/cherrymusic/cherrymusic.confand change the following lines to match your setup:

~/.config/cherrymusic/cherrymusic.conf

[...]
basedir = /path/to/your/music
[...]
port = 8080
[...]

Open the address "localhost:8080" in your browser (e.g. with Firefox) to create an admin account:

$ firefox localhost:8080

After logging in, populate the search database by clicking Update Music Library in the Admin panel.

If you want CherryMusic to run as a system service and to automatically start on boot, see systemd service file.

Fine tuning

Tips & Tricks

Symlinks in "basedir"

Note: This is only useful if your music is in different locations, e.g. on an internal hard drive and an external hard dirve.

Probably, the most modular and flexible way of populating CherryMusic's music directory (called "basedir") is to create a dedicated directory and only symlink all paths to your music collections into that directory, e.g.:

Systemd service file

CherryMusic does not come with a daemon yet, but both CherryMusic AUR packages provide a systemd service file.
If you want CherryMusic to run as a system service and to automatically start on boot, simply do:

Note: Replace "USER" with the user that should run CherryMusic (do not use root!).

Note that although the CherryMusic service is now run as the user "USER", the service calls still have to be given as root.

Running in a GNU Screen session

To keep CherryMusic running after logout, it can be run in a GNU Screen session.

$ screen -d -m -S cherrymusic cherrymusic

Since CherryMusic only writes the output to the GNU Screen session, there is nothing to control from within the session. It may be more convenient to use a systemd service file. However, this may still be useful for debugging.

To run it in a GNU Screen session after boot, the following systemd service file can also be used:

Troubleshooting

Deactivate flash blocker

An active flash blocker can interfere with the web frontend. If you have trouble with things like track selection or playback, try whitelisting the server in your browser's flash blocker/plugin manager.