Gharmonize

Download, convert, and tag media, then stream your music library to a browser or Android. This guide covers packaged desktop builds, Docker Compose, and Player setup.

Features

  • Download media with yt-dlp, convert audio and video with FFmpeg, and edit metadata and cover art.
  • Rip DRM-free discs, prepare ringtones, and use hardware encoding when your system supports it.
  • Play your own library using Gharmonize Player in a browser, on an Android phone, or on Android TV.
  • Use supported music catalogs to find track metadata and match media sources.
Feature reference

Desktop installation

  1. From GitHub Releases, download the Windows Setup EXE, Linux AppImage, or the DEB, RPM, or Arch package for your distribution.
  2. Run the Windows installer or install the Linux package with your package manager. For AppImage, run the commands below from the download folder.
  3. Open Gharmonize. The packaged Electron app includes Node.js. On first launch, let Gharmonize finish preparing its media tools.
  4. Read the initial password from INITIAL_ADMIN_PASSWORD.txt and change it in Settings after signing in. The desktop profile is under ~/.config/Gharmonize/ on Linux and %APPDATA% on Windows, inside the Gharmonize folder.

Install the latest release

.pkg.tar.zst Arch Linux, Manjaro, EndeavourOS

curl -fsSL https://api.github.com/repos/G-grbz/Gharmonize/releases/latest \
  | jq -r '.assets[] | select(.name | endswith("-x64.pkg.tar.zst")) | .browser_download_url' \
  | xargs -r sudo pacman -U

.deb Debian, Ubuntu, Linux Mint

curl -fsSL https://api.github.com/repos/G-grbz/Gharmonize/releases/latest \
  | jq -r '.assets[] | select(.name | endswith("-amd64.deb")) | .browser_download_url' \
  | xargs -r curl -fLo /tmp/gharmonize.deb \
  && sudo apt install /tmp/gharmonize.deb

.rpm Fedora and other RPM-based distributions

curl -fsSL https://api.github.com/repos/G-grbz/Gharmonize/releases/latest \
  | jq -r '.assets[] | select(.name | endswith(".rpm")) | .browser_download_url' \
  | xargs -r sudo dnf install -y

.AppImage Any x86-64 distribution. Saved to ~/Applications and opened.

mkdir -p ~/Applications \
  && curl -fsSL https://api.github.com/repos/G-grbz/Gharmonize/releases/latest \
  | jq -r '.assets[] | select(.name | endswith(".AppImage")) | .browser_download_url' \
  | xargs -r curl -fLo ~/Applications/Gharmonize.AppImage \
  && chmod +x ~/Applications/Gharmonize.AppImage \
  && ~/Applications/Gharmonize.AppImage

Setup .exe Installer. Download it and run it.

Portable .exe No installation needed. Download it and run it.

.apk Gharmonize Player client. Download it on the phone and open it; Android may ask you to allow installs from this source.

Linux commands need curl and jq. They always download the latest release from GitHub.

AppImage launch

chmod +x ./Gharmonize-*.AppImage
./Gharmonize-*.AppImage

Run from source on Linux

Install Node.js 22.12 or newer. Use npm run server in an installed checkout for the browser-only server on port 5174.

Source installation commands

git clone https://github.com/G-grbz/Gharmonize
cd Gharmonize
BUILD_ELECTRON=1 npm install
npm start
Desktop packages and Windows source setup

Docker Compose deployment

Use Docker Engine with the Compose plugin on a Linux host. The supplied stack pulls the official image from ghcr.io/g-grbz/gharmonize and serves the web interface.

Prepare a fresh installation

Docker directory setup commands

git clone https://github.com/G-grbz/Gharmonize
cd Gharmonize
sudo install -d -m 700 -o "$(id -u)" -g "$(id -g)" /opt/gharmonize
mkdir -p /opt/gharmonize/{uploads,outputs,temp,cache,cookies,local-inputs}
touch /opt/gharmonize/.env
chmod 600 /opt/gharmonize/.env

In the cloned checkout, save Compose values in .env. Replace the example user and group IDs with the output of id -u and id -g. Gharmonize reads its own optional settings from /opt/gharmonize/.env.

Compose environment example

PUID=1000
PGID=1000
PORT=5174
MUSIC_DIR=/opt/gharmonize/local-inputs

Start and check the service

Docker Compose start commands

docker compose config --quiet
docker compose pull
docker compose up -d
docker compose ps
  1. Open http://localhost:5174 on the host. To use YTLive, open /ytlive.html on the same server.
  2. Get the initial password from /opt/gharmonize/cache/INITIAL_ADMIN_PASSWORD.txt, change it in Settings, and then remove the one-time credential file.
  3. Preserve the cache volume and its encryption key across upgrades. For a remote deployment, use HTTPS and protect access to the published port.

