Difference between revisions of "CherryMusic"

From ArchWiki
Jump to: navigation, search
(created the page CherryMusic)
 
m (deactivate flash blocker)
(4 intermediate revisions by the same user not shown)
Line 57: Line 57:
 
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.
  
=== manual setup ===
+
=== Manual setup ===
  
 
Start CherryMusic for the initial setup:
 
Start CherryMusic for the initial setup:
Line 92: Line 92:
 
== Tips & Tricks ==
 
== Tips & Tricks ==
  
=== running in a GNU Screen session ===
+
=== Running in a GNU Screen session ===
  
 
To keep CherryMusic running after logout, it can be run in a [[GNU Screen]] session.
 
To keep CherryMusic running after logout, it can be run in a [[GNU Screen]] session.
Line 100: Line 100:
 
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]].
  
=== systemd service file ===
+
=== 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:
 
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=cherrymusic' must be changed to the username that should run CherryMusic.}
+
{{Note|The line "User = cherrymusic" must be changed to the username that should run CherryMusic.}}
  
 
{{hc|/etc/systemd/system/multi-user.target.wants/cherrymusic.service|
 
{{hc|/etc/systemd/system/multi-user.target.wants/cherrymusic.service|
Line 139: Line 139:
 
== Troubleshooting ==
 
== Troubleshooting ==
  
=== deactivate flash blocker ===
+
=== 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.
 
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.

Revision as of 22:46, 2 April 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary text Template:Article summary text Template:Article summary end

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."

The project is developed on GitHub.

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.

Stable version

The latest stable version of cherrymusicAUR is available in the AUR.

Git version

For a more up-to-date version with experimental features the CherryMusic development version, cherrymusic-devel-gitAUR, can be chosen. In order to build this version, you need Git.

Dependencies

Required

 * python
 * python-cherrypy

Optional

 * python3-stagger-svnAUR (For ID3-Tag reading)
 * lame (For live transcoding)
 * vorbis-tools (For live transcoding)
 * flac (For Live transcoding)
 * faad2
 * mpg123
 * ffmpeg
 * imagemagick (For autimatic image resizing on displayed cover art)

Configuration

Quick start

To just get it up and running with a basic setup, issue:

 $ python cherrymusic --setup --port 8080

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.

Manual setup

Start CherryMusic for the initial setup:

 $ cherrymusic

On first startup CherryMusic will create it's data and configuration files in ~./.local/share/cherrymusic/ and ~/.config/cherrymusic/, print a note to stout and exit. Now, edit the configuration file in ~/.config/cherrymusic/cherrymusic.confand change the following line 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 account:

 $ firefox localhost:8080

There are much more options to configure, please see this section.

Fine tuning

CherryMusic comes with well-documented manpages. see

 $ man cherrymusic

or

 $ man cherrymusic.conf

Tips & Tricks

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.

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 = cherrymusic" must be changed to the username that should run CherryMusic.
/etc/systemd/system/multi-user.target.wants/cherrymusic.service
[Unit]
Description = CherryMusic server
After = network.target

[Service]
User = cherrymusic
ExecStart = /usr/bin/cherrymusic
PrivateTmp = true
StandardOutput = null

[Install]
WantedBy = multi-user.target

This file has to be placed into /etc/systemd/system/multi-user.target.wants/:

 $ sudo cp cherrymusic.service /etc/systemd/system/multi-user.target.wants/cherrymusic.service

and the permissions should be changed:

 $ sudo chmod 644 /etc/systemd/system/multi-user.target.wants/cherrymusic.service

finally, enable and start the service:

 $ sudo systemctl --system daemon-reload
 $ sudo systemctl enable cherrymusic.service
 $ sudo systemctl start cherrymusic.service

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.

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.