Docker: four folders, one of which can stop it starting
The image listens on port 80, and the example publishes it as 4747. It does not declare /playlists as a volume, yet gonic quits at startup if that folder is missing: on our bench the container exited with “checking playlist directory: path does not exist”. So keep the ./playlists line. GONIC_SCAN_INTERVAL=60 saves you from starting every scan by hand.
services:
gonic:
image: sentriz/gonic:v0.23.0
ports:
- "4747:80"
environment:
- GONIC_SCAN_INTERVAL=60
volumes:
- "./data:/data"
- "./cache:/cache"
- "./playlists:/playlists"
- "./podcasts:/podcasts"
- "/srv/music:/music:ro"
restart: unless-stopped
Without Docker: build with Go
The gonic wiki asks for Go 1.25 or newer. Add FFmpeg only if you plan to transcode. Create the listed folders first; paths and the port (4747 by default on a native install) are set through options or GONIC_ variables.
CGO_ENABLED=0 go install go.senan.xyz/gonic/cmd/gonic@v0.23.0
gonic -music-path /srv/music -podcast-path ~/gonic/podcasts \
-playlists-path ~/gonic/playlists -cache-path ~/gonic/cache \
-scan-interval 60
Your first visit to the web interface
Open http://localhost:4747 and log in with admin / admin, the factory login, then change that password straight away. Next create a user for listening and run a first scan, because nothing shows up before it. Check that your albums are there and play a track.
Adding gonic to the app
In RoadSonic, add an OpenSubsonic source. Enter the server address including port 4747, then the listening account. Behind a proxy sub-path, set GONIC_PROXY_PREFIX (for example /gonic) and add that path to the address; the app appends /rest itself. Tap “Test and connect”.
