DuoMusic.

DOUBLEMUSIC · THE DUOMUSIC SERVER

Your library.
Your server.

DoubleMusic is the DuoMusic server. It indexes a folder on your machine, reads its tags and serves the audio to your mobile clients. Accounts, favorites and playlists live on your server.

  • Docker, DEB and RPM
  • x86-64 and ARM64
  • Rust core with SQLite
  • Local library works offline

FEATURES

Everything it does for your music.

The local library is at the center of the server. Catalog, artwork and search use your files and work without Internet access once installed.

01 / LIBRARY

Your folder, indexed.

It reads title, artist, album artist, album, year, disc and track number. If tags are missing it falls back to the file name and the Artist/Album folder structure. It recognizes MP3, FLAC, M4A, AAC, OGG, Opus, WAV, AIFF, WMA, APE, ALAC, M4B and WavPack. It rescans every five minutes and reuses metadata for unchanged files.

02 / ARTWORK AND LYRICS

With your own files.

Cover, folder or front images (jpg or png), or the image embedded in the track. Lyrics as .ttml, .lrc or .txt next to the audio with the same name; LRC and plain text are served as TTML. .m3u and .m3u8 playlists with relative paths.

03 / PLAYBACK

Original or converted.

It streams the original file with exact seeking through byte ranges. It can also convert on the server to AAC (320, 192 or 128 kbps) or MP3, and reuses those copies from the cache. For mobile it offers fMP4 with a sidx index.

04 / ACCOUNTS

Each person, their own library.

Independent accounts with revocable sessions. Favorites, personal playlists, saved albums and followed artists are stored per user. Changing a password revokes its sessions.

05 / CONNECT

Play here, control there.

Control playback on one device from another, with synchronized queues. It supports remote queue editing, shuffle, repeat, volume and mute when the client announces it.

06 / EXTERNAL CONNECTIONS

Optional and off by default.

A module implements the /module/v1 API (catalog, search, tracks, audio, images and lyrics) without touching the core. You configure them and turn them on with external.enabled. DoubleMusic keeps managing accounts, permissions, favorites and playlists.

DOWNLOADS

Download DoubleMusic.

Version 1.4.1. Docker images and native packages for x86-64 and ARM64. Every release includes SHA-256 checksums so you can verify what you download.

Verify with SHA256SUMSAll releases

INSTALLATION

Choose how to install it.

You need a folder with your music and a domain with HTTPS pointing to the server. To try it on your local network, http://SERVER_IP:3000 works if the app allows HTTP. Native packages are for glibc-based distributions (not Alpine) with systemd.

01

With Docker (recommended)

Clone the repository and create the music folder. Edit .env: MUSIC_DIR is the folder with your music and PUBLIC_URL is the origin your apps connect to, for example https://music.yourdomain.com, without /api/v1.

git clone https://github.com/mateodd1/DoubleMusic.git
cd DoubleMusic
cp .env.example .env
mkdir -p music

Start it with the prebuilt image:

docker compose -f compose.release.yml pull
docker compose -f compose.release.yml up -d

Create your account. Type the password in your terminal; it will not stay in your shell history:

read -r -s -p 'Password: ' MUSIC_PASSWORD; printf '\n'
printf '%s\n' "$MUSIC_PASSWORD" | docker compose -f compose.release.yml exec -T doublemusic node cli.js add admin --admin --password-stdin
unset MUSIC_PASSWORD

No access to the registry from the server? Load the downloaded archive, verifying its checksum first:

sha256sum --check SHA256SUMS --ignore-missing
docker load -i doublemusic_*_linux_amd64.docker.tar.gz
DOUBLEMUSIC_IMAGE=doublemusic:1.4.1 docker compose -f compose.release.yml up -d --pull never
02

Debian and Ubuntu

Install the package with apt, which resolves FFmpeg and the dependencies. On ARM64 machines use arm64 instead of amd64.

sha256sum --check SHA256SUMS --ignore-missing
sudo apt install ./doublemusic_*_amd64.deb

The service is created but does not start on its own: configure it and create an account first. Edit /etc/doublemusic/doublemusic.env and set PUBLIC_URL to the origin your clients use, without /api/v1. Put your music in /srv/doublemusic/music or in the folder set in MUSIC_DIR; the service cannot read /home, so use /srv or /mnt. It listens on 127.0.0.1:3000: put an HTTPS proxy in front, or use HOST=0.0.0.0 to expose it on your network.

read -r -s -p 'Password: ' MUSIC_PASSWORD; printf '\n'
printf '%s\n' "$MUSIC_PASSWORD" | sudo -u doublemusic doublemusic-user add admin --admin --password-stdin
unset MUSIC_PASSWORD
sudo systemctl enable --now doublemusic.service
sudo systemctl status doublemusic.service
03

Fedora and compatible (RPM)

Install the package with dnf. It needs FFmpeg (on Fedora, ffmpeg-free); other RPM distributions need a compatible provider and their repositories enabled. On ARM64 use aarch64. Then configure and start the service as on Debian and Ubuntu.

