binhex-gonic

binhex-gonic

Docker app from Binhex's Repository

Overview

Free-software subsonic server API implementation, supporting its many clients.

Application

Gonic website

Description

Free-software subsonic server API implementation, supporting its many clients.

Build notes

Latest stable Gonic release from Arch User Repository (AUR).

Usage

docker run -d \
    -p 4747:4747 \
    --name=<container name> \
    -v <path for media files>:/media \
    -v <path for config files>:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e GONIC_MUSIC_PATH=<path to music files> \
    -e GONIC_PODCAST_PATH=<path to podcast files> \
    -e GONIC_PLAYLISTS_PATH=<path to playlist files> \
    -e GONIC_CACHE_PATH=<path to cache files> \
    -e GONIC_DB_PATH=<path to database file> \
    -e GONIC_LISTEN_ADDR=<host:port> \
    -e GONIC_PROXY_PREFIX=<url path prefix> \
    -e GONIC_TLS_CERT=<path to TLS cert> \
    -e GONIC_TLS_KEY=<path to TLS key> \
    -e GONIC_HTTP_LOG=true|false \
    -e GONIC_SCAN_INTERVAL=<interval in minutes> \
    -e GONIC_SCAN_AT_START_ENABLED=true|false \
    -e GONIC_SCAN_WATCHER_ENABLED=true|false \
    -e GONIC_SCAN_EMBEDDED_COVER_ENABLED=true|false \
    -e GONIC_EXCLUDE_PATTERN=<regex pattern> \
    -e GONIC_GENRE_TREE=<path to genre tree file> \
    -e GONIC_MULTI_VALUE_GENRE='none|multi|delim <delimiter>' \
    -e GONIC_MULTI_VALUE_ARTIST='none|multi|delim <delimiter>' \
    -e GONIC_MULTI_VALUE_ALBUM_ARTIST='none|multi|delim <delimiter>' \
    -e GONIC_MULTI_VALUE_ISRC='none|multi|delim <delimiter>' \
    -e GONIC_TRANSCODE_CACHE_SIZE=<size in MB> \
    -e GONIC_TRANSCODE_EJECT_INTERVAL=<interval in minutes> \
    -e GONIC_COVER_CACHE_SIZE=<size in MB> \
    -e GONIC_COVER_EJECT_INTERVAL=<interval in minutes> \
    -e GONIC_PODCAST_PURGE_AGE=<age in days> \
    -e GONIC_JUKEBOX_ENABLED=true|false \
    -e GONIC_JUKEBOX_MPV_EXTRA_ARGS=<mpv arguments> \
    -e GONIC_EXPVAR=true|false \
    -e GONIC_PPROF=true|false \
    -e GONIC_LOG_DB=true|false \
    -e HEALTHCHECK_COMMAND=<command> \
    -e HEALTHCHECK_ACTION=<action> \
    -e HEALTHCHECK_HOSTNAME=<hostname> \
    -e UMASK=<umask for created files> \
    -e PUID=<UID for user> \
    -e PGID=<GID for user> \
    binhex/arch-gonic

Please replace all user variables in the above command defined by <> with the correct values.

Access application

http://<host ip>:4747

Default username/password: admin/admin

Example

docker run -d \
    -p 4747:4747 \
    --name=gonic \
    -v /media/music:/media \
    -v /apps/docker/gonic:/config \
    -v /etc/localtime:/etc/localtime:ro \
    -e GONIC_MUSIC_PATH='/media' \
    -e GONIC_PODCAST_PATH='/config/gonic/podcasts' \
    -e GONIC_PLAYLISTS_PATH='/config/gonic/playlists' \
    -e GONIC_CACHE_PATH='/config/gonic/cache' \
    -e GONIC_DB_PATH='/config/gonic/db/gonic.db' \
    -e GONIC_SCAN_INTERVAL=60 \
    -e GONIC_SCAN_WATCHER_ENABLED=true \
    -e UMASK=000 \
    -e PUID=0 \
    -e PGID=0 \
    binhex/arch-gonic

Notes

User ID (PUID) and Group ID (PGID) can be found by issuing the following command for the user you want to run the container as:-

id <username>

If you appreciate my work, then please consider buying me a beer :D

PayPal donation

Documentation | Support forum

Download Statistics

4,377
Total Downloads

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/binhex/arch-gonic
Last Updated2026-06-12
First Seen2024-05-21

Runtime arguments

Web UI
http://[IP]:[PORT:4747]
Network
bridge
Shell
bash
Privileged
false

Template configuration

Port: Web InterfacePorttcp

This is the port for the Web UI for the application

Target
4747
Default
4747
Path: /configPathrw

This is the container path to your configuration files, e.g. databases, configuration files, logs etc.

Target
/config
Default
/mnt/user/appdata/gonic
Path: /mediaPathrw