For a pinned deployment, use a version tag from GHCR. For NVIDIA/NVENC or a source-built image, use the corresponding instructions in the Docker guide.

Docker options, upgrades and NVIDIA

Environment variables

All variables are optional; defaults are used when a value is left empty. Set them in .env or from the Settings panel. In Docker use the Compose environment; in the desktop app edit ~/.config/Gharmonize/.env on Linux or %APPDATA%/Gharmonize/.env on Windows. Restart after changing directory settings.

Docker and server

VariableDefaultWhat it does
PUID
PGID
1000Select the container user and group. Match the owner of the writable host directories.
RUN_MEDIA_GID65534Extra group added to the container user so it can read mounted media (for example removable drives under /run/media).
PORT5174Sets both the service port and the port the stock Compose file publishes. The default is 5174.
MUSIC_DIR/opt/gharmonize/local-inputsMounts a host music directory at /music. In-place retagging requires write permission on that directory.
RETAG_ROOTS/musicRestricts the directories offered for in-place retagging. Without it, /music, LOCAL_INPUT_DIR and the actual outputs directory are offered.
NODE_ENVproductionRuntime mode set by the stock Compose file. Keep production for deployments.
GHARMONIZE_WEB_BINARIES_IN_DOCKER1Lets the Docker image download and manage FFmpeg, yt-dlp and the other tools automatically.
NVIDIA_VISIBLE_DEVICES
NVIDIA_DRIVER_CAPABILITIES
—Commented out in the stock Compose file. Set them to all and compute,video,utility with the NVIDIA runtime to use NVENC hardware encoding.

Data directories

VariableDefaultWhat it does
DATA_DIR—Root directory for application storage. Empty uses the working directory (Node/Docker) or the profile directory (packaged desktop app). The stock Compose stack uses /usr/src/app inside the container; to move host downloads, change the source of the outputs bind mount. Restart after changing it.
OUTPUTS_DISPLAY_DIR—Changes the path shown in the interface. The outputs bind mount determines where files are written.
LOCAL_INPUT_DIRlocal-inputsDirectory under DATA_DIR for browsing and converting server-local files. Requires an administrator session.
GHARMONIZE_WEB_CACHE_DIR
CACHE_DIR
JOBS_STATE_DIR
YTLIVE_DOWNLOAD_LISTS_DIR
—Optional overrides for the cache, saved job state and YTLive download lists. By default they live under DATA_DIR/cache.
ENV_USER_PATH
ENV_PATH
—Selects which .env file is loaded and where Settings saves changes. Empty uses the .env in the working directory.

Interface and general

VariableDefaultWhat it does
FRONTEND_UIclassicInterface served at /: classic, ytlive or player. Direct routes stay available.
UPLOAD_MAX_BYTES2500mbLimits upload size. For example, UPLOAD_MAX_BYTES=100mb.
YOUTUBE_QUICK_ADD_LIMIT50Maximum playlist entries queued by the YTLive playlist + action (1–100).
YOUTUBE_DISCOVER_DEBUG0Enables verbose server logs for YTLive discovery.
YTLIVE_MUSIC_TITLE
YTLIVE_MUSIC_SUBTITLE
Gharmonize Music / Youtube LiveTitle and subtitle shown in the YTLive interface.
TRACK_EXTRACTOR_SHELL_INTEGRATION1Shows the Gharmonize Track Extractor shortcut in the Windows/Linux context menu. 1 = on, 0 = off.
HOMEPAGE_WIDGET_KEY—Key for the Homepage dashboard widget. Generate it in Settings and send it in the X-Widget-Key header.

Desktop app

VariableDefaultWhat it does
GHARMONIZE_DISABLE_HARDWARE_ACCELERATION0Set to 1 to disable GPU acceleration in the desktop app if a graphics driver has rendering problems. Increases CPU usage.
GHARMONIZE_OZONE_PLATFORM—Selects the Linux display backend: x11 or wayland. Empty chooses automatically.
GHARMONIZE_BINARY_TMP_DIR—Executable-capable parent directory for tool temporary files. Defaults to tmp/ inside the managed binary cache; do not use a shared or world-writable directory.

Preview and fetch limits

VariableDefaultWhat it does
PREVIEW_MAX_ENTRIES1000Maximum entries shown in an Automix or playlist preview.
AUTOMIX_ALL_TIMEOUT_MS60000Timeout for fetching a whole Automix list at once. Falls back to paged mode when exceeded.
AUTOMIX_PAGE_TIMEOUT_MS60000Timeout for each paged Automix request.
PLAYLIST_ALL_TIMEOUT_MS35000Timeout for fetching a whole playlist with --flat-playlist.
PLAYLIST_PAGE_TIMEOUT_MS25000Timeout for each paged playlist request.
PLAYLIST_META_TIMEOUT_MS15000Timeout for fetching playlist metadata such as the title and item count.
PLAYLIST_META_FALLBACK_TIMEOUT_MS15000Timeout for the fallback metadata attempt that uses only the first item.
PREVIEW_CACHE_TTL_MS1800000How long preview results stay in memory (30 minutes by default).

Tools and yt-dlp

VariableDefaultWhat it does
YTDLP_BIN—Path to the yt-dlp executable. Leave empty to use the managed copy.
FFMPEG_BIN—Path to the ffmpeg executable. Leave empty to use the managed copy.
FFPROBE_BIN
MKVMERGE_BIN
MKVPROPEDIT_BIN
DENO_BIN
—Paths to the other helper tools. Leave empty to use the managed copies.
GHARMONIZE_FFMPEG_CHANNELstableFFmpeg update channel. stable picks the newest compatible release build; master opts in to the latest development snapshot.
YTDLP_EXTRA—Extra yt-dlp arguments for audio downloads, separated by spaces.
YTDLP_ARGS_EXTRA—Alternative name used when YTDLP_EXTRA is not set.
YTDLP_AUDIO_LIMIT_RATE999999500KDownload speed limit for single-video audio downloads, passed as --limit-rate. The default is effectively unlimited.
YTDLP_UAChrome 127 UAUser-Agent string yt-dlp sends to YouTube.

Spotify, Deezer and matching

VariableDefaultWhat it does
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
—Optional Spotify Web API credentials for metadata lookup. Keep the secret in the protected application configuration.
SPOTIFY_MARKETUSDefault country code for Spotify requests.
SPOTIFY_FALLBACK_MARKETSGB,DE,FRComma-separated markets tried in order when a track is unavailable in SPOTIFY_MARKET.
SPOTIFY_DEBUG_MARKET0Logs market selection and fallbacks in detail.
DEEZER_ARL—Deezer arl session cookie for personalized smart tracklists. Stored encrypted; treat it like a password.
PREFER_SPOTIFY_TAGS1Prefers Spotify metadata over YouTube when writing tags.
ENRICH_SPOTIFY_FOR_YT1Enriches YouTube conversions with Spotify data such as genre, label, year and ISRC.
YT_SEARCH_RESULTS3Number of YouTube results checked per track match. 2 is faster, 3 is safer.
YT_SEARCH_TIMEOUT_MS25000Timeout for each matching search.
YT_SEARCH_STAGGER_MS180Delay between parallel searches to avoid throttling. 0 disables it.
YOUTUBE_HOURLY_BUDGET0YouTube request guard: maximum videos fetched per hour (30–2000, 250 recommended). 0 keeps it off.
MAPPED_MUSIC_YT_DURATION_*
MAPPED_MUSIC_YT_TIGHT_DURATION_*
—Override the duration tolerances used when matching catalog tracks to YouTube (default 45 s or 22%, 12 s or 6% for weak matches).

Title cleaning

VariableDefaultWhat it does
TITLE_CLEAN_PIPE1When a title contains |, keeps only the part after the last one.
CLEAN_SUFFIXEStopic,officialComma-separated suffixes removed from the end of titles.
CLEAN_PHRASESofficial channel,Official VideoPhrases removed wherever they appear in a title.
CLEAN_PARENSofficial,topicWords that remove the whole parenthesized part they appear in.

YouTube cookies, language and region

VariableDefaultWhat it does
YT_STRIP_COOKIES0Master switch: 1 disables both YTDLP_COOKIES and YTDLP_COOKIES_FROM_BROWSER.
YTDLP_COOKIES—Path to a cookies.txt file, needed for age-restricted and members-only videos.
YTDLP_COOKIES_FROM_BROWSER—When no cookies.txt exists, imports cookies from a browser on the same machine, such as chrome or firefox.
YT_UI_FORCE_COOKIES0Keeps YouTube lists consistent in the interface while YT_STRIP_COOKIES=1. Does not affect downloads.
YTM_AUTH_USER—YouTube Music account index for browser-cookie sign-in (0, 1, 2…). Empty uses the default account.
YT_LANGen-USLocale emulated for YouTube requests.
YT_ACCEPT_LANGUAGEen;q=0.8Exact Accept-Language header sent to YouTube.
YT_DEFAULT_REGIONUSCountry code passed as --geo-bypass-country for region-locked videos.
YT_FORCE_IPV41Forces YouTube requests over IPv4.
YT_403_WORKAROUNDS0Enables special handling for HTTP 403 errors from YouTube.
YTM_SHARED_CACHE_PERSIST1Keeps the shared YouTube Music cache on disk. 0 keeps it in memory only.
YTM_HOME_RESULT_CACHE_TTL_MS600000How long personal YouTube Music Home results stay fresh.
YOUTUBE_DISCOVER_CACHE_TTL_MS900000How long discovery results stay fresh.
YTM_API_MIN_INTERVAL_MS500Minimum gap between YouTube Music API requests.
YTM_PARTIAL_RETRY_DELAY_MS5000Retry delay after partial Home errors.

