Skip to content

OpenSubsonic compatible music server with additional extensions for Crossonic.

License

Notifications You must be signed in to change notification settings

juho05/crossonic-server

Repository files navigation

Crossonic Server

OpenSubsonic compatible music server with additional extensions for Crossonic.

Status

This project is in development. Expect bugs and missing features.

Not all OpenSubsonic endpoints have been implemented yet (status). This server implements all endpoints needed for the Crossonic app but may not work with other Subsonic media players.

Features

  • Full scan of media library (kind of slow currently)
  • Incremental library scan
  • ListenBrainz scrobbling
  • Multiple users
  • transcoding and caching
    • configurable with format= and maxBitRate= parameters
    • raw, mp3, opus, vorbis, aac
  • Fetch artist images from last.fm
  • Multiple artists, album artists, genres
  • Stores a unique ID in the metadata of all media files to preserve IDs when moving/renaming files on disk
  • Scrobbling including playback duration
  • Browse by tags
    • browsing by folders not supported
  • Favorites/rating
  • Lyrics
    • unsynced
    • synced
  • playlists
    • including user-changable playlist covers (not natively supported by OpenSubsonic)
  • SONOS casting (very buggy, not documented)
  • Serve Crossonic
  • Admin CLI
  • Admin web interface

Deploy with Docker

Create docker-compose.yml:

services:
  crossonic:
    image: ghcr.io/juho05/crossonic-server
    restart: unless-stopped
    environment:
      DB_USER: crossonic
      DB_PASSWORD: crossonic
      DB_HOST: db
      DB_PORT: 5432
      DB_NAME: crossonic
      # Base64 encoded string representing exactly 32 bytes.
      # Generate with: docker run --rm -it --entrypoint crossonic-admin ghcr.io/juho05/crossonic-server gen-encryption-key
      PASSWORD_ENCRYPTION_KEY: <key>
      # URL where crossonic-server is reachable
      BASE_URL: "https://crossonic.example.com"
    volumes:
      - "./cache:/cache"   # cache files
      - "./data:/data"     # cover art etc.
      - "./library:/music" # your music files
    ports:
      - "8080:8080"
    depends_on:
      - db
  db:
    image: postgres:16
    restart: unless-stopped
    volumes:
      - ./postgres:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: crossonic
      POSTGRES_USER: crossonic
    healthcheck:
      test: ["CMD", "pg_isready -U crossonic"]
      interval: 30s
      timeout: 20s
      retries: 3

Run docker compose up -d in the same directory as the docker-compose.yml file.

Create user

To create a user use the following command from the directory of your docker-compose.yml file:

docker compose exec -it crossonic crossonic-admin user create <name> <password>

License

Copyright (c) 2024 Julian Hofmann

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

OpenSubsonic compatible music server with additional extensions for Crossonic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages