# Self-host gonic

> A lightweight music server that speaks the Subsonic API, with a small web admin.

- Page: https://levelrail.com/templates/gonic/
- JSON: https://levelrail.com/templates/gonic.json
- Category: Media
- Licence: GPL-3.0-only (Copyleft license)
- Source: https://github.com/sentriz/gonic
- Upstream docs: https://github.com/sentriz/gonic

## Requirements
- Memory: about 128 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: v0.23.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| gonic | sentriz/gonic | v0.23.0 | 4747 | data -> /data; music -> /music; podcasts -> /podcasts; cache -> /cache; playlists -> /playlists |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| gonic | GONIC_CACHE_PATH | preset |
| gonic | GONIC_MUSIC_PATH | preset |
| gonic | GONIC_PLAYLISTS_PATH | preset |
| gonic | GONIC_PODCAST_PATH | preset |
| gonic | TZ | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install gonic --name my-gonic
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain gonic=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/gonic/install \
  -d '{
    "name": "my-gonic"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Sign in as admin with password admin and change it at once. Add music to the music volume.

## Questions

### Can I deploy gonic on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for gonic, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image sentriz/gonic:v0.23.0 is what you deploy there.

Self-host gonic, gonic docker compose file, deploy gonic on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
