miantiao-me/GoSonic
概要
A self-hosted Subsonic / OpenSubsonic server powered by MyGo Music plugins
デザイン・メディアできること
- Use Any Subsonic Client: Connect apps like MuseAmp, Feishin, Symfonium, Amperfy, or Supersonic to all your music sources through one server.
- Aggregate Multiple Music Sources: Install any MyGo Music plugin from GitHub or a local folder. Each plugin appears as its own MusicFolder, so you can browse sources separately or search across all of them together.
- Seamless MuseAmp Experience: Automatically adapts catalog IDs, timestamped LRC lyrics, album-less singles, and +faststart M4A delivery when MuseAmp connects.
- Manage Everything in a Built-in Web Console: Install plugins, review network and process permissions, sign in via QR code or browser Cookie, configure plugin settings, check for updates, and watch live request logs—all without editing config files.
計測したスター増加
- 24時間
- 0
- 7日間
- 履歴を収集中
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルGoSonic
English | 简体中文
Turn MyGo Music plugins into a self-hosted Subsonic / OpenSubsonic server, so you can search, browse, stream, read synced lyrics, and manage playlists or favorites from any Subsonic music player on iOS, macOS, Android, Windows, or Web.
What GoSonic Can Do for You
- Use Any Subsonic Client: Connect apps like MuseAmp, Feishin, Symfonium, Amperfy, or Supersonic to all your music sources through one server.
- Aggregate Multiple Music Sources: Install any MyGo Music plugin from GitHub or a local folder. Each plugin appears as its own
MusicFolder, so you can browse sources separately or search across all of them together. - Seamless MuseAmp Experience: Automatically adapts catalog IDs, timestamped LRC lyrics, album-less singles, and
+faststartM4A delivery when MuseAmp connects. - Manage Everything in a Built-in Web Console: Install plugins, review network and process permissions, sign in via QR code or browser Cookie, configure plugin settings, check for updates, and watch live request logs—all without editing config files.
- Stream Lossless or Transcode On Demand: Proxies audio streams with seeking support and automatically transcodes via FFmpeg whenever your client requests a target format, bitrate, or seek offset.
- Works Behind Proxies: Honors standard
HTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYenvironment variables (HTTP, HTTPS, and SOCKS5) for plugin requests, media streams, cover art, and GitHub downloads.
Quick Start
Option 1: Docker Compose (Recommended)
Pre-built multi-architecture images (linux/amd64, linux/arm64) with FFmpeg included are published to GitHub Container Registry.
- Save docker-compose.yml and change
GOSONIC_USERandGOSONIC_PASSWORD:
services:
gosonic:
image: ghcr.io/miantiao-me/gosonic:latest
container_name: gosonic
restart: unless-stopped
ports:
- "4533:4533"
environment:
GOSONIC_USER: "admin"
GOSONIC_PASSWORD: "change-me-please"
GOSONIC_LANG: "en" # or zh-CN
GOSONIC_QUALITY: "lossless" # standard | high | lossless
volumes:
- ./data:/data
- Start the service:
docker compose up -d
Option 2: Docker Run
docker run -d \
--name gosonic \
--restart unless-stopped \
-p 4533:4533 \
-e GOSONIC_USER=admin \
-e GOSONIC_PASSWORD=change-me-please \
-v "$(pwd)/data:/data" \
ghcr.io/miantiao-me/gosonic:latest
Option 3: Build from Source
Requires Go 1.27+ (and ffmpeg in your PATH if you need on-the-fly transcoding or MuseAmp M4A delivery):
git clone https://github.com/miantiao-me/GoSonic.git
cd GoSonic
go build -o gosonic ./cmd/gosonic
./gosonic serve
On first run without
GOSONIC_PASSWORD, GoSonic generates a random password foradmin, prints it in the startup log, and saves it to./data/config.json.
Getting Started in 3 Steps
1. Install Music Source Plugins
- Open
http://<your-host>:4533/in your browser and sign in with your admin account. - Click + Add Plugin and enter a GitHub repository from the MyGo Music plugin directory (for example,
hubandad/mygo-music-neteaseordjyde/mygo-lizhi) or a local plugin directory path. - Review the requested network and process permissions, then click Confirm Install.
Security note: Plugins requesting external process execution (such as
ffmpegoryt-dlp) are denied by default. Click Allow on the plugin card only if you trust the plugin.
2. Sign In & Configure Plugins
- If a plugin supports account sign-in, click Sign In on its card and follow the QR code or browser Cookie instructions right inside the web console.
- Open Settings & Management on any plugin card to configure plugin options, reload, check for updates, or remove the plugin.
3. Connect Your Subsonic Player
Enter the following in your Subsonic / OpenSubsonic client:
- Server URL:
http://<your-host>:4533(some clients expecthttp://<your-host>:4533/rest) - Username / Password: your configured
GOSONIC_USERandGOSONIC_PASSWORD
Each enabled plugin is exposed as a separate Music Folder, allowing you to filter by source or browse all sources together.
Helpful Tips
- Inspect Client Requests: Switch to the Logs tab in the web console to view real-time HTTP requests from your players (passwords, tokens, and cookies are automatically redacted).
- Manage Additional Users: Edit
<DATA_DIR>/config.jsonto add non-admin Subsonic users ("admin": false). Non-admin users can use Subsonic players but cannot access the web admin console. - Health Check:
GET /healthzreturns200 OKwithout authentication for Docker, Kubernetes, or reverse proxy probes. - Proxy Configuration: Set
HTTP_PROXY,HTTPS_PROXY, orALL_PROXY(for example,socks5://host.docker.internal:7890) in Docker or your shell environment to route outbound traffic through a proxy.
CLI Reference
You can also manage plugins from the command line (or via docker exec gosonic gosonic ...):
gosonic serve [-config path] [-data dir] [-addr :4533]
gosonic plugins list
gosonic plugins install <owner/repo|github-url|local-path>
gosonic plugins update <plugin-id>
gosonic plugins remove <plugin-id>
gosonic plugins enable <plugin-id> <true|false>
gosonic plugins grant <plugin-id> <true|false>
gosonic version
Environment Variables
| Variable | Default | Description |
|---|---|---|
GOSONIC_ADDR |
:4533 |
Listen address |
GOSONIC_DATA_DIR |
./data (/data in Docker) |
Root directory for all persistent data |
GOSONIC_CONFIG |
<DATA_DIR>/config.json |
Custom path to config.json |
GOSONIC_USER |
— | Create or update an admin username |
GOSONIC_PASSWORD |
— | Create or update the admin password |
GOSONIC_LANG |
en |
Plugin localization language (en or zh-CN) |
GOSONIC_QUALITY |
lossless |
Default audio quality (standard, high, or lossless) |
GOSONIC_FFMPEG |
ffmpeg (/usr/bin/ffmpeg in Docker) |
Path to the ffmpeg executable |
GITHUB_TOKEN / GH_TOKEN |
— | Optional GitHub token to avoid API rate limits when installing or updating plugins |
HTTP_PROXY / HTTPS_PROXY / ALL_PROXY / NO_PROXY |
— | Outbound proxy settings (case-insensitive; supports http://, https://, socks5://, socks5h://) |
Data Directory Layout
Back up or migrate the data volume to preserve your setup:
data/
├── config.json # Server settings and user accounts
├── state.json # Enabled status and stable MusicFolder IDs
├── plugins/ # Installed MyGo Music plugins
├── plugin-data/ # Plugin storage, settings, and login sessions
├── catalog.json # Metadata cache and persistent numeric ID map
├── cache/ # Cached artwork and temporary transcode files
└── logs/ # Rotating application log files
Disclaimer
GoSonic does not bundle any music sources, accounts, or copyrighted audio content. It only provides a Subsonic-compatible bridge for third-party plugins that you choose to install. You are responsible for complying with the terms of service of any music platforms and applicable laws in your jurisdiction.
Credits & License
- Plugin runtime and domain contract adapted from egoist/mygo-music (GNU AGPL-3.0).
- Built with MoeForge/moejs (Apache-2.0), Echo (MIT), Pico CSS (MIT), and Alpine.js (MIT).
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE.
関連プロジェクトを探す
読み込み中…