sha256sum --check SHA256SUMS --ignore-missing
sudo dnf install ./doublemusic-*.x86_64.rpm
04

From source

If you prefer to build it yourself, use the repository docker-compose.yml, which builds the image on your machine:

docker compose up -d --build
05

Connect your apps

In the app, enter the same URL as PUBLIC_URL and sign in with that account. Your HTTPS proxy must forward every route to the service, including Connect WebSocket connections.

Music is mounted read-only. With Docker, the library-data volume stores accounts, personal libraries, the index and the cache; with packages, /var/lib/doublemusic.

CONFIGURATION

Tune your instance.

Variables from the .env file (Docker) or /etc/doublemusic/doublemusic.env (packages, which also have HOST and DATA_DIR). Changes apply when the service restarts.

01

Variables

VariableDefaultWhat it does
SOURCES_FILEemptySources JSON. Without it, only the local library is loaded.
MUSIC_DIR./musicMusic folder on the machine, mounted read-only.
PORT3000Port published on the machine.
BIND_ADDRESS0.0.0.0Address on the machine where the port is published.
PUBLIC_URLhttp://localhost:3000Public origin, without paths. Used to build artwork and audio URLs.
SCAN_INTERVAL_SECONDS300Scan interval. 0 turns off periodic scanning.
CACHE_MAX_MB2048Approximate limit of the converted-audio cache.
TRUST_PROXYfalseTrusts the protocol forwarded by a trusted proxy when setting cookies.
SECURE_COOKIESfalseRequires HTTPS for the session cookie.
ALLOWED_ORIGINSPUBLIC_URLAllowed origins for Connect web controllers, comma-separated.
02

Turn features on or off

In the JSON file pointed to by SOURCES_FILE you choose whether to use the local library, external connections or both. Turning off the library skips scanning; turning off external connections prevents loading their credentials or querying them. Your files, accounts and personal libraries are kept.

library.enabledexternal.enabledResult
truefalseLocal library. This is the default.
truetrueLocal library with optional external connections.
falsetrueOnly the external connections you have configured.
falsefalseAccounts and API available, with an empty catalog.
{
  "version": 1,
  "library": { "enabled": true },
  "external": { "enabled": false }
}

With Docker, mount it by creating compose.config.yml and applying it with docker compose -f compose.release.yml -f compose.config.yml up -d --force-recreate doublemusic. With packages, edit /etc/doublemusic/settings.json. The modules guide explains the contract for external connections.

services:
  doublemusic:
    environment:
      SOURCES_FILE: /config/settings.json
    volumes:
      - ./settings.json:/config/settings.json:ro
03

Accounts, upgrades and backups

Accounts are managed from the server terminal. add and passwd read the password from standard input, as when creating it.

docker compose -f compose.release.yml exec doublemusic node cli.js list
docker compose -f compose.release.yml exec doublemusic node cli.js revoke username
docker compose -f compose.release.yml exec -T doublemusic node cli.js passwd username --password-stdin
docker compose -f compose.release.yml exec doublemusic node cli.js del username
docker compose -f compose.release.yml logs --tail=100 doublemusic
sudo -u doublemusic doublemusic-user list
sudo -u doublemusic doublemusic-user revoke username
sudo -u doublemusic doublemusic-user passwd username --password-stdin
sudo -u doublemusic doublemusic-user del username
sudo -u doublemusic doublemusic-server --healthcheck
sudo journalctl -u doublemusic.service -n 100 --no-pager

Upgrading. With Docker, change the image tag (DOUBLEMUSIC_IMAGE), pull it and recreate the service with the same volumes. With packages, install the new one: configuration, accounts, sessions and personal libraries are preserved.

Backups. For a consistent backup, stop the service and copy the library-data volume (Docker) or /var/lib/doublemusic (packages). Back up your music folder separately. Removing or purging the package keeps your music and data.

BEFORE YOU INSTALL

Server questions.

What music can I use?

Your own, or music you have permission to use. The project ships no commercial songs or platform connectors. Read the scope of use.

Which architectures are available?

x86-64 and ARM64 (aarch64), both as Docker images and as DEB and RPM packages.

Does it need Internet?

The local library works without Internet access after installation. External connections are optional and off by default.

Where is my data stored?

Accounts, the personal library, the index and the cache are in the library-data volume (Docker) or in /var/lib/doublemusic (packages). Your files are never modified: the music folder is mounted read-only.

How do the apps connect?

The app needs the server URL, the same as PUBLIC_URL and without /api/v1. Then you sign in with your account. The server implements the DuoMusic v1 contract.

Can I run it without Docker?

Yes: there are native DEB and RPM packages. You can also run it from source with Rust 1.98, Node.js 22.13 or newer and FFmpeg; the steps are in the full README.

Technical documentation

Linux installation guide, client API, Connect protocol, modules and architecture, all in the repository.

Linux installation · Client API · Connect · Modules · Architecture · Scope of use · Full README