• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H03-May-2022-

cmd/H01-Apr-2020-268222

db/H01-Apr-2020-481417

mime/H01-Apr-2020-1210

scanner/H01-Apr-2020-617503

server/H01-Apr-2020-16,79516,269

vendor/H03-May-2022-788,256577,695

version/H01-Apr-2020-126

.dockerignoreH A D01-Apr-202074 98

.gitignoreH A D01-Apr-2020154 1615

.golangci.ymlH A D01-Apr-2020285 1817

DockerfileH A D01-Apr-2020702 3533

Dockerfile.devH A D01-Apr-2020793 3633

LICENSEH A D01-Apr-202034.3 KiB675553

README.mdH A D01-Apr-20204.3 KiB9172

_build_tagsH A D01-Apr-202039 32

_build_varsH A D01-Apr-202022 21

_do_build_scannerH A D01-Apr-2020157 95

_do_build_serverH A D01-Apr-2020166 106

_do_bump_versionH A D01-Apr-20201.5 KiB6851

_do_gen_assetsH A D01-Apr-2020535 2316

_do_gen_handler_testsH A D01-Apr-20205.1 KiB5850

_do_run_scannerH A D01-Apr-2020124 85

_do_run_serverH A D01-Apr-2020137 96

_do_run_server_liveH A D01-Apr-2020233 106

go.modH A D01-Apr-20201.3 KiB3430

go.sumH A D01-Apr-202023.7 KiB250249

README.md

1 <p align="center"><img width="500" src="https://github.com/sentriz/gonic/blob/master/.github/logo.png?raw=true"></p>
2 <h4 align="center">FLOSS alternative to <a href="http://www.subsonic.org/">subsonic</a>, supporting its many clients</h4>
3 <p align="center"><a href="http://hub.docker.com/r/sentriz/gonic"><img src="https://img.shields.io/docker/pulls/sentriz/gonic.svg"></a> <a href="https://microbadger.com/images/sentriz/gonic" title="Get your own image badge on microbadger.com"><img src="https://images.microbadger.com/badges/image/sentriz/gonic.svg"></a> <img src="https://img.shields.io/github/issues/sentriz/gonic.svg"> <img src="https://img.shields.io/github/issues-pr/sentriz/gonic.svg"></p>
4
5
6 ## features
7
8 - browsing by folder (keeping your full tree intact)
9 - browsing by tags (using [taglib](https://taglib.org/) - supports mp3, opus, flac, ape, m4a, wav, etc.)
10 - on-the-fly audio transcoding and caching (requires [ffmpeg](https://ffmpeg.org/)) (thank you [spijet](https://github.com/spijet/))
11 - pretty fast scanning (with my library of ~27k tracks, initial scan takes about 10m, and about 5s after incrementally)
12 - multiple users, each with their own transcoding preferences, playlists, top tracks, top artists, etc.
13 - [last.fm](https://www.last.fm/) scrobbling
14 - artist similarities and biographies from the last.fm api
15 - a web interface for configuration (set up last.fm, manage users, start scans, etc.)
16 - support for the [album-artist](https://mkoby.com/2007/02/18/artist-versus-album-artist/) tag, to not clutter your artist list with compilation album appearances
17 - written in [go](https://golang.org/), so lightweight and suitable for a raspberry pi, etc.
18 - newer salt and token auth
19 - tested on [dsub](https://f-droid.org/en/packages/github.daneren2005.dsub/), [jamstash](http://jamstash.com/), [sublime music](https://gitlab.com/sumner/sublime-music/), and [soundwaves](https://apps.apple.com/us/app/soundwaves/id736139596)
20
21
22## installation
23
24the default login is **admin**/**admin**.
25password can then be changed from the web interface
26
27```
28$ apt install build-essential git sqlite libtag1-dev ffmpeg # for debian like
29$ pacman -S base-devel git sqlite taglib ffmpeg             # for arch like
30$ go get senan.xyz/g/gonic/cmd/gonic
31$ export PATH=$PATH:$HOME/go/bin
32$ gonic -h # or see "configuration options below"
33```
34
35**note:** unfortunately if you do this above, you'll be compiling gonic locally on your machine
36(if someone knows how I can statically link sqlite3 and taglib, please let me know so I can distribute static binaries)
37
38or else you can run in docker, available on dockerhub as `sentriz/gonic`
39
40```yaml
41# example docker-compose.yml
42
43version: '3'
44services:
45  gonic:
46    image: sentriz/gonic:latest
47    environment:
48    - TZ
49    # optionally, see env vars below
50    expose:
51    - 80
52    volumes:
53    - ./data:/data             # gonic db etc
54    - /path/to/music:/music:ro # your music
55    - /path/to/cache:/cache    # transcode cache dir
56```
57
58then start with `docker-compose up -d`
59
60## configuration options
61
62|env var|command line arg|description|
63|---|---|---|
64|`GONIC_MUSIC_PATH`|`-music-path`|path to your music collection|
65|`GONIC_CACHE_PATH`|`-cache-path`|**optional** path to store audio transcodes (*default* `/tmp/gonic_cache`)|
66|`GONIC_DB_PATH`|`-db-path`|**optional** path to database file|
67|`GONIC_LISTEN_ADDR`|`-listen-addr`|**optional** host and port to listen on (eg. `0.0.0.0:4747`, `127.0.0.1:4747`) (*default* `0.0.0.0:4747`)|
68|`GONIC_PROXY_PREFIX`|`-proxy-prefix`|**optional** url path prefix to use if behind reverse proxy. eg `/gonic` (see example configs below)|
69|`GONIC_SCAN_INTERVAL`|`-scan-interval`|**optional** interval (in minutes) to check for new music (automatic scanning disabled if omitted)|
70
71## screenshots
72
73<p align="center">
74<p float="left">
75    <img width="400" src="https://github.com/sentriz/gonic/raw/master/.github/scrot_2.png">
76    <img width="400" src="https://github.com/sentriz/gonic/raw/master/.github/scrot_3.png">
77</p>
78</p>
79
80## example nginx config with `GONIC_PROXY_PREFIX`
81
82```nginx
83  location /gonic/ {
84      proxy_pass http://localhost:4747/;
85      # set "Secure" cookie if using HTTPS
86      proxy_cookie_path / "/; Secure";
87      # set "X-Forwarded-Host" header for last.fm connection callback
88      proxy_set_header X-Forwarded-Host $host;
89  }
90```
91