{"id":27991939,"url":"https://github.com/howingyip/music-server","last_synced_at":"2025-05-08T17:55:43.927Z","repository":{"id":287535510,"uuid":"854088971","full_name":"HoWingYip/music-server","owner":"HoWingYip","description":"Simple tool for downloading and syncing music across multiple devices","archived":false,"fork":false,"pushed_at":"2025-04-12T09:51:17.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T17:55:41.552Z","etag":null,"topics":["docker","docker-compose","python","rsync","ssh","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HoWingYip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-09-08T11:39:00.000Z","updated_at":"2025-04-12T09:51:20.000Z","dependencies_parsed_at":"2025-04-12T10:50:21.318Z","dependency_job_id":null,"html_url":"https://github.com/HoWingYip/music-server","commit_stats":null,"previous_names":["howingyip/music-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoWingYip%2Fmusic-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoWingYip%2Fmusic-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoWingYip%2Fmusic-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoWingYip%2Fmusic-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HoWingYip","download_url":"https://codeload.github.com/HoWingYip/music-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253124234,"owners_count":21857611,"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":["docker","docker-compose","python","rsync","ssh","telegram-bot"],"created_at":"2025-05-08T17:55:43.495Z","updated_at":"2025-05-08T17:55:43.918Z","avatar_url":"https://github.com/HoWingYip.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSH music server\n\nThis is a tool for downloading music and syncing it across multiple devices. It consists of an SSH server, SSH tunnel, and Telegram bot. If you have your own internet-facing domain, the tunnel is not required.\n\n\n## Contents\n- [Usage overview](#usage-overview)\n- [Configuration](#configuration)\n  - [SSH server](#ssh-server)\n  - [SSH tunnel](#ssh-tunnel)\n  - [Telegram bot](#telegram-bot)\n- [Using the Telegram bot](#using-the-telegram-bot)\n\n\n## Usage overview\n\n1. Install Docker\n2. Configure settings\n3. On server: `cd music-server \u0026\u0026 docker compose up`\n4. Download songs through Telegram bot\n5. On client: `rsync -avz user@remote:/music/ /your/local/music/dir`\n\n\n## Configuration\n\nTo set the host port on which the SSH server is exposed, set `SSH_PORT` in the file `.env`. Example: `SSH_PORT=2002`. Note that `.env` does not define any environment variables; Docker Compose only reads from it to interpolate variables in `compose.yml`.\n\nConfigure other settings by setting environment variables in the following files:\n- `server/.env.server` for SSH server\n- `tunnel/.env.tunnel` for SSH tunnel\n- `telegram_bot/.env.bot` for Telegram bot\n\n### SSH server\n\nWe inherit from the [`linuxserver/openssh-server`](https://hub.docker.com/r/linuxserver/openssh-server) Docker image. Environment variables go in `server/.env.server`. Available settings are listed [here](https://github.com/linuxserver/docker-openssh-server?tab=readme-ov-file#parameters). Below is an example config:\n\n```bash\n# User ID and group ID of SSH user\nPUID=1000\nPGID=1000\n\n# Server timezone\nTZ=Etc/UTC+8\n\n# Folder containing SSH public keys to accept\nPUBLIC_KEY_DIR=/config/pub_keys\n\n# Enable/disable password access\nPASSWORD_ACCESS=false\n\n# Username of SSH user\nUSER_NAME=user\n\n# Whether SSH user should be sudo\nSUDO_ACCESS=false\n\n# Log to stdout instead of file\nLOG_STDOUT=true\n```\n\n### SSH tunnel\n\nThe author tunnels SSH traffic over an ngrok TCP tunnel because she's poor. Should you choose to do the same, you'll need an ngrok account with a valid payment method added. (At the time of writing, ngrok TCP tunnels are free-of-charge, but require a payment method for abuse prevention.)\n\nSetup is simple. In `tunnel/.env.tunnel`, set `NGROK_AUTHTOKEN=your_ngrok_authtoken`.\n\nIf you're hosting your music on an internet-facing server, the SSH tunnel is not necessary. To disable it, comment out the following sections in `compose.yml`:\n- `services.ssh-tunnel`\n- `services.telegram-bot.depends_on.ssh-tunnel`\n\n### Telegram bot\n\nIn `telegram_bot/.env.bot`, set:\n\n```bash\nBOT_TOKEN=your_bot_token # Telegram bot token\nALLOWED_USER_IDS=1,2,3 # comma-separated list of Telegram user IDs to allow\n```\n\nYou can find your user ID by texting [@userinfobot](https://t.me/userinfobot) on Telegram. (The author is not affiliated with this third-party service.)\n\n\n## Using the Telegram bot\n\nThe Telegram bot accepts the following commands:\n\n| Command | Action\n|-|-\n| `/add_playlist` | Add online playlist contents to local playlist\n| `/add_songs` | Add individual songs to local playlist\n| `/delete_playlist` | Delete local playlist\n| `/delete_songs` | Delete individual songs from local playlist\n| `/list_playlists` | List local playlists\n| `/list_songs` | List songs in local playlist\n| `/rename_playlist` | Rename local playlist\n| `/server` | View SSH server address and port\n| `/help` | Show manual\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowingyip%2Fmusic-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowingyip%2Fmusic-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowingyip%2Fmusic-server/lists"}