Skip to content
LeafPlayer is a fast and modern personal music streaming server, easily installable by using Docker.
PHP Vue JavaScript CSS Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


LeafPlayer is a simple and fast, privately hosted music streaming server. It enables you to access your private music collection from anywhere where there's internet access.


There is a demo available at

  • Username: demo1 / demo2
  • Password: demodemo123

Try dragging albums, artists and songs onto the player and the playlists in the sidebar.

The ability to change password and download songs are removed from the demo.


There are currently two methods to install LeafPlayer.

Using Docker

If you haven't heard about Docker, check it out here. It's amazing! Prerequisites for using this method are to have Docker and docker-compose installed.

After that everything is fairly simple. Just grab the docker-compose.yml and .env file from the dist directory and copy them to a location of your choice on your server.

Open the .env file and edit the following values

  • APP_KEY: Replace with a random 32 character string.
  • JWT_KEY: Same as above.
  • APP_TIMEZONE: Change to your desired timezone. See for a full list.
  • DB_PASSWORD: Change to something else if desired.
  • HTTP_PORT: The http port, that LeafPlayer should run on.
  • HTTPS_PORT: The https port, that LeafPlayer should run on.
  • CERT_CHAIN: Absolute path to your SSL certificate file
  • CERT_KEY: Absolute path to your SSL key file
  • MUSIC_DIR: Absolute path to your music files

After that just run docker-compose up -d.

Not Using Docker (The old school method)

You'll need to own a server or computer, capable of running the Lumen PHP framework and a supported database, for example MySQL. Those requirements are the following:

  • Webserver
  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Composer

Simply grab the latest release and copy the contents into your desired folder.

You'll also need a database dedicated to your LeafPlayer installation.

 $ composer install

 $ php artisan lp:setup

After the installer has finished successfully, you should be able to log in with the admin account you just created.

  • Note, that LeafPlayer is currently best suited to live at the root of a domain, so or but not in a subdirectory like If you need to deploy it to a subdirectory however, scroll down to the Advanced section.
  • The installer is currently being tested, so please let me know if any problems arise from using it.


Adding Media

For LeafPlayer to be useful, it obviously needs some music. In the administration panel you can add folders, which will then be scanned for mp3 files when starting a scan. In the future other file formats will be supported as well.
It's also possible to manage your collection from the console by using the scanner commands.

(All commands must be prefixed with php artisan )

  • lp:library:folder:add {path} Adds a folder to scan for files.
  • lp:library:folder:remove {id} Removes a folder by its ID.
  • lp:library:folder:list Lists all folders that are used for scanning.
  • lp:library:scan {--no-output} Starts a scan for media in the earlier specified folders.
  • lp:library:clean {--no-output} Cleans the database from missing files.
  • lp:library:wipe {--confirm} {--no-output} Deletes all media information from the database. Use with care.

Adding Users

Users can be added in the "Users" tab of the administration panel. Currently it's only possible to add users with default permissions.


Using Docker

Just pull the newest image and restart the containers.

 $ docker-compose pull
 $ docker-compose up -d

Not using Docker

There is no command to upgrade to a newer release. Currently it's a matter of replacing all files except of the .env file and the public/artwork folder.

A Short History

In late 2016 I was searching for a music streaming server to fit my needs, but none of the available alternatives could really satisfy me, which is why I decided to create my own.

How hard can it be?

As it turned out, it was - and still is - a lot of work for a single person, which is why I'm searching for active contributors for the project to create something amazing.


Please see the file for more info.


Deploying into subdirectory

There's two things that you need to do.

  • Rebuild the frontend with the following command (See for more details on how to build the project)

    $ node build/build.js --base=/YOUR_BASE_URL/
  • Edit the .htaccess file in the public directory and add your subdirectory to the RewriteBase argument.

    RewriteBase /YOUR_BASE_URL/
You can’t perform that action at this time.