Tagging

VariableDefaultWhat it does
MEDIA_COMMENTGharmonizeText written to the comment tag of generated files.
MP3_WRITE_XING—MP3 duration and seek headers are written by default. The legacy value 0 disables them only for constant-bitrate conversions; leaving it unset is recommended.

Access and security

VariableDefaultWhat it does
GHARMONIZE_HOST127.0.0.1Listen address. 127.0.0.1 allows only this computer, 0.0.0.0 the home network. Docker sets 0.0.0.0.
TRUST_PROXY0Trusts forwarded headers from additional reverse-proxy networks. Loopback proxies are trusted automatically.
TRUSTED_PROXY_CIDRS127.0.0.1/32,::1/128Proxy networks trusted when TRUST_PROXY is on.
GHARMONIZE_ACCESS_MODEnonenone opens the app normally; admin requires an administrator or approved temporary session first.
GHARMONIZE_TEMP_ACCESS_ENABLED0In admin mode, lets visitors request temporary access from a signed-in administrator.
GHARMONIZE_TEMP_ACCESS_HOURS
GHARMONIZE_TEMP_ACCESS_DAYS
GHARMONIZE_TEMP_ACCESS_MONTHS
GHARMONIZE_TEMP_ACCESS_YEARS
1 / 0 / 0 / 0Duration of a temporary access grant. The values are added together, capped at five years.
GHARMONIZE_MASTER_KEY—Encryption key for stored secrets, given directly as a 32-byte hex/base64 value.
GHARMONIZE_MASTER_KEY_FILEDATA_DIR/.gharmonize-keyPoints to the encryption key used for stored secrets. Back up the key and keep it readable by the application user.
GHARMONIZE_INITIAL_ADMIN_PASSWORD_FILE—Writable location for the one-time initial admin password file, for read-only deployments.
ADMIN_PASSWORD
ADMIN_PASSWORD_HASH
—ADMIN_PASSWORD is only a legacy migration input; Gharmonize stores the scrypt hash in ADMIN_PASSWORD_HASH. Do not add a plaintext password to new installs.
GHARMONIZE_ALLOW_PRIVATE_URLS0Allows remote URLs that point to private or LAN addresses. Enable only for intentional LAN media sources.
GHARMONIZE_ALLOW_UNSAFE_YTDLP_ARGS0Allows yt-dlp options that are blocked as unsafe in the extra-argument settings.

Gharmonize Player

VariableDefaultWhat it does
GHARMONIZE_PLAYER_ENABLED0Enables the Player service. While 0, nothing Player-related runs.
GHARMONIZE_PLAYER_LISTEN0Starts a separate Player-only listener on all interfaces, so phones can connect while Gharmonize listens on 127.0.0.1.
GHARMONIZE_PLAYER_PORT5175Port of the separate Player listener.
GHARMONIZE_PLAYER_REMOTE_ACCESSoffAccess from outside the local network: off, tailscale, tunnel or any. The local network always works.
GHARMONIZE_PLAYER_TUNNEL_MODEquickCloudflare Tunnel type: quick needs no account but the address changes on restart; token uses a named tunnel.
GHARMONIZE_PLAYER_TUNNEL_TOKEN—Token of the named Cloudflare tunnel.
GHARMONIZE_PLAYER_TUNNEL_URL—Public HTTPS address of the named tunnel.
GHARMONIZE_PLAYER_TUNNEL_PORT5185Local Player origin port used by Cloudflare Tunnel.
Detailed configuration reference with examples

Player and Android pairing

  1. In Gharmonize settings, enable Gharmonize Player and open /player/.
  2. Create the first Player account using your administrator credentials. Add folders in Administration → Libraries and scan them.
  3. Install the Gharmonize-Player-Client APK from GitHub Releases. Open device pairing in the web Player and scan the QR code from the Android app.
  4. For desktop LAN listening, enable the dedicated Player listener, normally on port 5175. Docker clients can use the existing published port, normally 5174.
Full Player and remote access guide