Coder Social home page Coder Social logo

paulschwoerer / leafplayer Goto Github PK

View Code? Open in Web Editor NEW
153.0 4.0 34.0 29.52 MB

Leafplayer is a minimalistic music streaming server with a focus on performance and a slick UI. It allows you to listen to your private music collection from anywhere in the world.

License: MIT License

HTML 0.37% Dockerfile 0.20% TypeScript 89.33% SCSS 10.01% JavaScript 0.10%
music streaming leafplayer self-hosted self-hosting

leafplayer's Introduction

Features | Installation | Usage | Screenshots

GitHub Workflow Status GitHub release (latest SemVer) Docker Pulls

Looking for contributors! Hit me up if you're interested.

Leafplayer is a minimalistic music streaming server with a focus on performance and a slick UI. It enables you to listen to your private music collection from anywhere in the world.

01

Features

These are some notable features, in no particular order.

  • Modern, mobile-friendly interface
  • Native media controls
  • Artworks from media tags for artists and albums
  • Multiple user accounts
  • Registration of accounts using invite codes
  • Fast search
  • Night mode

Installation

With Docker

Use the following command to get up and running quickly. Don't forget to replace supersecret with a secure, random string and adjust the /path/to/your/music directory.

docker run -d \
  -e "APP_SECRET=supersecret" \
  -v "/path/to/your/music:/music:ro" \
  -v "leafplayer-storage:/var/lib/leafplayer" \
  -p "127.0.0.1:3000:3000" \
  --name leafplayer \
  paulschwoerer/leafplayer

You should now see the Leafplayer web interface by navigating to localhost:3000 in your browser.

Without Docker (Linux only)

You need to have a working install of NodeJS. Development is done with Node 16, however Node 14 should work as well.

# check your node version
node --version

After that, grab the latest Leafplayer release from the releases page and extract it into a directory of your choice, for example /opt/leafplayer.

# specify the version to use
LP_VERSION="1.0.0"

# specify the Leafplayer directory
LP_DIRECTORY="/opt/leafplayer"

# specify a user to run Leafplayer as
LP_USER="lpuser"

# add the user
adduser "$LP_USER"

# create the Leafplayer directory
sudo mkdir "$LP_DIRECTORY"

# download the specified release
wget -P /tmp "https://github.com/paulschwoerer/leafplayer/releases/download/v$LP_VERSION/leafplayer-v$LP_VERSION.zip"

# unzip release
sudo unzip -q "/tmp/leafplayer-v$LP_VERSION.zip" -d "$LP_DIRECTORY"

# give the Leafplayer user permission to write to the directory
sudo chown -R $LP_USER "$LP_DIRECTORY"

# install dependencies
cd "$LP_DIRECTORY" && npm install

# finally, remove downloaded file
rm "/tmp/leafplayer-v$LP_VERSION.zip"

Leafplayer will use /var/lib/leafplayer as its storage directory. Make sure it exists and that the user account, which will run Leafplayer, owns it.

sudo mkdir /var/lib/leafplayer

chown "$LP_USER" /var/lib/leafplayer

Finally, start the server. Don't forget to replace supersecret with a secure, random string.

cd "$LP_DIRECTORY"

NODE_ENV=production APP_SECRET=supersecret node main.js serve

You should now see the Leafplayer web interface by navigating to localhost:3000 in your browser.

Reverse Proxy

Note, that the setup above will only allow you to access your Leafplayer instance from your local machine. When deploying a live instance, you should setup a reverse proxy to handle TLS. See for example Caddy for a simple-to-use solution.

caddy reverse-proxy --from music.yourdomain.home --to localhost:3000

Usage

If you followed the docker instructions, prefix the following commands as follows.

sudo docker exec leafplayer node main.js ...

To create an initial admin account, run the following command.

node main.js users:add \
  --username admin \
  --password supersecret

You can now add your music directory and start a music scan.

node main.js library:dir --add /music

node main.js library:scan

Screenshots

Desktop 1 Desktop 2 Night Mode Mobile

leafplayer's People

Contributors

dependabot[bot] avatar paulschwoerer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leafplayer's Issues

Issue Directory

Hi, I have installed correctly the server with Docker,
I created correctly a user , but i have an issue when I stat a scan when i start it finish after some seconds, and no music appear on the website, I set as folder the patch "/media_data/ and /home/ubuntu/leafplayer/music/" but nothing appears,
Why?

Hi, how can I open web

Hi,
I just run docker-compose up -d and what is next step I do it ??
How can I open app on website ?
image

Help me pls, thanks so much

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.