Skip to content
Projekte

Über uns

A self-hosted Subsonic / OpenSubsonic server powered by MyGo Music plugins

Design und Medien

So werden diese Zahlen gemessen

What you can do

  • 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.

Gemessener Sternzuwachs

in 24h
0
in 7 days
Verlauf wird gesammelt
in 15 days
Verlauf wird gesammelt
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

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 +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.
  • 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, and NO_PROXY environment 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.

  1. Save docker-compose.yml and change GOSONIC_USER and GOSONIC_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
  1. 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 for admin, prints it in the startup log, and saves it to ./data/config.json.

Getting Started in 3 Steps

1. Install Music Source Plugins

  1. Open http://<your-host>:4533/ in your browser and sign in with your admin account.
  2. Click + Add Plugin and enter a GitHub repository from the MyGo Music plugin directory (for example, hubandad/mygo-music-netease or djyde/mygo-lizhi) or a local plugin directory path.
  3. Review the requested network and process permissions, then click Confirm Install.

Security note: Plugins requesting external process execution (such as ffmpeg or yt-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 expect http://<your-host>:4533/rest)
  • Username / Password: your configured GOSONIC_USER and GOSONIC_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.json to add non-admin Subsonic users ("admin": false). Non-admin users can use Subsonic players but cannot access the web admin console.
  • Health Check: GET /healthz returns 200 OK without authentication for Docker, Kubernetes, or reverse proxy probes.
  • Proxy Configuration: Set HTTP_PROXY, HTTPS_PROXY, or ALL_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

Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE.

Ähnliche Projekte entdecken

Wird geladen…