This is the container path to your media files, e.g. movies, tv, music, pictures etc.

Target
/media
Default
/mnt/user
Variable: GONIC_MUSIC_PATHVariable

Path to your music collection inside the container. Multiple folders are supported as a comma separated list, e.g. '/media/music,/media/audiobooks'

Target
GONIC_MUSIC_PATH
Default
/media
Variable: GONIC_PODCAST_PATHVariable

Path to store downloaded podcasts. Keep this inside a mapped path such as /config so subscriptions survive container updates.

Target
GONIC_PODCAST_PATH
Default
/config/gonic/podcasts
Variable: GONIC_PLAYLISTS_PATHVariable

Path to store created playlists. Files use the 'userid/name.m3u' layout, e.g. '1/jazz.m3u' for the admin user, and are created and changed by gonic through the subsonic api. Keep this inside a mapped path such as /config.

Target
GONIC_PLAYLISTS_PATH
Default
/config/gonic/playlists
Variable: GONIC_CACHE_PATHVariable

Path to store audio transcodes, covers, etc. This path must exist inside the container, the application will not start if it is empty or missing.

Target
GONIC_CACHE_PATH
Default
/config/gonic/cache
Variable: GONIC_DB_PATHVariable

Path to the gonic database file. Keep this inside a mapped path such as /config so your library database survives container updates.

Target
GONIC_DB_PATH
Default
/config/gonic/db/gonic.db
Variable: GONIC_LISTEN_ADDRVariable

Host and port to listen on, e.g. '0.0.0.0:4747' or '127.0.0.1:4747'. If not specified then the default of '0.0.0.0:4747' will be used. Change this only if you also change the container side of the Web Interface port.

Target
GONIC_LISTEN_ADDR
Variable: GONIC_PROXY_PREFIXVariable

Url path prefix to use if behind a reverse proxy, e.g. '/gonic'. If not specified then gonic will be served from the root path.

Target
GONIC_PROXY_PREFIX
Variable: GONIC_TLS_CERTVariable

Path to a TLS cert inside the container to enable HTTPS listening, e.g. '/config/gonic/certs/cert.pem'. Must be set together with the TLS key below. If not specified then gonic will serve plain HTTP, which is typical when a reverse proxy terminates TLS.

Target
GONIC_TLS_CERT
Variable: GONIC_TLS_KEYVariable

Path to the TLS private key that matches the TLS cert above. Must be set together with the TLS cert.

Target
GONIC_TLS_KEY
Variable: GONIC_HTTP_LOGVariable

Enable or disable HTTP request logging, enabled by default.

Target
GONIC_HTTP_LOG
Default
true|false
Variable: GONIC_SCAN_INTERVALVariable

Interval in minutes to automatically check for new music. Automatic scanning is disabled if this is not specified, a scan can still be started from the web interface.

Target
GONIC_SCAN_INTERVAL
Variable: GONIC_SCAN_AT_START_ENABLEDVariable

Whether to perform an initial scan of your music collection every time the container starts.

Target
GONIC_SCAN_AT_START_ENABLED
Default
false|true
Variable: GONIC_SCAN_WATCHER_ENABLEDVariable

Whether to watch the file system for new music and rescan automatically. Use this or the scan interval above, there is usually no need to enable both.

Target
GONIC_SCAN_WATCHER_ENABLED
Default
false|true
Variable: GONIC_SCAN_EMBEDDED_COVER_ENABLEDVariable

Whether to scan for embedded covers in audio files, in addition to image files in the album folder. Enabled by default.

Target
GONIC_SCAN_EMBEDDED_COVER_ENABLED
Default
true|false
Variable: GONIC_EXCLUDE_PATTERNVariable

Go regular expression matched against the absolute path of every file and folder whilst scanning, anything that matches is not imported. Example: '@eaDir|[aA]rtwork|[cC]overs|[sS]cans'. If the pattern is invalid then the application will not start.

Target
GONIC_EXCLUDE_PATTERN
Variable: GONIC_GENRE_TREEVariable

Path to a tab separated genre hierarchy file inside the container, for hierarchical genre browsing. Each line contains a parent genre and a child genre separated by a tab character, e.g. 'electronic' followed by a tab followed by 'edm'. If the file is missing or invalid then the application will not start.

Target
GONIC_GENRE_TREE
Variable: GONIC_MULTI_VALUE_GENREVariable

Setting for multi-valued genre tags when scanning, 'multi' uses the multi-valued tag fields written by tools such as MusicBrainz Picard or beets, 'delim delimiter' splits your single genre tag on a delimiter, e.g. 'delim ;', 'none' disables splitting (default). Note a comma delimiter must be escaped, e.g. 'delim \,', because the environment variable parser splits on comma.

Target
GONIC_MULTI_VALUE_GENRE
Variable: GONIC_MULTI_VALUE_ARTISTVariable

