ironsmile / euterpe

Self-hosted music streaming server 🎶 with RESTful API and Web interface. Think of it as your very own Spotify! ☁️🎧
https://listen-to-euterpe.eu
GNU General Public License v3.0
522 stars 42 forks source link

Error generating JWT: jwt.(Signer).Sign: HMAC key is empty. #39

Closed BH1SCW closed 2 years ago

BH1SCW commented 2 years ago

hi After sign in the page return:

Error generating JWT: jwt.(Signer).Sign: HMAC key is empty.

my docker-compose.yml:

version: '3'
services:
    kavita:
        image: ironsmile/euterpe:latest
        container_name: euterpe
        volumes:
            - /data/euterpe/config:/root/.euterpe
            - /data/euterpe/Music:/root/Music
        ports:
            - "4000:9996"
        restart: unless-stopped

config.json :

{
    "listen": ":9996",
    "ssl": false,
    "ssl_certificate": {
        "crt": "/full/path/to/certificate/file.crt",
        "key": "/full/path/to/key/file.key"
    },
    "basic_authenticate": true,
    "authentication": {
        "user": "kong",
        "password": "xxxxxxxxxxxxxxxxxxxxxx"
    },
    "libraries": [
        "/root/Music"
    ],
    "library_scan": {
        "initial_wait_duration": "1s",
        "files_per_operation": 1500,
        "sleep_after_operation": "15ms"
    },
    "download_artwork": true,
    "discogs_auth_token": "xxxxxxxxxxxxxxxxxxxxxxx"
}

Thanks

ironsmile commented 2 years ago

Hello! It seems that the "authentication.secret" property is empty in your configuration file. Which is not surprising considering the fact that I forgot to document it 😢 Normally one is generated randomly in the Docker image with euterpe -config-gen but you've decided to override it with your own which is completely fine. This means that you will have to come up with a random string on your own.

The authentication configuration section should be something like:

    "authentication": {
        "user": "kong",
        "password": "xxxxxxxxxxxxxxxxxxxxxx",
        "secret": "some-completly-random-string-at-least-32-characters-log"
    },

I've updated the documentation as well.

BH1SCW commented 2 years ago

ahh, very cool, problem solved :)

Great Thanks!!!