{"id":28255112,"url":"https://github.com/daxanius/harmony-server","last_synced_at":"2025-06-16T06:31:25.065Z","repository":{"id":250773631,"uuid":"834908773","full_name":"Daxanius/harmony-server","owner":"Daxanius","description":"A server implementation for Harmony, the ComputerCraft audio streaming service","archived":false,"fork":false,"pushed_at":"2024-08-01T14:10:10.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T20:19:37.341Z","etag":null,"topics":["backend","computercraft-tweaked","minecraft","music","rust","streaming"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Daxanius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-07-28T17:41:58.000Z","updated_at":"2025-03-30T20:25:29.000Z","dependencies_parsed_at":"2024-07-30T02:53:07.755Z","dependency_job_id":null,"html_url":"https://github.com/Daxanius/harmony-server","commit_stats":null,"previous_names":["daxanius/harmony-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Daxanius/harmony-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daxanius%2Fharmony-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daxanius%2Fharmony-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daxanius%2Fharmony-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daxanius%2Fharmony-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daxanius","download_url":"https://codeload.github.com/Daxanius/harmony-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daxanius%2Fharmony-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260114284,"owners_count":22960869,"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","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":["backend","computercraft-tweaked","minecraft","music","rust","streaming"],"created_at":"2025-05-19T20:17:07.523Z","updated_at":"2025-06-16T06:31:25.022Z","avatar_url":"https://github.com/Daxanius.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harmony Server\nA server implementation for Harmony, the ComputerCraft audio streaming service.\n\n## Installation\nThe following installation guide is written with arch linux in mind, please look up how to install these programs for your own distro.\n\n### Install Tools\nGit\n```sh\n$ sudo pacman -S git\n```\n\nThe Rust toolchain\n```sh\n$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nSetup the toolchain\n```sh\n$ rustup default stable\n```\n\nPostgreSQL\n```sh\n$ sudo pacman -S postgresql\n```\n\nDiesel\n```sh\n$ cargo install diesel_cli --no-default-features --features postgres\n```\n\nFFmpeg\n```sh\n$ sudo pacman -S ffmpeg\n```\n\nyt-dlp\n```sh\n$ sudo pacman -S yt-dlp\n```\n\n### Setup database\nSwitch to the postgresql user that the database provided\n```sh\n$ sudo su postgres \n```\n\nInitialize the database\n```sh\n$ initdb -D /var/lib/postgres/data\n```\n\nStart postgresql\n```sh\n$ sudo systemctl enable --now postgresql.service\n```\n\nCreate a PostgreSQL user (remember the credentials)\n```sh\n$ createuser --interactive\n```\n\nCreate a database for harmony which the new user can access\n```sh\n$ createdb harmony -O database-username\n```\n\nSwitch back to your user\n```sh\n$ su your_user \n```\n\n### Setup repo\n#### Clone Repo\nClone this repo using git\n```sh\n$ git clone [repo_url]\n```\n\n#### Create database schema\nChange into the harmony-data directory\n```sh\n$ cd ./harmony-server/harmony-data\n```\n\nSetup the database with the diesel cli\n```sh\n$ sudo ~/.cargo/bin/diesel migration run --database-url postgres://[user_you_created]:[user_password]@localhost/harmony\n```\n\n#### Setup Variables\nGo to the root project folder\n```sh\n$ cd ..\n```\n\nCreate and edit the .env file\n```sh\n$ nano .env\n```\n\nThe .env file should contain the following:\n```sh\n# Database\nDATABASE_URL=postgres://[user_you_created]:[user_password]@localhost/harmony # Never share this with anyone!\n\n# Audio files\nMAX_DOWNLOAD_FILESIZE=10M\nDOWNLOAD_DIRECTORY=./temp # Make sure these folders exist on your system\nSONG_DIRECTORY=./audio # Make sure these folders exist on your system\n\n# Audio stream\nSTREAM_LIFETIME=10 # Determines how long a stream lives in seconds after no requests have been made to it\n\n# JWT\nJWT_SECRET=[A secret token generated by https://jwtsecret.com/ # Never share this with anyone!\nJWT_TIME_VALID=[Time in seconds before a login session expires]\n```\n\nReplace [] with the values, then exit nano by pressing `ctrl + x` and then `y`.\n\n### Start the server\nYou are now ready to start the server! Simply run the server with\n```sh\n$ cargo run --release\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxanius%2Fharmony-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaxanius%2Fharmony-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaxanius%2Fharmony-server/lists"}