Setting for multi-valued artist tags when scanning, 'multi' uses the multi-valued tag fields, 'delim delimiter' splits your single artist tag on a delimiter, e.g. 'delim ;', 'none' disables splitting (default). Note a comma delimiter must be escaped, e.g. 'delim \,', because the environment variable parser splits on comma.

Target
GONIC_MULTI_VALUE_ARTIST
Variable: GONIC_MULTI_VALUE_ALBUM_ARTISTVariable

Setting for multi-valued album artist tags when scanning, 'multi' uses the multi-valued tag fields, 'delim delimiter' splits your single album artist tag on a delimiter, e.g. 'delim ;', 'none' disables splitting (default). Using 'multi' or a delimiter keeps compilation appearances out of your artist list. Note a comma delimiter must be escaped, e.g. 'delim \,', because the environment variable parser splits on comma.

Target
GONIC_MULTI_VALUE_ALBUM_ARTIST
Variable: GONIC_MULTI_VALUE_ISRCVariable

Setting for multi-valued isrc tags when scanning, 'multi' uses the multi-valued tag fields, 'delim delimiter' splits your single isrc tag on a delimiter, e.g. 'delim ;', 'none' disables splitting (default). Note a comma delimiter must be escaped, e.g. 'delim \,', because the environment variable parser splits on comma.

Target
GONIC_MULTI_VALUE_ISRC
Variable: GONIC_TRANSCODE_CACHE_SIZEVariable

Size of the transcode cache in MB, 0 or empty means no limit.

Target
GONIC_TRANSCODE_CACHE_SIZE
Variable: GONIC_TRANSCODE_EJECT_INTERVALVariable

Interval in minutes to eject the transcode cache, 0 or empty means never. Only used if a transcode cache size above 0 is set.

Target
GONIC_TRANSCODE_EJECT_INTERVAL
Variable: GONIC_COVER_CACHE_SIZEVariable

Size of the cover art cache in MB, 0 or empty means no limit.

Target
GONIC_COVER_CACHE_SIZE
Variable: GONIC_COVER_EJECT_INTERVALVariable

Interval in minutes to eject the cover art cache, 0 or empty means never. Only used if a cover art cache size above 0 is set.

Target
GONIC_COVER_EJECT_INTERVAL
Variable: GONIC_PODCAST_PURGE_AGEVariable

Age in days to purge podcast episodes if not accessed, 0 or empty means never purge.

Target
GONIC_PODCAST_PURGE_AGE
Variable: GONIC_JUKEBOX_ENABLEDVariable

Whether the subsonic jukebox api should be enabled, for gapless server-side playback through the audio device of the host (mpv is included in this container). You may also need to pass the audio device of the host into the container.

Target
GONIC_JUKEBOX_ENABLED
Default
false|true
Variable: GONIC_JUKEBOX_MPV_EXTRA_ARGSVariable

Extra command line arguments to pass to the jukebox mpv daemon, e.g. '--audio-device=alsa/hdmi:CARD=HDMI'. Shell style quoting is supported.

Target
GONIC_JUKEBOX_MPV_EXTRA_ARGS
Variable: GONIC_EXPVARVariable

Enable the /debug/vars endpoint, which exposes useful debugging attributes as well as database stats. Leave disabled unless troubleshooting.

Target
GONIC_EXPVAR
Default
false|true
Variable: GONIC_PPROFVariable

Enable the /debug/pprof endpoint, used for profiling the application. Leave disabled unless troubleshooting.

Target
GONIC_PPROF
Default
false|true
Variable: GONIC_LOG_DBVariable

Enable database query logging, this is very verbose. Leave disabled unless troubleshooting.

Target
GONIC_LOG_DB
Default
false|true
Variable: ENABLE_HEALTHCHECKVariable

Enable or disable healthchecks.

Target
ENABLE_HEALTHCHECK
Default
yes|no
Variable: HEALTHCHECK_COMMANDVariable

The command or script to execute, if not specified then the script healthcheck.sh will be used (process, dns and https checking).

Target
HEALTHCHECK_COMMAND
Variable: HEALTHCHECK_ACTIONVariable

The action to execute if the healthcheck command returns a non zero exit code, if not specified the action will be 'exit 1', if you want the container to exit on failure then set the action to 'kill 1'.

Target
HEALTHCHECK_ACTION
Variable: HEALTHCHECK_HOSTNAMEVariable

The hostname used when performing HTTPS and DNS healthchecking.

Target
HEALTHCHECK_HOSTNAME
Default
google.com
Variable: PUIDVariable

User ID for the running container

Target
PUID
Default
99
Variable: PGIDVariable

Group ID for the running container

Target
PGID
Default
100
Variable: UMASKVariable

UMASK for the running container

Target
UMASK
Default
000