server-docker icon indicating copy to clipboard operation
server-docker copied to clipboard

Error: key must be at least 16 characters long

Open ITR13 opened this issue 5 years ago • 7 comments

When following this guide on setting up a ferdi server with docker, accessing [domain]:3333 yields the following error:

Error: key must be at least 16 characters long
Error: key must be at least 16 characters long
    at module.exports (/app/node_modules/simple-encryptor/index.js:24:11)
    at new Encryption (/app/node_modules/@adonisjs/framework/src/Encryption/index.js:37:22)
    at Object.app.singleton [as closure] (/app/node_modules/@adonisjs/framework/providers/AppProvider.js:257:14)
    at Ioc._resolveBinding (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:231:68)
    at Ioc.make (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:807:19)
    at injections.map (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:318:19)
    at Array.map (<anonymous>)
    at Ioc._makeInstanceOf (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:317:44)
    at Ioc.make (/app/node_modules/@adonisjs/fold/src/Ioc/index.js:799:19)
    at AuthManager.getScheme (/app/node_modules/@adonisjs/auth/src/Auth/Manager.js:86:16)
    at Auth.authenticator (/app/node_modules/@adonisjs/auth/src/Auth/index.js:118:40)
    at new Auth (/app/node_modules/@adonisjs/auth/src/Auth/index.js:68:39)
    at Context.<anonymous> (/app/node_modules/@adonisjs/auth/providers/AuthProvider.js:151:14)
    at Context.wrappedCallback [as auth] (/app/node_modules/macroable/index.js:132:61)
    at Server._handleException (/app/node_modules/@adonisjs/framework/src/Server/index.js:253:63)
    at _executeServerMiddleware.then.then.catch (/app/node_modules/@adonisjs/framework/src/Server/index.js:441:14)

To create the container I used the following command: (with MYDOMAIN replaced with my domain, and AREALLYLONGPASSWORD being a randomly generated password with over 20 characters)

sudo docker create \
    --name=ferdi-server \
    -e NODE_ENV=development \
    -e EXTERNAL_DOMAIN=MYDOMAIN \
    -e DB_CONNECTION=sqlite \
    -e DB_HOST=127.0.0.1 \
    -e DB_PORT=3306 \
    -e DB_USER=root \
    -e DB_PASSWORD=AREALLYLONGPASSWORD \
    -e DB_SSL=false \
    -e IS_CREATION_ENABLED=true \
    -e IS_DASHBOARD_ENABLED=true \
    -e IS_REGISTRATION_ENABLED=true \
    -e CONNECT_WITH_FRANZ=false \
    -p 3333:80 \
    -v ~/data/config:/config \
    -v ~/data/app/database:/app/database \
    -v ~/data/app/recipes:/app/recipes \
    --restart unless-stopped \
    getferdi/ferdi-server

It's running on Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-51-generic x86_64)

ITR13 avatar Feb 05 '21 23:02 ITR13