{"id":19415914,"url":"https://github.com/ondras/cyp","last_synced_at":"2025-09-03T13:33:26.887Z","repository":{"id":35513289,"uuid":"176586186","full_name":"ondras/cyp","owner":"ondras","description":"Control Your Player: a Web-based MPD client","archived":false,"fork":false,"pushed_at":"2024-05-03T11:27:15.000Z","size":904,"stargazers_count":99,"open_issues_count":6,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-24T12:33:08.009Z","etag":null,"topics":["custom-elements","web-app"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ondras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ondras","custom":["https://www.buymeacoffee.com/ondras","https://www.paypal.com/donate/?hosted_button_id=7WXVKF3ZJ9FZE"]}},"created_at":"2019-03-19T19:39:31.000Z","updated_at":"2025-04-17T01:15:00.000Z","dependencies_parsed_at":"2024-05-03T12:42:07.406Z","dependency_job_id":"3b65f64c-5569-4594-ab36-0cb00e07fdcb","html_url":"https://github.com/ondras/cyp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ondras/cyp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Fcyp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Fcyp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Fcyp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Fcyp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ondras","download_url":"https://codeload.github.com/ondras/cyp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ondras%2Fcyp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273452845,"owners_count":25108468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-elements","web-app"],"created_at":"2024-11-10T12:44:52.988Z","updated_at":"2025-09-03T13:33:26.854Z","avatar_url":"https://github.com/ondras.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ondras","https://www.buymeacoffee.com/ondras","https://www.paypal.com/donate/?hosted_button_id=7WXVKF3ZJ9FZE"],"categories":[],"sub_categories":[],"readme":"# CYP: Control Your Player\n\nCYP is a web-based frontend for [MPD](https://www.musicpd.org/), the Music Player Daemon. You can use it to control the playback without having to install native application(s). It works in modern web browsers, both desktop and mobile.\n\n## Screenshots\n\n![](misc/screen1.png) ![](misc/screen2.png)\n\n\n## Features\n  - Control the playback, queue, volume\n  - Save and load playlists\n  - Browse the library by artists/albums/directories\n  - Display album art via native MPD calls (no need to access the library; requires MPD \u003e= 0.21)\n  - [Youtube-dl](https://ytdl-org.github.io/youtube-dl/index.html) integration\n  - Dark/Light themes\n\n\n## Installation\n\nMake sure you have a working MPD setup first and Node version \u003e= 10\n\n```sh\ngit clone https://github.com/ondras/cyp.git \u0026\u0026 cd cyp\nnpm i\nnode .\n```\n\nPoint your browser to http://localhost:8080 to open the interface. Specifying a custom MPD address can be done:\n  1. using `MPD_HOST` and `MPD_PORT` environment variables, or\n  1. via a `server` querystring argument (`?server=localhost:6655`).\n\n## Instalation - Docker\n\nAlternatively, you can use Docker to run CYP.\n\n```sh\ngit clone https://github.com/ondras/cyp.git \u0026\u0026 cd cyp\ndocker build -t cyp .\ndocker run --network=host cyp\n```\n\n## Installation - Apache ProxyPass\n\nIf you want to run CYP as a service and proxy it through Apache2, you will need to enable several modules.\n\n    # a2enmod proxy\n    # a2enmod proxy_http\n    # a2enmod proxy_wstunnel\n    # a2enmod proxypass\n\n\nTo present CYP in a virutal folder named \"music\" (https://example.com/music/) add the following to your site config.\n\n\n    # MPD daemon\n\tRewriteEngine on\t\t\t\t\t\t# Enable the RewriteEngine\n\tRewriteCond %{REQUEST_FILENAME} !-f\t\t# If the requested file isn't a file\n\tRewriteCond %{REQUEST_FILENAME} !-d\t\t# And if it isn't a directory\n\tRewriteCond %{REQUEST_URI} .*/music$\t# And if they only requested /music instead of /music/\n\tRewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [QSA,L,R=301] # Then append a trailing slash\n\n\tProxyPass /music/ http://localhost:3366/\t# Proxy all request to /music/ to the CYP server (running on the same server as apache)\n\tProxyWebsocketFallbackToProxyHttp Off\t\t# Don't fallback to http for WebSocket requests\n\n\t# Rewrite WebSocket requests to CYP WebSocket requets, (also converts wss to ws)\n\tRewriteEngine on\n\tRewriteCond %{HTTP:Upgrade} websocket [NC]\n\tRewriteCond %{HTTP:Connection} upgrade [NC]\n\tRewriteRule ^/music/?(.*) \"ws://localhost:3366/$1\" [P,L]\n\n## Installation - nginx\n\n    location /music/ {\n      proxy_pass_header  Set-Cookie;\n      proxy_set_header   Host               $host;\n      proxy_set_header   X-Real-IP          $remote_addr;\n      proxy_set_header   X-Forwarded-Proto  $scheme;\n      proxy_set_header   X-Forwarded-For    $proxy_add_x_forwarded_for;\n      proxy_http_version 1.1;\n      proxy_set_header Upgrade $http_upgrade;\n      proxy_set_header Connection \"Upgrade\";\n      proxy_set_header Host $host;\n      proxy_pass http://localhost:8080/;\n    }\n\n\n\n## Youtube-dl integration\n\nYou will need a working [youtube-dl](https://ytdl-org.github.io/youtube-dl/index.html) installation. Audio files are downloaded into the `_youtube` directory, so make sure it is available to your MPD library (use a symlink).\n\nIf you use Docker, you need to mount the `_youtube` directory into the image:\n\n```sh\ndocker run --network=host -v \"$(pwd)\"/_youtube:/cyp/_youtube cyp\n```\n\n\n## Changing the port\n\n...is done via the `PORT` environment variable. If you use Docker, the `-e` switch does the trick:\n\n```sh\ndocker run --network=host -e PORT=12345 cyp\n```\n\n## Password-protected MPD\n\nCreate a `passwords.json` file in CYPs home directory. Specify passwords for available MPD servers:\n\n```json\n{\n  \"localhost:6600\": \"my-pass-1\",\n  \"some.other.server.or.ip:12345\": \"my-pass-2\"\n}\n```\n\nMake sure that hostnames and ports match those specified via the `server` querystring argument (defaults to `localhost:6600`).\n\n## Technology\n  - TypeScript\n  - Connected to MPD via WebSockets (using the [ws2mpd](https://github.com/ondras/ws2mpd/) bridge)\n  - Token-based access to the WebSocket endpoint (better than an `Origin` check)\n  - Written using [*Custom Elements*](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)\n  - Responsive layout via Flexbox\n  - CSS Custom Properties\n  - SVG icons (Material Design)\n  - Can spawn Youtube-dl to search/download audio files\n  - Album art retrieved directly from MPD (and cached via localStorage)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondras%2Fcyp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fondras%2Fcyp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fondras%2Fcyp/lists"}