[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7777":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},7777,"blackcandy","blackcandy-org\u002Fblackcandy","blackcandy-org","A self hosted music streaming server","",null,"Ruby",4267,214,21,30,0,10,85,5,72.5,"MIT License",false,"master",[25,26,27,28,29,30,31,32,33],"audio","hotwire","music","music-player","music-streaming","musicplayer","rails","ruby","self-hosted","2026-06-12 04:00:35","\u003Cp align='center'>\n  \u003Cimg alt='Black Candy logo' width='200' src='https:\u002F\u002Fraw.githubusercontent.com\u002Fblackcandy-org\u002Fblack_candy\u002Fmaster\u002Fapp\u002Fassets\u002Fimages\u002Flogo.svg'>\n\u003C\u002Fp>\n\n# Black Candy\n[![CI](https:\u002F\u002Fgithub.com\u002Fblackcandy-org\u002Fblack_candy\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fblackcandy-org\u002Fblack_candy\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Coverage Status](https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Fblackcandy-org\u002Fblackcandy\u002Fbadge.svg?branch=master)](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fblackcandy-org\u002Fblack_candy?branch=master)\n![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fblackcandy\u002Fblackcandy)\n\n![Screenshot](https:\u002F\u002Fraw.githubusercontent.com\u002Fblackcandy-org\u002Fblackcandy\u002Fmaster\u002Fdocs\u002Fimages\u002Fscreenshot_main.png)\n\nBlack Candy is a self-hosted music streaming server, your personal music center.\n\n## Try The Demo\n\nPlease visit \u003Chttps:\u002F\u002Fdemo.blackcandy.org> and use demo user (email: admin@admin.com, password: foobar) to log in. And feel free to try it.\n\n> [!NOTE]\n> This demo user does not have administrator privileges. So you cannot experience all the features in Black Candy. And all music in the demo are from [Free Music Archive](https:\u002F\u002Ffreemusicarchive.org\u002F). You can check their [licenses](https:\u002F\u002Fgithub.com\u002Fblackcandy-org\u002Fblackcandy\u002Fblob\u002Fmaster\u002Fdocs\u002Fdemo_music_licenses.md).\n\n## Installation\n\nBlack Candy uses docker image to install easily. You can run Black Candy like this.\n\n```shell\ndocker run -p 80:80 ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest \n\n# Or pull from Docker Hub.\ndocker run -p 80:80 blackcandy\u002Fblackcandy:latest \n```\n\nThat's all. Now, you can access either http:\u002F\u002Flocalhost or http:\u002F\u002Fhost-ip in a browser, and use initial admin user to log in (email: admin@admin.com, password: foobar).\n\n## Upgrade\n\n> [!IMPORTANT]\n> If you upgrade to a new version, you need to read the upgrade guide carefully before upgrade. Because there are may some breaking changes in a new version.\n>\n> Please Check the [Upgrade Guide](https:\u002F\u002Fgithub.com\u002Fblackcandy-org\u002Fblackcandy\u002Fblob\u002Fmaster\u002Fdocs\u002Fupgrade.md) for upgrading to a new version \n\nUpgrade Black Candy is pull new image from remote. Then remove an old container and create a new one.\n\n```shell\ndocker pull ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest\ndocker stop \u003Cyour_blackcandy_container>\ndocker rm \u003Cyour_blackcandy_container>\ndocker run \u003COPTIONS> ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest \n```\n\nWith docker compose, you can upgrade Black Candy like this:\n\n```shell\ndocker pull ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest\ndocker-compose down\ndocker-compose up\n```\n\n## Mobile Apps\n\nBlack Candy mobile apps are available in the following app stores:\n\n[\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fblackcandy-org\u002Fios\u002Fmaster\u002Fimages\u002Fappstore_badge.png\" alt=\"Get it on App Store\" height=\"50\">](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fblackcandy\u002Fid6444304071)\n[\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fblackcandy-org\u002Fandroid\u002Fmaster\u002Fimages\u002Ffdroid_badge.png\" alt=\"Get it on F-Droid\" height=\"50\">](https:\u002F\u002Ff-droid.org\u002Fpackages\u002Forg.blackcandy.android\u002F)\n\n\nFor Android app, you can also download APK from [GitHub Release](https:\u002F\u002Fgithub.com\u002Fblackcandy-org\u002Fandroid\u002Freleases\u002Flatest)\n\n## Configuration\n\n### Port Mapping\n\nBlack Candy exports the 80 port. If you want to be able to access it from the host, you can use the `-p` option to map the port.\n\n```shell\ndocker run -p 3000:80 ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest\n```\n\n### Media Files Mounts\n\nYou can mount media files from host to container and use `MEDIA_PATH` environment variable to set the media path for black candy.\n\n```shell\ndocker run -v \u002Fmedia_data:\u002Fmedia_data -e MEDIA_PATH=\u002Fmedia_data ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest   \n```\n\n### Use PostgreSQL As Database\n\nBlack Candy use SQLite as database by default. Because SQLite can simplify the process of installation, and it's an ideal choice for self-hosted small server. If you think SQLite is not enough, or you are using some cloud service like heroku to host Black Candy, you can also use PostgreSQL as database.\n\n```shell\ndocker run -e DB_ADAPTER=postgresql -e DB_URL=postgresql:\u002F\u002Fyourdatabaseurl ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest \n```\n\n### How to Persist Data\n\nAll the data that need to persist in Black Candy are stored in `\u002Fapp\u002Fstorage`, So you can mount this directory to host to persist data.\n\n```shell\nmkdir storage_data\n\ndocker run -v .\u002Fstorage_data:\u002Fapp\u002Fstorage ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest \n```\n\n### Running as an Arbitrary User\n\nWhen mounting volumes, you may encounter permission issues between the host and the Docker container. To resolve this issue, pass the UID and GID with the `--user` to set the same UID and GID as your host user.\n\n```shell\ndocker run --user 2000:2000 -v .\u002Fstorage_data:\u002Fapp\u002Fstorage ghcr.io\u002Fblackcandy-org\u002Fblackcandy:latest \n```\n\n### Logging\n\nBlack Candy logs to `STDOUT` by default. So if you want to control the log, Docker already supports a lot of options to handle the log in the container. See: https:\u002F\u002Fdocs.docker.com\u002Fconfig\u002Fcontainers\u002Flogging\u002Fconfigure\u002F.\n\n## Environment Variables\n\n| Name                         | Default   | Description                                                                                                                                                                                                                                                                               |\n| ---                          | ---       |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| DB_URL                 |           | The URL of PostgreSQL database. You must set this environment variable if you use PostgreSQL as database.                                                                                                                                                                                 |\n| CABLE_DB_URL          |           | The URL of Pub\u002FSub database. You must set this environment variable if you use PostgreSQL as database.                                                                                                                                                                                    |\n| QUEUE_DB_URL                 |           | The URL of background job database. You must set this environment variable if you use PostgreSQL as database.                                                                                                                                                                             |\n| CACHE_DB_URL                 |           | The URL of cache database. You must set this environment variable if you use PostgreSQL as database.                                                                                                                                                                                      |\n| MEDIA_PATH                   |           | You can use this environment variable to set media path for Black Candy, otherwise you can set media path in settings page.                                                                                                                                                               |\n| DB_ADAPTER             | \"sqlite\"  | There are two adapters are supported, \"sqlite\" and \"postgresql\".                                                                                                                                                                                                                          |\n| SECRET_KEY_BASE              |           | When the SECRET_KEY_BASE environment variable is not set, Black candy will generate SECRET_KEY_BASE environment variable every time when service start up. This will cause old sessions invalid, You can set your own SECRET_KEY_BASE environment variable on docker service to avoid it. |\n| FORCE_SSL                    | false     | Force all access to the app over SSL.                                                                                                                                                                                                                                                     |\n| DEMO_MODE                    | false     | Whether to enable demo mode, when demo mode is on, all users cannot access administrator privileges, even user is admin. And also users cannot change their profile.                                                                                                                      |\n\n## Edge Version\n\nThe edge version of Black Candy base on master branch, which means it's not stable, you may encounter data loss or other issues. However, I don't recommend normal user using an edge version. But if you are a developer who wants to test or contribute to Black Candy, you can use the edge version.\n\n```shell\ndocker pull ghcr.io\u002Fblackcandy-org\u002Fblackcandy:edge\n```\n\n## Development\n\n### Requirements\n\n- Ruby 4.0 \n- Node.js 20\n- libvips\n- FFmpeg\n\nMake sure you have installed all those dependencies.\n\n### Install gem dependencies\n\n```shell\nbundle install\n```\n\n### Install JavaScript dependencies\n\n```shell\nnpm install\n```\n\n### Database Configuration\n\n```shell\nrails db:prepare\nrails db:seed\n```\n\n### Start all services\n\nAfter you’ve set up everything, now you can run `.\u002Fbin\u002Fdev` to start all services you need to develop.\nThen visit \u003Chttp:\u002F\u002Flocalhost:3000> use initial admin user to log in (email: admin@admin.com, password: foobar).\n\n### Running tests\n\n```shell\n# Running all test\n$ rails test:all \n\n# Running lint\n$ rails lint:all\n```\n\n## Integrations\n\nBlack Candy support get artist and album image from Discogs API. You can create an API token from Discogs and set Discogs token on Setting page to enable it.\n\n## Sponsorship\n\nThis project is supported by:\n\n\u003Ca href=\"https:\u002F\u002Fwww.jetbrains.com\u002Fcommunity\u002Fopensource\">\u003Cimg src=\"https:\u002F\u002Fresources.jetbrains.com\u002Fstorage\u002Fproducts\u002Fcompany\u002Fbrand\u002Flogos\u002Fjb_square.svg\">\u003C\u002Fa>\n","Black Candy 是一个自托管的音乐流媒体服务器，旨在成为你的个人音乐中心。它使用 Ruby 语言开发，并基于 Rails 框架，通过 Hotwire 技术提供流畅的用户体验。核心功能包括音频文件管理、播放列表创建与分享以及跨平台访问能力。用户可以通过 Web 界面或移动应用（支持 iOS 和 Android）来享受音乐服务。特别适合那些希望在私有环境中存储和播放自己音乐收藏的个人用户，同时也适用于小型团队或家庭内部共享音乐资源的场景。",2,"2026-06-11 03:14:18","top_language"]