gonic — a lightweight, fast Subsonic/OpenSubsonic-compatible music streaming server. Works with any Subsonic client and supports podcasts and playlists. Deployed as a single host-networked Nomad service.
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 2.6k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "gonic"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The gonic container image. Pin a tag in production.
image = "sentriz/gonic:latest"
# Host port for the gonic web UI.
port = 4747
# Named volume mounted at /data (the SQLite database and caches).
data_volume = "gonic_data"
# Named volume mounted at /music — your music library.
music_volume = "gonic_music"
# Named volume mounted at /podcasts — downloaded podcasts.
podcasts_volume = "gonic_podcasts"
# Named volume mounted at /playlists — M3U playlists.
playlists_volume = "gonic_playlists"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 300
memory = 256
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "gonic" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "sentriz/gonic:latest" | The gonic container image. Pin a tag in production. |
| port | number | 4747 | Host port for the gonic web UI. |
| data_volume | string | "gonic_data" | Named volume mounted at /data (the SQLite database and caches). |
| music_volume | string | "gonic_music" | Named volume mounted at /music — your music library. |
| podcasts_volume | string | "gonic_podcasts" | Named volume mounted at /podcasts — downloaded podcasts. |
| playlists_volume | string | "gonic_playlists" | Named volume mounted at /playlists — M3U playlists. |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 300
memory = 256
} | The task resources. |
No variables match.
This pack stores data in 4 Docker named volumes:
gonic_datagonic_podcastsgonic_playlistsgonic_music
restic
# Run on the node hosting this pack. Point restic at your repo first: # export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>" # export RESTIC_PASSWORD="<repo-password>" # export AWS_ACCESS_KEY_ID=<key> AWS_SECRET_ACCESS_KEY=<secret> restic backup \ /var/lib/docker/volumes/gonic_data/_data \ /var/lib/docker/volumes/gonic_podcasts/_data \ /var/lib/docker/volumes/gonic_playlists/_data \ /var/lib/docker/volumes/gonic_music/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/gonic_data/_data backup:<bucket>/gonic_data rclone sync /var/lib/docker/volumes/gonic_podcasts/_data backup:<bucket>/gonic_podcasts rclone sync /var/lib/docker/volumes/gonic_playlists/_data backup:<bucket>/gonic_playlists rclone sync /var/lib/docker/volumes/gonic_music/_data backup:<bucket>/gonic_music
Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.
gonic — a lightweight, fast Subsonic / OpenSubsonic music streaming server. Point any Subsonic-compatible app (DSub, Symfonium, play:Sub, Feishin, …) at it to stream your library, with multi-user support, podcasts, playlists, scrobbling and on-the-fly transcoding — all from a tiny Go binary.
Single host-networked Nomad service with library, database, podcasts and playlists volumes.
nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run gonic --registry=nomploy
| Variable | Default | Description |
|---|---|---|
port |
4747 |
Web UI / Subsonic API port (GONIC_LISTEN_ADDR). |
image |
sentriz/gonic:latest |
Container image. Pin a tag in production. |
data_volume |
gonic_data |
/data — database and caches. |
music_volume |
gonic_music |
/music — your music library. |
podcasts_volume |
gonic_podcasts |
/podcasts — downloaded podcasts. |
playlists_volume |
gonic_playlists |
/playlists — M3U playlists. |
resources |
{ cpu = 300, memory = 256 } |
Task resources. |
Default login is
admin/admin— change it on first visit. Put your music under themusic_volume(or point it at an existing library). A prestart init task makes the writable volumes accessible. Pin the job to the node holding the volumes withconstraints. A lighter alternative to navidrome.