Deploy gonic
Lightweight Subsonic-compatible music server to stream your own library
Just deployed
/data
Deploy and Host gonic on Railway
gonic is a free, open-source (GPL-3.0) music streaming server written in Go. It implements the Subsonic and OpenSubsonic APIs, so you can play your own music library from apps such as Symfonium, Amperfy, DSub, Ultrasonic, Tempus or Feishin. It browses by folder or by tags, transcodes on the fly with ffmpeg, and supports podcasts, playlists, multiple users and scrobbling.
About Hosting gonic
This template deploys one gonic v0.23.0 service, built from the public repo aalfath/gonic-railway-template, which pins the official sentriz/gonic image by version and digest. gonic stores everything in SQLite, so there is no database service: one volume at /data holds the database, your music in /data/music, podcasts, playlists and a size-capped transcode cache. Upstream starts with the login admin / admin; on first start the template replaces that password with a generated GONIC_ADMIN_PASSWORD before the public port opens. After deploy, sign in at the public URL as admin with that password, upload music with railway volume files upload, and point your Subsonic app at the same URL. It idles at about 30 MB of RAM.
Common Use Cases
- Stream your own music collection to your phone, desktop or car through any Subsonic or OpenSubsonic app
- Share one library with family or friends, each with their own account, playlists and play history
- Subscribe to and download podcasts on the server, and scrobble plays to Last.fm or ListenBrainz
Dependencies for gonic Hosting
- A Railway volume for the SQLite database, music, podcasts, playlists and cache (included)
- A Subsonic-compatible client app to listen with (many are free)
Deployment Dependencies
- gonic source and documentation: https://github.com/sentriz/gonic
- gonic v0.23.0 release: https://github.com/sentriz/gonic/releases/tag/v0.23.0
- Template repository: https://github.com/aalfath/gonic-railway-template
- Subsonic clients that work with gonic: https://github.com/sentriz/gonic#features
Implementation Details
| Service | What it does |
|---|---|
gonic | Subsonic API at /rest, admin web UI at /admin, health check at /ping, data on the volume at /data |
Variables: GONIC_ADMIN_PASSWORD (generated, the password of user admin) and PORT (4747). Changing the password variable after the first start does not change the account: use the web UI. Any other gonic setting can be added as an environment variable, for example TZ, GONIC_SCAN_INTERVAL (minutes, 360 by default here) or GONIC_TRANSCODE_CACHE_SIZE (MB, 1024 here).
Add music (one folder per album) from your computer with the Railway CLI after railway link; the volume root is /data:
railway volume files upload ./Artist/Album /music/Artist/Album
gonic notices new files within seconds, and rescans at start and every 6 hours. Updates: when the template repo moves to a new gonic release, Railway shows you an update notice; read the repo's CHANGELOG.md, then apply it. Your volume is kept.
Why Deploy gonic on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying gonic on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
